Closed l-404-l closed 5 months ago
Unable to get global slash commands from bot dm channel
Call channel.slash_commands() in a DM channel
import discord class MyClient(discord.Client): def __init__(self): super().__init__(chunk_guilds_at_startup=False, max_messages=1) async def on_ready(self): print(f'Logged in as {self.user} (ID: {self.user.id})') print('------') channel = self.get_channel(DM_ID) # DM Channel ID async for cmd in channel.slash_commands(): # Returns no slash commands ATM print(cmd) channel = self.get_channel(GUILD_ID) # Guild Channel ID async for cmd in channel.slash_commands(): print(cmd) client = MyClient() client.run('token')
It to return all global commands from the bot.
Returns just the application with no commands.
Already made a pull request that fixes this bug. Maybe there is a better way of doing so but already tested and works the way its supposed to. https://github.com/dolfies/discord.py-self/pull/644
Should be fixed!
Summary
Unable to get global slash commands from bot dm channel
Reproduction Steps
Call channel.slash_commands() in a DM channel
Code
Expected Results
It to return all global commands from the bot.
Actual Results
Returns just the application with no commands.
System Information
Checklist
Additional Information
Already made a pull request that fixes this bug. Maybe there is a better way of doing so but already tested and works the way its supposed to. https://github.com/dolfies/discord.py-self/pull/644