Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Menuify [p]activemutes command #6266

Merged
merged 3 commits into from
Apr 1, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion redbot/cogs/mutes/mutes.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,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

T_ = i18n.Translator("Mutes", __file__)
Expand Down Expand Up @@ -1169,8 +1170,17 @@ async def activemutes(self, ctx: commands.Context):
else:
msg += "\n"
if msg:
msgs = []
for page in pagify(msg):
await ctx.maybe_send_embed(page)
if await ctx.embed_requested():
msgs.append(
discord.Emebed(
TrustyJAID marked this conversation as resolved.
Show resolved Hide resolved
description=page, colour=await ctx.bot.get_embed_colour(ctx.channel)
TrustyJAID marked this conversation as resolved.
Show resolved Hide resolved
)
)
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