Update the right database when removing admins

This commit is contained in:
Zeva Rose 2021-06-30 18:02:57 -06:00
parent 4bb9a74af1
commit 919dfcb4a0

View file

@ -169,7 +169,7 @@ class OwnerCog(commands.Cog):
await ctx.send(f"{user.mention} is already an admin.") await ctx.send(f"{user.mention} is already an admin.")
return return
self.admins.append(user.id) self.admins.append(user.id)
self.db.mongo.jarvis.settings.update_one( self.db.mongo.jarvis.config.update_one(
{"key": "admins"}, {"$set": {"value": self.admins}} {"key": "admins"}, {"$set": {"value": self.admins}}
) )
await ctx.send( await ctx.send(
@ -182,7 +182,7 @@ class OwnerCog(commands.Cog):
if user.id not in self.admins: if user.id not in self.admins:
await ctx.send(f"{user.mention} is not an admin.") await ctx.send(f"{user.mention} is not an admin.")
return return
self.db.mongo.jarvis.settings.update_one( self.db.mongo.jarvis.config.update_one(
{"key": "admins"}, {"$set": {"value": self.admins}} {"key": "admins"}, {"$set": {"value": self.admins}}
) )
reload_config() reload_config()