|
@ -763,21 +763,14 @@ class Client: |
|
|
|
|
|
|
|
|
The events must be a |corourl|_, if not, :exc:`ClientException` is raised. |
|
|
The events must be a |corourl|_, if not, :exc:`ClientException` is raised. |
|
|
|
|
|
|
|
|
Examples |
|
|
Example |
|
|
--------- |
|
|
--------- |
|
|
|
|
|
|
|
|
Using the basic :meth:`event` decorator: :: |
|
|
:: |
|
|
|
|
|
|
|
|
@client.event |
|
|
@client.event |
|
|
async def on_ready(): |
|
|
async def on_ready(): |
|
|
print('Ready!') |
|
|
print('Ready!') |
|
|
|
|
|
|
|
|
Saving characters by using the :meth:`async_event` decorator: :: |
|
|
|
|
|
|
|
|
|
|
|
@client.async_event |
|
|
|
|
|
def on_ready(): |
|
|
|
|
|
print('Ready!') |
|
|
|
|
|
|
|
|
|
|
|
""" |
|
|
""" |
|
|
|
|
|
|
|
|
if not asyncio.iscoroutinefunction(coro): |
|
|
if not asyncio.iscoroutinefunction(coro): |
|
|