diff options
author | 2020-03-23 19:31:23 +0100 | |
---|---|---|
committer | 2020-03-23 19:31:23 +0100 | |
commit | 79376abcb7d305484bf5283f95d3a32641aeb6d5 (patch) | |
tree | 659d6fa3f5b5655531ea8909f07571bec1c0c92d /bot/bot.py | |
parent | Deseasonify: remove `load_extensions` method (diff) |
Deseasonify: abdicate responsibility to wait until bot is ready
The wrapper will no longer wait for the bot to be ready before it calls
the wrapped function for the first time. If the function requires the
bot's cache to be ready, it is responsible for awaiting the method
itself.
This removes the need to acquire a reference to the bot instance inside
the decorator, which seems to be difficult to do cleanly.
As Mark adds, this may in fact be safer as the bot may temporarily
disconnect while the task is active, and awaiting the bot's
ready status every time will prevent issues in such a situation.
Co-authored-by: MarkKoz <[email protected]>
Diffstat (limited to 'bot/bot.py')
0 files changed, 0 insertions, 0 deletions