yagop / node-telegram-bot-api

Telegram Bot API for NodeJS
MIT License
8.3k stars 1.5k forks source link

this.bot = new telegramBot(this.token, { polling: true }) #998

Closed CoreLine76 closed 2 years ago

CoreLine76 commented 2 years ago

ERROR : [nodemon] restarting due to changes... [nodemon] starting corenode-node index.js node-telegram-bot-api deprecated Automatic enabling of cancellation of promises is deprecated. In the future, you will have to enable it yourself. See https://github.com/yagop/node-telegram-bot-api/issues/319. node:internal\modules\cjs\loader:1105:14 F:\OTPLER\SpaceXBot\index.js:125 this.bot = new telegramBot(this.token, { polling: true }) CODE : class TelegramController { constructor(token, eventBus) { this.eventBus = eventBus this.token = token ?? _env.telegramBot_token

    this.bot = new telegramBot(this.token, { polling: true })

    this.bot.on("polling_error", console.log);

    this.setCommands()
}
danielperez9430 commented 2 years ago

Hi @CoreLine76 Can you tell me more about your problem? If your problem is the message "node-telegram-bot-api deprecated Automatic enabling of cancellation of promises is deprecated." this warning we remove in the next release. But this message don't have any impact in your bot.