Gestion erreurs
This commit is contained in:
parent
e5a448118a
commit
6964bcd702
1 changed files with 9 additions and 6 deletions
5
run.py
5
run.py
|
@ -92,8 +92,11 @@ def dogetip(bot, update, args):
|
|||
if unit == "doge":
|
||||
response = transaction(update.message.from_user.username, destinataire, montant)
|
||||
|
||||
try:
|
||||
txid = response['data']['txid']
|
||||
|
||||
except TypeError:
|
||||
message = response
|
||||
else:
|
||||
message = '🚀 Transaction effectuée 🚀\n\n' \
|
||||
+ str(montant) + ' ' + NETWORK + '\n' \
|
||||
+ '@' + update.message.from_user.username + ' → @' + destinataire + '\n\n' \
|
||||
|
|
Loading…
Add table
Reference in a new issue