#Slash commands not appearing

1 messages · Page 1 of 1 (latest)

olive moat
#

I was trying to make a slash command for my bot but the commands only appear when I create them in the main file. In the cog files they seem to be ignored.

import discord.commands

from Package.base import *


class Testing(commands.Cog):

    def __init__(self, bot):
        self.bot = bot

    # copied from https://guide.pycord.dev/popular-topics/cogs  |  'name' and 'guild_ids' has been added
    @discord.slash_command(name="goodbye", guild_ids=[1057048135106572319])  # we can also add application commands
    async def goodbye(self, ctx):
        await ctx.respond('Goodbye!')


def setup(bot):
    bot.add_cog(Testing(bot))


#

There is also no error in the console

alpine frigate
#

.slashnoshow

steep wolfBOT
#

Checklist for Application Commands Not Showing Up:
• Does your bot have the application.commands scope?
• Are you loading cogs before on_ready and on_connect?
• Is on_connect not overridden?
• Did you update to the newest version of py-cord (tag: install)?
• Is User Settings > Accessibility > Chat Input > Use legacy chat input turned off?
• Did you share your code and errors?
• Do you still have libraries that conflict with the discord namespace (e.g. discord.py)?

olive moat
#

thanks