Rapptz / discord-ext-menus

MIT License
234 stars 87 forks source link

Slash commands & menus #42

Closed FeelsBadMan1 closed 3 years ago

FeelsBadMan1 commented 3 years ago

Hello, i created a bot and now want to completly switch from textcommands to slashcommands. everything working now exopect the menus. the bot is adding the reactions but if they become pressed nothing is happening. i not checked anything there and before at the point where i used textcommands it worked. i alredy asked in the slashcommand supportserver but the owner told me that he cant help cause its out of his knowlage. it would be nice if anyone could help me with that....

lgaan commented 3 years ago

It seems like you're describing an external library here? If so, there isn't really anything we can answer with since its not related to the main discord.py library.

It's best you wait for version 2.0 which will release slash command support, you can see progress at https://github.com/Rapptz/discord.py/projects/3

FeelsBadMan1 commented 3 years ago

hmm okey but if i click on the reaction that the bot is adding it gives me this error:

An exception has occurred while executing command `play`:
Traceback (most recent call last):
  File "D:\Downloads\Python\python 3.8.7\lib\site-packages\discord_slash\client.py", line 744, in invoke_command
    await coro
  File "D:\Downloads\Python\python 3.8.7\lib\site-packages\discord_slash\model.py", line 227, in invoke
    return await self.func(self.cog, *args, **kwargs)
  File "D:\my_python_projects\MongoDB Test\Cogs\music.py", line 491, in play
    await ctx.send(f'```ini\nAdded {track.title} to the Queue\n```', delete_after=15)
  File "D:\Downloads\Python\python 3.8.7\lib\site-packages\discord_slash\context.py", line 211, in send
    await self._http.post_initial_response(json_data, self.interaction_id, self.__token)
  File "D:\Downloads\Python\python 3.8.7\lib\site-packages\discord\http.py", line 250, in request
    raise NotFound(r, data)
discord.errors.NotFound: 404 Not Found (error code: 10062): Unknown interaction
lgaan commented 3 years ago

hmm okey but if i click on the reaction that the bot is adding it gives me this error:

An exception has occurred while executing command `play`:
Traceback (most recent call last):
  File "D:\Downloads\Python\python 3.8.7\lib\site-packages\discord_slash\client.py", line 744, in invoke_command
    await coro
  File "D:\Downloads\Python\python 3.8.7\lib\site-packages\discord_slash\model.py", line 227, in invoke
    return await self.func(self.cog, *args, **kwargs)
  File "D:\my_python_projects\MongoDB Test\Cogs\music.py", line 491, in play
    await ctx.send(f'```ini\nAdded {track.title} to the Queue\n```', delete_after=15)
  File "D:\Downloads\Python\python 3.8.7\lib\site-packages\discord_slash\context.py", line 211, in send
    await self._http.post_initial_response(json_data, self.interaction_id, self.__token)
  File "D:\Downloads\Python\python 3.8.7\lib\site-packages\discord\http.py", line 250, in request
    raise NotFound(r, data)
discord.errors.NotFound: 404 Not Found (error code: 10062): Unknown interaction

As the traceback clearly shows, this error originates from the discord_slash module, which as I said is not related to discord.py or discord-ext-menus.