mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18:54 -05:00
* Make Requires.verify() wait until rules are loaded Also ensures `Requires` objects are reset when unloaded, particularly in case a `Command` object manages to stay in memory between cog unload and load, and its permissions rules change between those events. Also, this PR re-ordered some of the event loop policy stuff, because it was required that the event loop policy be set before creating any `Requires` objects. This may or may not have an effect on other `get_event_loop()` calls elsewhere (either in our code, a dependency's, or asyncio's). Either way, these effects would be a *correction*, and any bugs that arise from it are likely to have been occurring silently beforehand. Signed-off-by: Toby Harradine <tobyharradine@gmail.com> * Remove calls to `remove_listener()` in permissions Signed-off-by: Toby Harradine <tobyharradine@gmail.com> * Fix adding rules for permissions cog/commands itself Also addresses feedback Signed-off-by: Toby Harradine <tobyharradine@gmail.com> * Clean up indentation when setting uvloop policy Signed-off-by: Toby Harradine <tobyharradine@gmail.com> * Use `set(walk_commands())` to traverse `Group` subcommands Signed-off-by: Toby Harradine <tobyharradine@gmail.com>