mirror of
https://github.com/RYGhub/royalnet.git
synced 2025-02-17 10:53:57 +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(' ')
|
||||
if len(username) > 1 and g.findusername(username[1]) is not None:
|
||||
voter = g.findid(t['from']['id'])
|
||||
if voter is not None:
|
||||
if voter.alive:
|
||||
voter.votedfor = username[1]
|
||||
g.message("Hai votato per " + username[1] + ".")
|
||||
|
|
Loading…
Add table
Reference in a new issue