Only check for permissions when check_permissions is True (#5510)

This commit is contained in:
jack1142 2021-12-31 02:51:06 +01:00 committed by GitHub
parent a787033e1d
commit 1ecbe6cebb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1246,7 +1246,7 @@ class Red(
if (user_setting := await self._config.user(user).embeds()) is not None: if (user_setting := await self._config.user(user).embeds()) is not None:
return user_setting return user_setting
else: 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 return False
if (channel_setting := await self._config.channel(channel).embeds()) is not None: if (channel_setting := await self._config.channel(channel).embeds()) is not None: