async def xcbans(self, ctx: AnsuraContext): await BotEmbedPaginator( ctx, pages([f"{self._resolve(x)} - {x}" for x in self.banned], 10, "Crosschat bans", fmt="%s")).run()
async def xclist(self, ctx: AnsuraContext): channels = pages([ f"{self.bot.get_guild(k)} ({k})\n - {self.bot.get_channel(v)} ({v})" for k, v in self.channels.items() ], 10, fmt="%s", title="Channels") banned = pages([f"{self._resolve(u)} - {u}" for u in self.banned], 10, fmt="%s", title="Banned") exempt = pages([f"{self.bot.get_user(u)} - {u}" for u in self.exempt], 10, fmt="%s", title="Exempt") await BotEmbedPaginator(ctx, list(chain(channels, banned, exempt))).run()
async def xcservers(self, ctx: AnsuraContext): await BotEmbedPaginator( ctx, pages([ f"**{self.bot.get_guild(int(x))}** ({x})\n- " f"{self.bot.get_channel(c)} ({c})" for x, c in self.channels.items() ], 10, "Crosschat servers", fmt="%s")).run()
async def timezones(self, ctx: AnsuraContext, search: str = None): """Gets a list of supported timezones, use `%timezones akhjdlksa` to search by text""" if not search: search = "" all_timezones = [ tz for tz in pytz.all_timezones if (search.lower() or "") in tz.lower() ] await BotEmbedPaginator( ctx, pages(all_timezones, 20, "Supported Timezones", fmt="%s"), ).run()