Preparations for d.py 1.4 (includes breaking changes related to mass mentions) (#3845)

Co-authored-by: PredaaA <46051820+PredaaA@users.noreply.github.com>
This commit is contained in:
jack1142
2020-08-10 21:19:00 +02:00
committed by GitHub
parent 7707c862d1
commit 05ef5fa3a6
8 changed files with 28 additions and 25 deletions

View File

@@ -181,6 +181,9 @@ class RedBase(
if "command_not_found" not in kwargs:
kwargs["command_not_found"] = "Command {} not found.\n{}"
if "allowed_mentions" not in kwargs:
kwargs["allowed_mentions"] = discord.AllowedMentions(everyone=False, roles=False)
message_cache_size = cli_flags.message_cache_size
if cli_flags.no_message_cache:
message_cache_size = None
@@ -1261,7 +1264,7 @@ class RedBase(
if permissions_not_loaded:
command.requires.ready_event.set()
if isinstance(command, commands.Group):
for subcommand in set(command.walk_commands()):
for subcommand in command.walk_commands():
self.dispatch("command_add", subcommand)
if permissions_not_loaded:
subcommand.requires.ready_event.set()
@@ -1275,7 +1278,7 @@ class RedBase(
return
command.requires.reset()
if isinstance(command, commands.Group):
for subcommand in set(command.walk_commands()):
for subcommand in command.walk_commands():
subcommand.requires.reset()
def clear_permission_rules(self, guild_id: Optional[int], **kwargs) -> None: