[3.4] Only check for permissions when check_permissions is True (#5510) (#5511)

(cherry picked from commit 1ecbe6cebb)

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
This commit is contained in:
Red-GitHubBot
2021-12-31 03:03:11 +01:00
committed by GitHub
parent 3045989a5f
commit 7245c778e4

View File

@@ -1258,7 +1258,7 @@ class RedBase(
if (user_setting := await self._config.user(user).embeds()) is not None:
return user_setting
else:
if not channel.permissions_for(channel.guild.me).embed_links:
if check_permissions and not channel.permissions_for(channel.guild.me).embed_links:
return False
if (channel_setting := await self._config.channel(channel).embeds()) is not None: