mirror of
https://github.com/polyjitter/searchbot-discord.git
synced 2024-08-14 22:46:55 +00:00
Added leave command
This commit is contained in:
parent
3b187f8d5a
commit
05dae3d019
1 changed files with 11 additions and 1 deletions
|
@ -184,9 +184,19 @@ Number of extensions present: {len(ctx.bot.cogs)}
|
|||
async def restart(self, ctx):
|
||||
"""Turns the bot off."""
|
||||
|
||||
await ctx.send(':zzz: **Restarting.**')
|
||||
await ctx.send(":zzz: **Restarting.**")
|
||||
exit()
|
||||
|
||||
@commands.command()
|
||||
@commands.is_owner()
|
||||
async def leave(self, ctx):
|
||||
"""Makes the bot leave the server this was called in."""
|
||||
|
||||
await ctx.send(
|
||||
"\U0001F4A8 **Leaving server.**"
|
||||
"_If you want me back, add me or get an admin to._")
|
||||
await ctx.guild.leave()
|
||||
|
||||
def cog_unload(self):
|
||||
self.bot.help_command = self._original_help_command
|
||||
|
||||
|
|
Loading…
Reference in a new issue