Skip to content

Commit

Permalink
Fix switching from webhook to polling mode
Browse files Browse the repository at this point in the history
  • Loading branch information
deptyped committed Jul 24, 2024
1 parent fa07dda commit abf7c3f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ async function startPolling(config: PollingConfig) {
await runner?.stop()
})

await bot.init()
await Promise.all([
bot.init(),
bot.api.deleteWebhook(),
])

// start bot
runner = run(bot, {
Expand Down

0 comments on commit abf7c3f

Please sign in to comment.