There are several functions and modules in the helper directory that gets passed down the bot. In the end, the helper function even sends out messages via the bot.
I suggest to remove all occurrences of the bot from any helper function and let the bot functions only get called inside the handler functions. This way, the code can be even more DRY and would allow reuse of existing functions.
For example, currently the inline_query can not use the "message formating feature" of the sendDepartureMessage, because it automatically sends out a message which.
There are several functions and modules in the helper directory that gets passed down the
bot. In the end, the helper function even sends out messages via the bot.I suggest to remove all occurrences of the
botfrom any helper function and let thebotfunctions only get called inside thehandlerfunctions. This way, the code can be even more DRY and would allow reuse of existing functions.For example, currently the
inline_querycan not use the "message formating feature" of thesendDepartureMessage, because it automatically sends out a message which.