mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-30 15:04:18 +00:00
Sistemato un crash
Traceback (most recent call last): File "mifia.py", line 382, in <module> if voter.alive: AttributeError: 'NoneType' object has no attribute 'alive' Partita -1001042610127 eliminata.
This commit is contained in:
parent
c0a6ddd157
commit
264d955fac
1 changed files with 7 additions and 6 deletions
1
mifia.py
1
mifia.py
|
@ -379,6 +379,7 @@ while True:
|
||||||
username = t['text'].split(' ')
|
username = t['text'].split(' ')
|
||||||
if len(username) > 1 and g.findusername(username[1]) is not None:
|
if len(username) > 1 and g.findusername(username[1]) is not None:
|
||||||
voter = g.findid(t['from']['id'])
|
voter = g.findid(t['from']['id'])
|
||||||
|
if voter is not None:
|
||||||
if voter.alive:
|
if voter.alive:
|
||||||
voter.votedfor = username[1]
|
voter.votedfor = username[1]
|
||||||
g.message("Hai votato per " + username[1] + ".")
|
g.message("Hai votato per " + username[1] + ".")
|
||||||
|
|
Loading…
Reference in a new issue