Skip to content
This repository has been archived by the owner on Feb 6, 2023. It is now read-only.

DM score check raises an error #8

Open
dudeofawesome opened this issue Aug 7, 2020 · 0 comments
Open

DM score check raises an error #8

dudeofawesome opened this issue Aug 7, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@dudeofawesome
Copy link
Collaborator

dudeofawesome commented Aug 7, 2020

DM to bot with message "/myvirginity" leads to this error in console:

Ignoring exception in command myvirginity:
Traceback (most recent call last):
  File "/home/virginitybot/.local/lib/python3.8/site-packages/discord/ext/commands/core.py", line 83, in wrapped
    ret = await coro(*args, **kwargs)
  File "/home/virginitybot/bot.py", line 87, in myvirginity
    virgin = Virgin.get(guild_id=str(ctx.message.guild.id),
AttributeError: 'NoneType' object has no attribute 'id'

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

Traceback (most recent call last):
  File "/home/virginitybot/.local/lib/python3.8/site-packages/discord/ext/commands/bot.py", line 892, in invoke
    await ctx.command.invoke(ctx)
  File "/home/virginitybot/.local/lib/python3.8/site-packages/discord/ext/commands/core.py", line 797, in invoke
    await injected(*ctx.args, **ctx.kwargs)
  File "/home/virginitybot/.local/lib/python3.8/site-packages/discord/ext/commands/core.py", line 92, in wrapped
    raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'NoneType' object has no attribute 'id'

Not sure what the expected behavior here should be though, since we can't really tell what server the user is asking for the score on. Maybe we send a message asking the user what server?

@dudeofawesome dudeofawesome added the bug Something isn't working label Aug 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant