diff --git a/exts/admin.py b/exts/admin.py index 4e872a7..01c97c3 100644 --- a/exts/admin.py +++ b/exts/admin.py @@ -4,6 +4,7 @@ from .imports import checks, utils import json import logging import inspect +import os admin_log = logging.getLogger('admin') config_dir = 'config/' @@ -14,6 +15,14 @@ class Admin: def __init__(self, bot): self.bot = bot + @commands.command(hidden=True) + @commands.is_owner() + async def reboot(self, ctx): + await ctx.send('Submitter is restarting.') + with open(f'{config_dir}reboot', 'w') as f: + f.write(f'1\n{ctx.channel.id}') + os._exit(1) + @commands.group(case_insensitive=True) async def set(self, ctx): """Run help set for more info"""