From 0581ab8f5987a695d46b60de732a1940a933e09e Mon Sep 17 00:00:00 2001 From: Myned Date: Sun, 14 Jan 2018 02:16:46 -0500 Subject: [PATCH] Add command to list all guilds bot is in --- src/cogs/owner.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/cogs/owner.py b/src/cogs/owner.py index 0d7542e..03915fd 100644 --- a/src/cogs/owner.py +++ b/src/cogs/owner.py @@ -69,6 +69,17 @@ class Bot: await ctx.send('https://discordapp.com/oauth2/authorize?&client_id={}&scope=bot&permissions={}'.format(u.config['client_id'], u.config['permissions']), delete_after=5) + @cmds.command(name=',guilds', aliases=[',glds', ',servers', ',servs']) + @cmds.is_owner() + async def guilds(self, ctx): + paginator = cmds.Paginator() + + for guild in self.bot.guilds: + paginator.add_line(guild.name) + + for page in paginator.pages: + await ctx.send(f'**Guilds:**\n{page}') + @cmds.command(name=',status', aliases=[',presence', ',game'], hidden=True) @cmds.is_owner() async def change_status(self, ctx, *, game=None):