diff --git a/core/core_commands.py b/core/core_commands.py index a38f3de7b..f3dfa2fd4 100644 --- a/core/core_commands.py +++ b/core/core_commands.py @@ -71,6 +71,19 @@ class Core: await ctx.bot.save_packages_status() await ctx.send("Done.") + @commands.command(name="shutdown") + @checks.is_owner() + async def _shutdown(self, ctx, silently: bool=False): + """Shuts down the bot""" + wave = "\N{WAVING HAND SIGN}" + skin = "\N{EMOJI MODIFIER FITZPATRICK TYPE-3}" + try: # We don't want missing perms to stop our shutdown + if not silently: + await ctx.send("Shutting down... " + wave + skin) + except: + pass + await ctx.bot.shutdown() + def cleanup_and_refresh_modules(self, module_name: str): """Interally reloads modules so that changes are detected""" splitted = module_name.split('.')