From 41daa41c7825170cc532ad928a0dab07e6d1ffa7 Mon Sep 17 00:00:00 2001 From: Myned Date: Thu, 3 Jan 2019 18:04:17 -0500 Subject: [PATCH] Add leave guild command --- src/cogs/owner.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/cogs/owner.py b/src/cogs/owner.py index c93f707..cb4c618 100644 --- a/src/cogs/owner.py +++ b/src/cogs/owner.py @@ -127,6 +127,15 @@ class Bot: u.dump(u.block, 'cogs/block.json', json=True) await ctx.send('\N{WHITE HEAVY CHECK MARK} **Unblocked guilds**') + + @cmds.command(name=',leave', aliases=[',l']) + @cmds.is_owner() + async def leave(self, ctx, *guilds): + for guild in guilds: + temp = d.utils.get(self.bot.guilds, id=int(guild)) + + await temp.leave() + @cmds.command(name=',permissions', aliases=[',permission', ',perms', ',perm']) @cmds.is_owner() async def permissions(self, ctx, *args: d.Member):