From e1b7b838a2863cb88f034ebed2fd74e1971bc962 Mon Sep 17 00:00:00 2001 From: nyanloutre Date: Tue, 13 Jun 2023 16:53:36 +0200 Subject: [PATCH] Update 'dogetipbot_telegram.py' --- dogetipbot_telegram.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dogetipbot_telegram.py b/dogetipbot_telegram.py index 8a76d5a..fb3a9ed 100755 --- a/dogetipbot_telegram.py +++ b/dogetipbot_telegram.py @@ -229,12 +229,12 @@ async def dogetip(update: Update, context: CallbackContext): async def register(update: Update, context: CallbackContext): query = SESSION.query(User).filter_by(name=update.message.from_user.username) if query.count() > 0: - update.message.reply_text("Vous avez déjà un compte") + await update.message.reply_text("Vous avez déjà un compte") else: user = User(name=update.message.from_user.username) SESSION.add(user) SESSION.commit() - update.message.reply_text(get_user(update.message.from_user.username).address) + await update.message.reply_text(get_user(update.message.from_user.username).address) async def infos(update: Update, context: CallbackContext): @@ -244,14 +244,14 @@ async def infos(update: Update, context: CallbackContext): update.message.from_user.username ).balance except NoAccountError as e: - update.message.reply_text( + await update.message.reply_text( "Vous n'avez pas de compte @" + str(e) + "\n\n" + "Utilisez /register pour démarrer" ) else: - update.message.reply_text( + await update.message.reply_text( address + "\n\n" + str(balance / 100000000) @@ -294,7 +294,7 @@ async def users(update: Update, context: CallbackContext): reply += ( f"\n{repr(user)}\thttps://blockchair.com/dogecoin/address/{user.address}" ) - update.message.reply_text(reply) + await update.message.reply_text(reply) # Telegram initialisation