Added Reboot command
This commit is contained in:
parent
e64118cb30
commit
c5bbdf8abc
@ -4,6 +4,7 @@ from .imports import checks, utils
|
|||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
import inspect
|
import inspect
|
||||||
|
import os
|
||||||
|
|
||||||
admin_log = logging.getLogger('admin')
|
admin_log = logging.getLogger('admin')
|
||||||
config_dir = 'config/'
|
config_dir = 'config/'
|
||||||
@ -14,6 +15,14 @@ class Admin:
|
|||||||
def __init__(self, bot):
|
def __init__(self, bot):
|
||||||
self.bot = 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)
|
@commands.group(case_insensitive=True)
|
||||||
async def set(self, ctx):
|
async def set(self, ctx):
|
||||||
"""Run help set for more info"""
|
"""Run help set for more info"""
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user