Add error handling to 'status' command
parent
0a6853964f
commit
ebc9d65e41
|
@ -118,6 +118,7 @@ if (Access ==1) or (isDM == 1):
|
|||
else:
|
||||
message = 'Usage "demote <member_name>"'
|
||||
elif text[0] == 'status':
|
||||
if len(text) > 1:
|
||||
record = guild.info(text[1])
|
||||
if record:
|
||||
if len(text)==3:
|
||||
|
@ -132,6 +133,8 @@ if (Access ==1) or (isDM == 1):
|
|||
message = 'Current status for %s is %s.\nTo change use "status %s <status>" where status is one of %s.' %(text[1],record['Status'],text[1],status)
|
||||
else:
|
||||
message = '%s is not a member' %text[1]
|
||||
else:
|
||||
message = "Say status <member> to query the member's status."
|
||||
elif text[0] == 'add' and isDM:
|
||||
if len(text)==2:
|
||||
if log.info(text[1]):
|
||||
|
|
Loading…
Reference in New Issue