|
12 | 12 | - These work mostly the same, with a few notable changes:
|
13 | 13 | - Your setup function doesn't need to do `bot.add_cog()`. Simply call `MyCog(bot)`, and it'll automatically register itself.
|
14 | 14 | - Extensions already define `self.bot`, you don't need to do that in your `__init__` function.
|
15 |
| - - For a full example, see [here](/Guides/20 Extensions/) |
| 15 | + - For a full example, see [here](/interactions.py/Guides/20 Extensions/) |
16 | 16 |
|
17 | 17 | 4. Event handlers
|
18 | 18 | - Register event handlers with `@interactions.listen`
|
19 | 19 | - Where possible, we use the official names for events, most notably `on_message_create` instead of dpy's `on_message`.
|
20 | 20 | - A full list can be found [here](/interactions.py/API Reference/API Reference/events/discord/).
|
21 | 21 | - Event details are stored on a model, passed as a single parameter. (eg: `on_member_update(before, after)` becomes `on_member_update(event)`, where event has a `.before` and `.after`.
|
22 | 22 | - `on_ready` is called whenever the gateway resumes. If you are looking to run stuff *once* upon startup, use the `on_startup` handler instead.
|
23 |
| - - For more details, read [the Events guide](/Guides/10 Events). |
| 23 | + - For more details, read [the Events guide](/interactions.py/Guides/10 Events). |
24 | 24 |
|
25 | 25 | 5. Migrating your commands
|
26 |
| - - If you were already using dpy's command extension, migrating to slash commands is fairly simple. You just need to convert the decorators as per the [Slash Commands guide](/Guides/03 Creating Commands/) |
27 |
| - - If you wish to keep using prefixed commands (sometimes called message or text-based commands), you can use our prefixed command extension, which has an [extensive guide for them](/Guides/07 Creating Prefixed Commands). The syntax should be very similar to discord.py with a few exceptions. |
| 26 | + - If you were already using dpy's command extension, migrating to slash commands is fairly simple. You just need to convert the decorators as per the [Slash Commands guide](/interactions.py/Guides/03 Creating Commands/) |
| 27 | + - If you wish to keep using prefixed commands (sometimes called message or text-based commands), you can use our prefixed command extension, which has an [extensive guide for them](/interactions.py/Guides/07 Creating Prefixed Commands). The syntax should be very similar to discord.py with a few exceptions. |
28 | 28 | - If you were manually handling commands with `on_message`, you'll probably need to figure it out yourself, as this guide doesn't know how you wrote your parser. Consider using the provided command handlers.
|
29 | 29 |
|
30 | 30 | ???+ Note
|
|
0 commit comments