From 1e60d1c2652ea432cfc645c93bcc35fa08afb441 Mon Sep 17 00:00:00 2001 From: Michael H Date: Thu, 10 May 2018 18:35:18 -0400 Subject: [PATCH] [V3] adds a permissions check for embed_links in ctx.embed_requested (#1619) --- redbot/core/context.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/redbot/core/context.py b/redbot/core/context.py index 83b35ec37..94886a65e 100644 --- a/redbot/core/context.py +++ b/redbot/core/context.py @@ -128,12 +128,15 @@ class RedContext(commands.Context): async def embed_requested(self): """ Simple helper to call bot.embed_requested + with logic around if embed permissions are available Returns ------- bool: :code:`True` if an embed is requested """ + if self.guild and not self.channel.permissions_for(self.guild.me).embed_links: + return False return await self.bot.embed_requested( self.channel, self.author, command=self.command )