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

Strange library error when using some slash commands #170

Closed
3 tasks done
randomairborne opened this issue Sep 11, 2021 · 3 comments
Closed
3 tasks done

Strange library error when using some slash commands #170

randomairborne opened this issue Sep 11, 2021 · 3 comments
Labels
unconfirmed bug A bug report that needs triaging

Comments

@randomairborne
Copy link

randomairborne commented Sep 11, 2021

Summary

Random error with slash commands

Reproduction Steps

ran https://github.com/GlaceonBot/Sylveon with default settings
Tried to run /hug
Noted error

Minimal Reproducible Code

see https://github.com/GlaceonBot/Sylveon/blob/master/bot.py#L78 to line 99

Expected Results

I expected the command to complete correctly, as there don't seem to be issues with the bot code

Actual Results

Nothing, the command failed and i got a traceback

Ignoring exception in on_interaction
Traceback (most recent call last):
  File "/home/Glaceon/Sylveon/venv/lib/python3.9/site-packages/discord/client.py", line 351, in _run_event
    await coro(*args, **kwargs)
  File "/home/Glaceon/Sylveon/venv/lib/python3.9/site-packages/discord/bot.py", line 373, in on_interaction
    await self.handle_interaction(interaction)
  File "/home/Glaceon/Sylveon/venv/lib/python3.9/site-packages/discord/bot.py", line 248, in handle_interaction
    await command.invoke(context)
  File "/home/Glaceon/Sylveon/venv/lib/python3.9/site-packages/discord/app/commands.py", line 154, in invoke
    arg = await get_or_fetch(ctx.guild, name, int(arg))
  File "/home/Glaceon/Sylveon/venv/lib/python3.9/site-packages/discord/utils.py", line 453, in get_or_fetch
    getter = getattr(obj, f'get_{attr}')(id)
AttributeError: 'NoneType' object has no attribute 'get_member'

Intents

discord.Intents.none()

System Information

  • Python v3.9.2-final
  • pycord v2.0.0-alpha
    • pycord pkg_resources: v2.0.0a3840+ge6226504
  • aiohttp v3.7.4.post0
  • system info: Linux 5.10.0-8-amd64 Update README.rst #1 SMP Debian 5.10.46-4 (2021-08-03)

Checklist

  • I have searched the open issues for duplicates.
  • I have shown the entire traceback, if possible.
  • I have removed my token from display, if visible.

Additional Context

Sometimes this is fixed by restarting the bot, but then a few hours later it crops up on a different command.

@izxxr
Copy link
Contributor

izxxr commented Sep 11, 2021

Did you run the command in a DM channel?

@CodeWithSwastik CodeWithSwastik added the unconfirmed bug A bug report that needs triaging label Sep 11, 2021
@randomairborne
Copy link
Author

No, this is in a normal channel

@Makiyu-py
Copy link
Contributor

Cannot reproduce anymore, closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
unconfirmed bug A bug report that needs triaging
Projects
None yet
Development

No branches or pull requests

4 participants