Skip to content

Commit 8042f57

Browse files
committed
Allow mods to also paginate other mod commands
1 parent 7cec374 commit 8042f57

File tree

5 files changed

+16
-5
lines changed

5 files changed

+16
-5
lines changed

bot/exts/moderation/alts.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ async def alt_info_command(
159159
empty=True,
160160
max_lines=3,
161161
max_size=1000,
162+
allowed_roles=constants.MODERATION_ROLES,
162163
)
163164

164165
async def cog_check(self, ctx: commands.Context) -> bool:

bot/exts/moderation/infraction/management.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,8 @@ async def send_infraction_list(
421421
prefix=f"{prefix}\n",
422422
empty=True,
423423
max_lines=3,
424-
max_size=1000
424+
max_size=1000,
425+
allowed_roles=constants.MODERATION_ROLES,
425426
)
426427

427428
def infraction_to_string(self, infraction: dict[str, t.Any], ignore_fields: tuple[str, ...]) -> str:

bot/exts/recruitment/talentpool/_cog.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,13 @@ async def show_nominations_list(
330330
title="Talent Pool active nominations",
331331
color=Color.blue()
332332
)
333-
await LinePaginator.paginate(lines, ctx, embed, empty=False)
333+
await LinePaginator.paginate(
334+
lines,
335+
ctx,
336+
embed,
337+
empty=False,
338+
allowed_roles=MODERATION_ROLES,
339+
)
334340

335341
async def list_nominations(
336342
self,
@@ -573,7 +579,8 @@ async def history_command(self, ctx: Context, user: MemberOrUser) -> None:
573579
embed=embed,
574580
empty=True,
575581
max_lines=3,
576-
max_size=1000
582+
max_size=1000,
583+
allowed_roles=MODERATION_ROLES,
577584
)
578585

579586
@nomination_group.command(name="end", aliases=("unwatch", "unnominate"), root_aliases=("unnominate",))

bot/exts/utils/reminders.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,8 @@ async def list_reminders(self, ctx: Context) -> None:
574574

575575
await LinePaginator.paginate(
576576
lines,
577-
ctx, embed,
577+
ctx,
578+
embed,
578579
max_lines=3,
579580
)
580581

bot/exts/utils/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,8 @@ async def snowflake(self, ctx: Context, *snowflakes: Snowflake) -> None:
221221
ctx=ctx,
222222
embed=embed,
223223
max_lines=5,
224-
max_size=1000
224+
max_size=1000,
225+
allowed_roles=MODERATION_ROLES,
225226
)
226227

227228
@command(aliases=("poll",))

0 commit comments

Comments
 (0)