#Command decorators don't work subclassing
1 messages · Page 1 of 1 (latest)
I also tried
class MyBot(discord.Bot):
@slash_command
async def hw(self, ctx):
await ctx.send("Hello world!")
which should work according to https://guide.pycord.dev/popular-topics/subclassing-bots#basic-example
but it also gives slash_command is not defined
Subclassing is a popular way of creating Discord Bots. Explore how you can create a Discord bot by subclassing.
Do you know what the solution would be?
If I find it I'll make a pull request to fix the guide also
construct the bot class and add a command like usual with the @bot.command() decorator