I expected a clear error (inheriting from DiscordException at least) as to why the command failed.
Actual Results
A NameError lacking any context as to why the error occurred is shown.
Full Traceback:
File "<virtual env>/lib/python3.12/site-packages/discord/client.py", line 766, in run
return future.result()
^^^^^^^^^^^^^^^
File "<virtual env>/lib/python3.12/site-packages/discord/client.py", line 745, in runner
await self.start(*args, **kwargs)
File "<virtual env>/lib/python3.12/site-packages/discord/client.py", line 709, in start
await self.connect(reconnect=reconnect)
File "<virtual env>/lib/python3.12/site-packages/discord/client.py", line 601, in connect
await self.ws.poll_event()
File "<virtual env>/lib/python3.12/site-packages/discord/gateway.py", line 605, in poll_event
await self.received_message(msg.data)
File "<virtual env>/lib/python3.12/site-packages/discord/gateway.py", line 555, in received_message
func(data)
File "<virtual env>/lib/python3.12/site-packages/discord/state.py", line 818, in parse_interaction_create
interaction = Interaction(data=data, state=self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<virtual env>/lib/python3.12/site-packages/discord/interactions.py", line 171, in __init__
self._from_data(data)
File "<virtual env>/lib/python3.12/site-packages/discord/interactions.py", line 201, in _from_data
self._guild = Guild(data=self._guild_data, state=self)
^^^^^
NameError: name 'Guild' is not defined. Did you mean: 'guild'?
Intents
3243773
System Information
macOS 14.5 (Darwin 23.5.0, arm64)
Python 3.12.3
Checklist
[X] I have searched the open issues for duplicates.
[X] I have shown the entire traceback, if possible.
[X] I have removed my token from display, if visible.
Summary
When a client runs an application command without there being a bot in the server, Pycord crashes with an unclear exception.
Reproduction Steps
Minimal Reproducible Code
Expected Results
I expected a clear error (inheriting from
DiscordException
at least) as to why the command failed.Actual Results
A
NameError
lacking any context as to why the error occurred is shown.Full Traceback:
Intents
3243773
System Information
macOS 14.5 (Darwin 23.5.0, arm64) Python 3.12.3
Checklist
Additional Context
No response