mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-07-01 07:40:07 +00:00
Fix crashing when an unhandled event occurs.
This commit is contained in:
parent
80587fc1e9
commit
6694df268c
@ -370,7 +370,7 @@ class Client:
|
|||||||
func = getattr(self.connection, parser)
|
func = getattr(self.connection, parser)
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
log.info('Unhandled event {}'.format(event))
|
log.info('Unhandled event {}'.format(event))
|
||||||
|
else:
|
||||||
result = func(data)
|
result = func(data)
|
||||||
if asyncio.iscoroutine(result):
|
if asyncio.iscoroutine(result):
|
||||||
utils.create_task(result, loop=self.loop)
|
utils.create_task(result, loop=self.loop)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user