feat: better error handling and fixed file size checking for /yt
This commit is contained in:
parent
935385eb4f
commit
62e7a1393b
2 changed files with 21 additions and 1 deletions
|
@ -6,6 +6,12 @@ require('@dotenvx/dotenvx').config({ path: "config.env" });
|
|||
require('./plugins/ytdlp-wrapper.js');
|
||||
// require('./plugins/termlogger.js');
|
||||
|
||||
// Ensures bot token is set, and not default value
|
||||
if (!process.env.botToken || process.env.botToken === 'InsertYourBotTokenHere') {
|
||||
console.error('Bot token is not set. Please set the bot token in the config.env file.')
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
const bot = new Telegraf(process.env.botToken);
|
||||
const maxRetries = process.env.maxRetries || 5;
|
||||
let restartCount = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue