mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 03:08:55 -05:00
embedset - fix perm check for subcommands, add missing return (#4962)
This commit is contained in:
parent
c83eae931b
commit
75ce67837a
@ -1268,7 +1268,7 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic):
|
||||
|
||||
def _check_if_command_requires_embed_links(self, command_obj: commands.Command) -> None:
|
||||
for command in itertools.chain((command_obj,), command_obj.parents):
|
||||
if command_obj.requires.bot_perms.embed_links:
|
||||
if command.requires.bot_perms.embed_links:
|
||||
# a slight abuse of this exception to save myself two lines later...
|
||||
raise commands.UserFeedbackCheckFailure(
|
||||
_(
|
||||
@ -1434,6 +1434,7 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic):
|
||||
if enabled is None:
|
||||
await self.bot._config.user(ctx.author).embeds.clear()
|
||||
await ctx.send(_("Embeds will now fall back to the global setting."))
|
||||
return
|
||||
|
||||
await self.bot._config.user(ctx.author).embeds.set(enabled)
|
||||
await ctx.send(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user