|
26 | 26 | from core.changelog import Changelog |
27 | 27 | from core.decorators import trigger_typing |
28 | 28 | from core.models import InvalidConfigError, PermissionLevel |
29 | | -from core.paginator import PaginatorSession, MessagePaginatorSession |
| 29 | +from core.paginator import EmbedPaginatorSession, MessagePaginatorSession |
30 | 30 | from core.utils import ( |
31 | 31 | cleanup_code, |
32 | 32 | User, |
@@ -112,17 +112,17 @@ async def send_bot_help(self, mapping): |
112 | 112 | if no_cog_commands: |
113 | 113 | embeds.extend(await self.format_cog_help(no_cog_commands, no_cog=True)) |
114 | 114 |
|
115 | | - p_session = PaginatorSession( |
| 115 | + session = EmbedPaginatorSession( |
116 | 116 | self.context, *embeds, destination=self.get_destination() |
117 | 117 | ) |
118 | | - return await p_session.run() |
| 118 | + return await session.run() |
119 | 119 |
|
120 | 120 | async def send_cog_help(self, cog): |
121 | 121 | embeds = await self.format_cog_help(cog) |
122 | | - p_session = PaginatorSession( |
| 122 | + session = EmbedPaginatorSession( |
123 | 123 | self.context, *embeds, destination=self.get_destination() |
124 | 124 | ) |
125 | | - return await p_session.run() |
| 125 | + return await session.run() |
126 | 126 |
|
127 | 127 | async def send_command_help(self, command): |
128 | 128 | if not await self.filter_commands([command]): |
@@ -285,7 +285,7 @@ async def changelog(self, ctx, version: str.lower = ""): |
285 | 285 | ) |
286 | 286 |
|
287 | 287 | try: |
288 | | - paginator = PaginatorSession(ctx, *changelog.embeds) |
| 288 | + paginator = EmbedPaginatorSession(ctx, *changelog.embeds) |
289 | 289 | paginator.current = index |
290 | 290 | await paginator.run() |
291 | 291 | except asyncio.CancelledError: |
@@ -358,7 +358,7 @@ async def sponsors(self, ctx): |
358 | 358 |
|
359 | 359 | random.shuffle(embeds) |
360 | 360 |
|
361 | | - session = PaginatorSession(ctx, *embeds) |
| 361 | + session = EmbedPaginatorSession(ctx, *embeds) |
362 | 362 | await session.run() |
363 | 363 |
|
364 | 364 | @commands.group(invoke_without_command=True) |
@@ -762,7 +762,7 @@ async def config_options(self, ctx): |
762 | 762 | ) |
763 | 763 | embeds.append(embed) |
764 | 764 |
|
765 | | - session = PaginatorSession(ctx, *embeds) |
| 765 | + session = EmbedPaginatorSession(ctx, *embeds) |
766 | 766 | await session.run() |
767 | 767 |
|
768 | 768 | @config.command(name="set", aliases=["add"]) |
@@ -926,7 +926,7 @@ def fmt(val): |
926 | 926 | embed.set_thumbnail(url=fmt(info["thumbnail"])) |
927 | 927 | embeds += [embed] |
928 | 928 |
|
929 | | - paginator = PaginatorSession(ctx, *embeds) |
| 929 | + paginator = EmbedPaginatorSession(ctx, *embeds) |
930 | 930 | paginator.current = index |
931 | 931 | await paginator.run() |
932 | 932 |
|
@@ -1003,7 +1003,7 @@ async def alias(self, ctx, *, name: str.lower = None): |
1003 | 1003 | embed.set_author(name="Command Aliases", icon_url=ctx.guild.icon_url) |
1004 | 1004 | embeds.append(embed) |
1005 | 1005 |
|
1006 | | - session = PaginatorSession(ctx, *embeds) |
| 1006 | + session = EmbedPaginatorSession(ctx, *embeds) |
1007 | 1007 | await session.run() |
1008 | 1008 |
|
1009 | 1009 | @alias.command(name="raw") |
@@ -1500,8 +1500,8 @@ async def permissions_get( |
1500 | 1500 | for perm_level in PermissionLevel: |
1501 | 1501 | embeds.append(self._get_perm(ctx, perm_level.name, "level")) |
1502 | 1502 |
|
1503 | | - p_session = PaginatorSession(ctx, *embeds) |
1504 | | - return await p_session.run() |
| 1503 | + session = EmbedPaginatorSession(ctx, *embeds) |
| 1504 | + return await session.run() |
1505 | 1505 |
|
1506 | 1506 | @commands.group(invoke_without_command=True) |
1507 | 1507 | @checks.has_permissions(PermissionLevel.OWNER) |
|
0 commit comments