update dependencies
BiRabittoh andronacomarco@gmail.com
Thu, 30 May 2024 23:06:22 +0200
2 files changed,
3 insertions(+),
5 deletions(-)
M
main.py
→
main.py
@@ -368,13 +368,11 @@ return await query.answer()
def main(): + token = os.getenv("token") pers = PersistenceInput(bot_data=False, callback_data=False) - - application = ApplicationBuilder() - application.token(os.getenv("token")) - application.persistence(PicklePersistence(filepath='bot-data.pkl', store_data=pers)) + persistence = PicklePersistence(filepath='bot-data.pkl', store_data=pers) - application = application.build() + application = ApplicationBuilder().token(token).persistence(persistence).build() application.add_error_handler(error_callback) application.add_handler(CallbackQueryHandler(callback=keyboard_handler))