From 4ad3f51ba7bb72955cdc4e976a01e66302dd6ecf Mon Sep 17 00:00:00 2001 From: Josh Sanchez Date: Mon, 27 Sep 2021 22:23:11 -0500 Subject: [PATCH 1/2] Change vote transition role ping to use role name --- src/commands/tenmans.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/commands/tenmans.ts b/src/commands/tenmans.ts index c0f70ba..66bde02 100644 --- a/src/commands/tenmans.ts +++ b/src/commands/tenmans.ts @@ -137,18 +137,18 @@ class VoteQueueButtonAction extends VoteQueueAction { const queueChannel = botConfig.queueMsgChannel as TextChannel; // Verify that a pingable role exists for 10 mans on this server - const roleId = await this.interaction.guild.roles + const tenmansRole = await this.interaction.guild.roles .fetch() .then((roles: Collection) => { for (const role of roles.values()) { if (role.name === "10 Mans") { - return role.id; + return role; } } }) .catch(console.error); - if (!roleId) { + if (!tenmansRole) { this.interaction.reply({ content: "My camera is destroyed - cannot find a 10 mans role on this server. Message an admin.", @@ -186,7 +186,7 @@ class VoteQueueButtonAction extends VoteQueueAction { }); await queueChannel.send({ - content: `<@${roleId}> that Radianite must be ours! A queue has been created!`, + content: `<@${tenmansRole.name}> that Radianite must be ours! A queue has been created!`, }); return false; From 10f2dab5ead4b379d4e5f7d37a6ee8346d1cbee4 Mon Sep 17 00:00:00 2001 From: Josh Sanchez Date: Thu, 30 Sep 2021 21:56:13 -0500 Subject: [PATCH 2/2] Add needed syntax char to format string for role ping --- src/commands/tenmans.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/tenmans.ts b/src/commands/tenmans.ts index 66bde02..ca01421 100644 --- a/src/commands/tenmans.ts +++ b/src/commands/tenmans.ts @@ -186,7 +186,7 @@ class VoteQueueButtonAction extends VoteQueueAction { }); await queueChannel.send({ - content: `<@${tenmansRole.name}> that Radianite must be ours! A queue has been created!`, + content: `<@&${tenmansRole.id}> that Radianite must be ours! A queue has been created!`, }); return false;