Closed OttomanDeveloper closed 1 year ago
Are you calling the Televerse.start
method more than once? It might possibly cause this exception to be thrown.
Hmm, seems an interesting topic. As of now, there's no way you can check if a bot is already started the polling or not.
Btw, as you're using LongPolling
as fetcher, you can already check if the long polling is active:
if((bot.fetcher as LongPolling).isPolling) {
print('Polling is active');
} else {
print('Polling is not active');
}
Thank you it's working
Happy to help! Happy Televersing! 🚀
How to check if the bot instance is already running or not? I'm getting this error.
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: LongPollingException [null]: Already polling. You cannot start another polling when another polling is working.
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: TelegramException [429]: (Too Many Requests: retry after 94)