all repos — python-meme-bot @ 66e9fbf4c57a874e0086817317d20aa7e3313d34

Telegram Bot that uses PIL to compute light image processing.

update dependencies
BiRabittoh andronacomarco@gmail.com
Thu, 30 May 2024 23:06:22 +0200
commit

66e9fbf4c57a874e0086817317d20aa7e3313d34

parent

14b60490cbc0253e75af3eca694ddbb97ca2f5c0

2 files changed, 3 insertions(+), 5 deletions(-)

jump to
M main.pymain.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))