Add system refresh command
This commit is contained in:
parent
e500004148
commit
b1096a6f92
1 changed files with 7 additions and 1 deletions
|
@ -1,7 +1,7 @@
|
|||
import jarvis
|
||||
import discord
|
||||
from discord.ext import commands
|
||||
from jarvis.config import get_config
|
||||
from jarvis.config import get_config, reload_config
|
||||
from jarvis.utils import update, user_is_bot_admin
|
||||
|
||||
|
||||
|
@ -144,6 +144,12 @@ class OwnerCog(commands.Cog):
|
|||
else:
|
||||
await ctx.send("I'm afraid I can't let you do that")
|
||||
|
||||
@_system.command(name="refresh", hidden=True)
|
||||
@user_is_bot_admin()
|
||||
async def _refresh(self, ctx):
|
||||
reload_config()
|
||||
await ctx.send("System refreshed")
|
||||
|
||||
@commands.Cog.listener()
|
||||
async def on_command_error(self, ctx, error):
|
||||
if isinstance(error, commands.errors.MissingPermissions):
|
||||
|
|
Loading…
Add table
Reference in a new issue