1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 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))