Revamp admin remove command to auto-reload config
This commit is contained in:
parent
e357d6e4ce
commit
1a4cba437f
1 changed files with 2 additions and 1 deletions
|
@ -182,10 +182,11 @@ class OwnerCog(commands.Cog):
|
|||
if user.id not in self.admins:
|
||||
await ctx.send(f"{user.mention} is not an admin.")
|
||||
return
|
||||
self.admins.remove(user.id)
|
||||
self.db.mongo.jarvis.settings.update_one(
|
||||
{"key": "admins"}, {"$set": {"value": self.admins}}
|
||||
)
|
||||
reload_config()
|
||||
self.admins = get_config().admins
|
||||
await ctx.send(f"{user.mention} is no longer an admin.")
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue