zeusops / operationbot

A bot for handling events on the Zeusops discord server
GNU General Public License v3.0
7 stars 4 forks source link

Trying to remove a non-existent signup causes an error #59

Closed Gehock closed 3 years ago

Gehock commented 3 years ago

!removesignup 0 Gehock

Unexpected error occured: 'NoneType' object has no attribute 'displayName'

Event.undoSignup returns a None that isn't handled properly in CommandListener.removesignup

Traceback (most recent call last):
  File "operationbot/venv/lib/python3.8/site-packages/discord/ext/commands/core.py", line 85, in wrapped
    ret = await coro(*args, **kwargs)
  File "operationbot/commandListener.py", line 743, in removesignup
    if role.displayName:
AttributeError: 'NoneType' object has no attribute 'displayName'