Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When creating a new CTF, check if a CTF with the same name already exists #50

Open
mklarz opened this issue Apr 16, 2021 · 0 comments
Open
Labels
bug Something isn't working

Comments

@mklarz
Copy link
Contributor

mklarz commented Apr 16, 2021

The bot errors out a CTF with the same name exists, should perhaps be unique in the DB as well? Append a number to the CTF name?

2021-04-16 13:09:10,309:ERROR:bot: Ignoring exception in command create
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/discord/ext/commands/core.py", line 85, in wrapped
    ret = await coro(*args, **kwargs)
  File "/home/bot/ctfs.py", line 39, in create
    messages = await respond_with_reaction(
  File "/home/bot/ctfs.py", line 332, in respond_with_reaction
    msg = await chan.send(msg)
AttributeError: 'NoneType' object has no attribute 'send'

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

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/discord/ext/commands/bot.py", line 903, in invoke
    await ctx.command.invoke(ctx)
  File "/usr/local/lib/python3.9/site-packages/discord/ext/commands/core.py", line 859, in invoke
    await injected(*ctx.args, **ctx.kwargs)
  File "/usr/local/lib/python3.9/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 'send'
2021-04-16 13:09:10,312:INFO:bot: Error occured with: create
Command raised an exception: AttributeError: 'NoneType' object has no attribute 'send'
@mklarz mklarz added the bug Something isn't working label Apr 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant