Gestion erreurs
This commit is contained in:
parent
e5a448118a
commit
6964bcd702
5
run.py
5
run.py
@ -92,8 +92,11 @@ def dogetip(bot, update, args):
|
|||||||
if unit == "doge":
|
if unit == "doge":
|
||||||
response = transaction(update.message.from_user.username, destinataire, montant)
|
response = transaction(update.message.from_user.username, destinataire, montant)
|
||||||
|
|
||||||
|
try:
|
||||||
txid = response['data']['txid']
|
txid = response['data']['txid']
|
||||||
|
except TypeError:
|
||||||
|
message = response
|
||||||
|
else:
|
||||||
message = '🚀 Transaction effectuée 🚀\n\n' \
|
message = '🚀 Transaction effectuée 🚀\n\n' \
|
||||||
+ str(montant) + ' ' + NETWORK + '\n' \
|
+ str(montant) + ' ' + NETWORK + '\n' \
|
||||||
+ '@' + update.message.from_user.username + ' → @' + destinataire + '\n\n' \
|
+ '@' + update.message.from_user.username + ' → @' + destinataire + '\n\n' \
|
||||||
|
Loading…
Reference in New Issue
Block a user