File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -121,10 +121,20 @@ def get_cog_commands(self, cog: commands.Cog):
121121 self .commands [x .name ] = x
122122 else :
123123 if x .base in self .commands :
124+ base_command = self .commands [x .base ]
124125 for i in x .allowed_guild_ids :
125- if i not in self .commands [x .base ].allowed_guild_ids :
126- self .commands [x .base ].allowed_guild_ids .append (i )
126+ if i not in base_command .allowed_guild_ids :
127+ base_command .allowed_guild_ids .append (i )
128+
129+ base_permissions = x .base_command_data ["api_permissions" ]
130+ if base_permissions :
131+ for applicable_guild in base_permissions :
132+ if applicable_guild not in base_command .permissions :
133+ base_command .permissions [applicable_guild ] = []
134+ base_command .permissions [applicable_guild ].extend (base_permissions [applicable_guild ])
135+
127136 self .commands [x .base ].has_subcommands = True
137+
128138 else :
129139 self .commands [x .base ] = model .BaseCommandObject (x .base , x .base_command_data )
130140 if x .base not in self .subcommands :
You can’t perform that action at this time.
0 commit comments