From 75ce67837af59b5518c8321edc4ebfadc896f7c6 Mon Sep 17 00:00:00 2001 From: bobloy Date: Wed, 19 May 2021 06:19:28 -0400 Subject: [PATCH] embedset - fix perm check for subcommands, add missing return (#4962) --- redbot/core/core_commands.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/redbot/core/core_commands.py b/redbot/core/core_commands.py index e6f1caea9..3e91504f0 100644 --- a/redbot/core/core_commands.py +++ b/redbot/core/core_commands.py @@ -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(