DeJay
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
2 deletions
-
docs/bot_tutorial/building_block_listeners.md
|
|
@ -16,7 +16,7 @@ Change the `'EventName'` in the `.listen()` method to the event name you want to |
|
|
|
|
|
|
|
This listener will listen for a new message and will reply with the exact same message every time. |
|
|
|
```py |
|
|
|
@Plugin.listen('MesageCreate') |
|
|
|
@Plugin.listen('MessageCreate') |
|
|
|
def on_message_create(self, event): |
|
|
|
event.reply(event.message.content) |
|
|
|
``` |
|
|
@ -37,7 +37,7 @@ These are all the listeners we created in this tutorial: |
|
|
|
|
|
|
|
```py |
|
|
|
class MyPlugin(Plugin): |
|
|
|
@Plugin.listen('MesageCreate') |
|
|
|
@Plugin.listen('MessageCreate') |
|
|
|
def on_message_create(self, event): |
|
|
|
event.reply(event.message.content) |
|
|
|
|
|
|
|