Skip to content

Commit e5b4311

Browse files
committed
Update README.md
1 parent e4c592f commit e5b4311

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ async def _test(ctx: SlashContext):
2222
bot.run("discord_token")
2323
```
2424

25-
Cog:
25+
Cog(Not Recommended):
2626
```py
2727
import discord
2828
from discord.ext import commands
@@ -36,6 +36,8 @@ class Slash(commands.Cog):
3636
self.slash = SlashCommand(bot, override_type=True)
3737
# Cog is only supported by commands ext, so just skip checking type.
3838

39+
# Make sure all commands should be inside `__init__`
40+
# or some other functions that can put commands.
3941
@self.slash.slash(name="test")
4042
async def _test(ctx: SlashContext):
4143
await ctx.send(content="Hello, World!")

0 commit comments

Comments
 (0)