#Slash commands in cogs?!

1 messages · Page 1 of 1 (latest)

eternal jewel
#

Hi, so I tried making slash commands in cogs. They show no error, but when I try to use it, they dont show up. I tried debug_guild and also left it running for 10 mins. I still cant see the command...

lilac turtle
#

it takes guild_ids=[]

#

debug_guilds should be in the bot = commands.Bot in your main file i think

#

(also dont think @discord.slash_command is a thing, in the example its listed as @commands.slash_command (using the import))

eternal jewel
#

ok

#

I dont know how

stark phoenix
#

Hey, look in the example directory

#

Here you are

#

You can check the example

#

Hope it is helpful

eternal jewel
#

@stark phoenix @lilac turtle

So I actually made a petty mistake. I used client variable above, but in the setup part, I used the bot variable.

But in the end, @discord.slash_command worked? I dont know how

stark phoenix
#

So, have it fixed?

eternal jewel
#

Yes, @stark phoenix thanks so much!