Menuify [p]activemutes command (#6266)

This commit is contained in:
TrustyJAID 2024-03-31 18:06:38 -06:00 committed by GitHub
parent 463f0c5e6d
commit ad9e00d1d9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -19,6 +19,7 @@ from redbot.core.utils.chat_formatting import (
) )
from redbot.core.utils.mod import get_audit_reason from redbot.core.utils.mod import get_audit_reason
from redbot.core.utils.menus import start_adding_reactions 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 redbot.core.utils.predicates import MessagePredicate, ReactionPredicate
from .converters import MuteTime from .converters import MuteTime
@ -1102,8 +1103,13 @@ class Mutes(VoiceMutes, commands.Cog, metaclass=CompositeMetaClass):
msg += "\n" msg += "\n"
if msg: if msg:
msgs = []
for page in pagify(msg): 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 return
await ctx.maybe_send_embed(_("There are no mutes on this server right now.")) await ctx.maybe_send_embed(_("There are no mutes on this server right now."))