coffincw / UMass-STEM-Discord-Bot

Discord bot for role functionality and generating UMass CS memes on the UMass STEM Discord
MIT License
6 stars 6 forks source link

AttributeError bug 'NoneType' object has no attribute 'id' when attempting to use the $get command #81

Open coffincw opened 3 years ago

coffincw commented 3 years ago
Ignoring exception in command get:
Traceback (most recent call last):
File "/app/.heroku/python/lib/python3.6/site-packages/discord/ext/commands/core.py", line 85, in wrapped
ret = await coro(*args, **kwargs)
File "src/umassstembot/bot.py", line 485, in get_role
if ctx.guild.id == 387465995176116224:
AttributeError: 'NoneType' object has no attribute 'id'

The above exception was the direct cause of the following exception: 

Traceback (most recent call last):
File "/app/.heroku/python/lib/python3.6/site-packages/discord/ext/commands/bot.py", line 903, in invoke
await ctx.command.invoke(ctx)
File "/app/.heroku/python/lib/python3.6/site-packages/discord/ext/commands/core.py", line 859, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "/app/.heroku/python/lib/python3.6/site-packages/discord/ext/commands/core.py", line 94, in wrapped
raise CommandInvokeError(exc) from exc 
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'NoneType' object has no attribute 'id'