This commit is contained in:
un1xx committed 2024-03-08 23:17:48 +05:30
1 parent 947e0161a3
commit b71e17086d
9 files changed
+553 -2

No files matched your search

+12 -1
View File
@@ -7,14 +7,25 @@ import aiohttp
import discord
import jishaku
from discord.ext.commands import Bot, Context
from utils.paginator import Paginator, WebhookPaginator
OWNER = [407135783678640128, 341958485724102668]
ownerid = json.load(open("store/cfg.json"))["ReplOwners"]
class CustomCtx(Context):
def __init__(self, **kwargs):
super().__init__(**kwargs)
self.Paginator = Paginator
self.WebhookPaginator = WebhookPaginator
self.session = aiohttp.ClientSession(loop=self.bot.loop)
async def paginate(
self,
pages: List[discord.Embed | str],
pagetype: Optional[Literal["embed", "text"]] = "embed",
**kwargs,
):
await self.Paginator(pages=pages, pagetype=pagetype).start(ctx=self, **kwargs)