You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
When a handler needs to support a bot that for example throttling, the handler cannot be tested anymore using MockBot, since that initializes a Bot without any adapters.
Describe the solution you'd like
An easy way to enable Throttle and ParseMode on a MockBot.
Describe alternatives you've considered
This does seem to fix my test, but it is not very pretty.
let bot = MockBot::new(msg,handler_tree());let adaptor_bot = bot
.bot.clone().throttle(Limits::default()).parse_mode(ParseMode::MarkdownV2).clone();
bot.dependencies(dptree::deps![adaptor_bot]);
The text was updated successfully, but these errors were encountered:
That is actually a valid thing i never considered, and that will probably require a lot of work to be usable, but that is very fair, and it needs to be testable. I'll think on the implementation
Is your feature request related to a problem? Please describe.
When a handler needs to support a bot that for example throttling, the handler cannot be tested anymore using MockBot, since that initializes a Bot without any adapters.
Describe the solution you'd like
An easy way to enable
Throttle
andParseMode
on aMockBot
.Describe alternatives you've considered
This does seem to fix my test, but it is not very pretty.
The text was updated successfully, but these errors were encountered: