From a4c058b5c0ec4e441c63ae2ef15235a4869d2bac Mon Sep 17 00:00:00 2001 From: romangraef Date: Tue, 21 Aug 2018 16:12:39 +0200 Subject: Initial commit --- modules/ragequit.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 modules/ragequit.py (limited to 'modules/ragequit.py') diff --git a/modules/ragequit.py b/modules/ragequit.py new file mode 100644 index 0000000..aaf43f8 --- /dev/null +++ b/modules/ragequit.py @@ -0,0 +1,17 @@ +from discord import Guild +from discord.ext.commands import Bot, command, Context as CommandContext, guild_only + + +class RageQuitCog(object): + def __init__(self, bot: Bot): + self.bot: Bot = bot + + @command() + @guild_only() + async def ragequit(self, ctx: CommandContext): + guild: Guild = ctx.guild + await guild.leave() + + +def setup(bot: Bot): + bot.add_cog(RageQuitCog(bot)) -- cgit