From ad9e00d1d9e040ff19a4425f26b7cbadb2e2fef6 Mon Sep 17 00:00:00 2001 From: TrustyJAID Date: Sun, 31 Mar 2024 18:06:38 -0600 Subject: [PATCH] Menuify `[p]activemutes` command (#6266) --- redbot/cogs/mutes/mutes.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/redbot/cogs/mutes/mutes.py b/redbot/cogs/mutes/mutes.py index f103fc94d56..77607cd150b 100644 --- a/redbot/cogs/mutes/mutes.py +++ b/redbot/cogs/mutes/mutes.py @@ -19,6 +19,7 @@ ) from redbot.core.utils.mod import get_audit_reason from redbot.core.utils.menus import start_adding_reactions +from redbot.core.utils.views import SimpleMenu from redbot.core.utils.predicates import MessagePredicate, ReactionPredicate from .converters import MuteTime @@ -1102,8 +1103,13 @@ async def activemutes(self, ctx: commands.Context): msg += "\n" if msg: + msgs = [] for page in pagify(msg): - await ctx.maybe_send_embed(page) + if await ctx.embed_requested(): + msgs.append(discord.Embed(description=page, colour=await ctx.embed_colour())) + else: + msgs.append(page) + await SimpleMenu(msgs).start(ctx) return await ctx.maybe_send_embed(_("There are no mutes on this server right now."))