Skip to content

Commit

Permalink
Menuify [p]activemutes command (#6266)
Browse files Browse the repository at this point in the history
  • Loading branch information
TrustyJAID authored Apr 1, 2024
1 parent 463f0c5 commit ad9e00d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion redbot/cogs/mutes/mutes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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."))

Expand Down

0 comments on commit ad9e00d

Please sign in to comment.