From 66fe981ea89b4352bab63eddd876362eb71471bd Mon Sep 17 00:00:00 2001 From: Ben Armstrong Date: Wed, 10 May 2023 12:11:20 -0300 Subject: [PATCH] Include vendored menus update for guild attribute (#6139) --- redbot/vendored/discord/ext/menus/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redbot/vendored/discord/ext/menus/__init__.py b/redbot/vendored/discord/ext/menus/__init__.py index c0a86f8e3..661433ed9 100644 --- a/redbot/vendored/discord/ext/menus/__init__.py +++ b/redbot/vendored/discord/ext/menus/__init__.py @@ -702,7 +702,7 @@ class Menu(metaclass=_MenuMeta): self.ctx = ctx self._author_id = ctx.author.id channel = channel or ctx.channel - me = channel.guild.me if hasattr(channel, 'guild') else ctx.bot.user + me = channel.guild.me if getattr(channel, 'guild', None) else ctx.bot.user permissions = channel.permissions_for(me) self.__me = discord.Object(id=me.id) self._verify_permissions(ctx, channel, permissions)