Updated a bunch of commands

This commit is contained in:
2024-02-05 12:09:41 +01:00
parent da9bb58562
commit b2420e949c
5 changed files with 11 additions and 5 deletions

View File

@@ -135,7 +135,9 @@ export = {
replyRank = "Member" replyRank = "Member"
} }
await user.roles.remove(waitingListRole) if (user.roles.cache.has(waitingListRole)) {
await user.roles.remove(waitingListRole, "User was force updated.")
}
await interaction.editReply({ await interaction.editReply({
embeds: [{ embeds: [{

View File

@@ -141,7 +141,9 @@ export = {
replyRank = "Member" replyRank = "Member"
} }
await user.roles.remove(waitingListRole) if (user.roles.cache.has(waitingListRole)) {
await user.roles.remove(waitingListRole, "User was force updated.")
}
await interaction.editReply({ await interaction.editReply({
embeds: [{ embeds: [{

View File

@@ -41,7 +41,7 @@ export = {
.addSubcommand(subcommand => .addSubcommand(subcommand =>
subcommand subcommand
.setName("removeguildroles") .setName("removeguildroles")
.setDescription("Update the discord roles of all guild members") .setDescription("Remove guild roles from non members")
) )
.addSubcommand(subcommand => .addSubcommand(subcommand =>
subcommand subcommand

View File

@@ -72,7 +72,7 @@ export default async function updateAll(interaction: ChatInputCommandInteraction
await gmember.member.roles.remove(rolesToremove, "Updating all discord members") await gmember.member.roles.remove(rolesToremove, "Updating all discord members")
continue continue
} else { } else {
await gmember.member.roles.add(verifyTick) await gmember.member.roles.add(verifyTick, "Updating all discord members")
console.log(color(" Added verified tick to " + gmember.member.user.username, "lavender")) console.log(color(" Added verified tick to " + gmember.member.user.username, "lavender"))
} }

View File

@@ -124,7 +124,9 @@ export = {
replyRank = "Member" replyRank = "Member"
} }
await user.roles.remove(waitingListRole) if (user.roles.cache.has(waitingListRole)) {
await user.roles.remove(waitingListRole, "User used the update command")
}
await interaction.editReply({ await interaction.editReply({
embeds: [{ embeds: [{