Update 'dogetipbot_telegram.py'
This commit is contained in:
parent
9fa9fd3215
commit
e1b7b838a2
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user