You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As title. This is the exception. It fires on most commands.
Ignoring exception in on_slash_command
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/disnake/client.py", line 612, in _run_event
await coro(*args, **kwargs)
File "./bot.py", line 147, in on_slash_command
f"Executed {interaction.data.name} command in {interaction.guild.name} (ID: {interaction.guild.id}) by {interaction.author} (ID: {interaction.author.id})")
AttributeError: 'NoneType' object has no attribute 'name'
This error does not appear in channels. The f-string renders properly there.
So... either interaction.guild or interaction.data is returning NoneType I guess. Idk.
Good work! This error gets ignored and the bot continues working just fine.
The text was updated successfully, but these errors were encountered:
Yeah that is my bad, when initially creating the template with slash commands I thought they were only available in guilds and not private messages. That's why interaction.guild will be None, there is no guild in the interaction object.
I will edit that and add a simple check to that hopefully in the coming days.
As title. This is the exception. It fires on most commands.
Ignoring exception in on_slash_command
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/disnake/client.py", line 612, in _run_event
await coro(*args, **kwargs)
File "./bot.py", line 147, in on_slash_command
f"Executed {interaction.data.name} command in {interaction.guild.name} (ID: {interaction.guild.id}) by {interaction.author} (ID: {interaction.author.id})")
AttributeError: 'NoneType' object has no attribute 'name'
This error does not appear in channels. The f-string renders properly there.
So... either interaction.guild or interaction.data is returning NoneType I guess. Idk.
Good work! This error gets ignored and the bot continues working just fine.
The text was updated successfully, but these errors were encountered: