mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-24 03:54:20 +00:00
Controllo errori durante /roll
This commit is contained in:
parent
42bb2b380f
commit
819f44836a
1 changed files with 4 additions and 1 deletions
5
bot.py
5
bot.py
|
@ -297,7 +297,10 @@ while True:
|
|||
print("@" + username + ": /roll")
|
||||
cmd = text.split(' ', 1)
|
||||
if len(cmd) >= 2:
|
||||
m = int(cmd[1])
|
||||
try:
|
||||
m = int(cmd[1])
|
||||
except ValueError:
|
||||
telegram.sendmessage(chr(9888) + " Il numero specificato non è un intero.")
|
||||
else:
|
||||
m = 100
|
||||
n = random.randrange(m) + 1
|
||||
|
|
Loading…
Reference in a new issue