Closed IsD4n73 closed 3 months ago
Hey, thank you so much for raising this issue. I'll quickly check this and resolve this as soon as possible.
On the first glance, this seems like a bug with the library. I'll get back with more info soon. Thanks again :)
Hey, just an update. It was a bug with the library. You can check the #282 for more details on what happened and what was changed to fix this.
I've already pushed the v1.22.2
to pub.dev. Please update the version and let me know if this works out for you. There's a minor change required at your side (explained down below).
In a nutshell, when the bot.start is called we blindly tried to set the Fetcher.api
property even though it was final.
In this change I've added Bot.pause
and Bot.resume
methods. Please use these instead of Bot.stop
and Bot.start
if you're looking to temporarily stop the bot. This is because (as explained in #282) when Bot.stop
is called we close all the connected resources (including the HTTP Client) - so you know, any request made after closing the HTTP client will throw an exception.
Just in case you're stuck anytime feel free to jump into our Telegram chat or feel free to raise a discussion or issue in the repo.
Hope this helps and thank you so much again for raising the issue. Happy Televersing! 🚀
Hi!
I have a problem with the stop and start bot: On the first startup with
bot.start();
there are no problems and the bot works correctly.When I go to do the
bot.stop();
and thenbot.start();
I get this error:
I wanted to see if I am doing something wrong in the implementation
Here is the complete code:
Thank you!