Added nickname updating to commands

This commit is contained in:
2024-02-19 10:52:34 +01:00
parent 2ce15570dd
commit c71386c18b
8 changed files with 109 additions and 51 deletions

View File

@@ -75,10 +75,17 @@ export = {
const roles = roleManage("default")
await user.roles.remove(roles.rolesToRemove, "User was force updated.")
await user.roles.add(roles.rolesToAdd, "User was force updated.")
await user.setNickname(ign, "User was force updated.").catch(() => {
// Do nothing
})
await interaction.editReply({
embeds: [{
description: usermentioned + " was given the the Default Member role.",
description: `
${usermentioned} was given the \`Default Member\` role.
IGN: \`${ign}\`
`,
color: embedColor,
thumbnail: {
url: head!
@@ -141,13 +148,22 @@ export = {
replyRank = "Member"
}
// FIXME: need to check if user is on waiting list
if (user.roles.cache.has(waitingListRole)) {
await user.roles.remove(waitingListRole, "User was force updated.")
}
await user.setNickname(ign, "User was force updated.").catch(() => {
// Do nothing
})
await interaction.editReply({
embeds: [{
description: usermentioned + " was given the the " + replyRank + " role.",
description: `
${usermentioned} was given the \`${replyRank}\` role.
IGN: \`${ign}\`
`,
color: embedColor,
thumbnail: {
url: head!