debug config remove bot_admin_role

This commit is contained in:
SowinskiBraeden committed 2023-04-03 17:31:09 -07:00
1 parent 30b2c42b6f
commit 6ce6ff53c3
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -652,10 +652,10 @@ module.exports = {
})
}
let action = '';
let roleId = interaction.customId.split('-')[2];
if (interaction.customId.split('-')[1]=='yes') {
let role = interaction.customId.split('-')[2];
action = 'removed';
client.dbo.collection("guilds").updateOne({"server.serverID":GuildDB.serverID}, {$pull: {"server.botAdminRoles": role}}, function(err, res) {
client.dbo.collection("guilds").updateOne({"server.serverID":GuildDB.serverID}, {$pull: {"server.botAdminRoles": roleId}}, function(err, res) {
if (err) return client.sendInternalError(interaction, err);
});
} else if (interaction.customId.split('-')[1]=='no') action = 'kept';