We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e4c592f commit e5b4311Copy full SHA for e5b4311
README.md
@@ -22,7 +22,7 @@ async def _test(ctx: SlashContext):
22
bot.run("discord_token")
23
```
24
25
-Cog:
+Cog(Not Recommended):
26
```py
27
import discord
28
from discord.ext import commands
@@ -36,6 +36,8 @@ class Slash(commands.Cog):
36
self.slash = SlashCommand(bot, override_type=True)
37
# Cog is only supported by commands ext, so just skip checking type.
38
39
+ # Make sure all commands should be inside `__init__`
40
+ # or some other functions that can put commands.
41
@self.slash.slash(name="test")
42
async def _test(ctx: SlashContext):
43
await ctx.send(content="Hello, World!")
0 commit comments