Added Reboot command

This commit is contained in:
Dusty.P 2018-05-05 21:40:58 -08:00
parent e64118cb30
commit c5bbdf8abc

View File

@ -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"""