Skip to content

Commit

Permalink
Fix mention issues
Browse files Browse the repository at this point in the history
  • Loading branch information
SunburntRock89 committed May 23, 2023
1 parent de6bc96 commit 16c266b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/commands/standard/mention list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default class MentionList extends Command {
const mentions = this.number!.mentions;

const embed = EmbedBuilder.from(this.t("listEmbed", {
list: mentions.length ? mentions.map(m => `<@${m}>`).join(", ") : this.t("listEmpty"),
list: mentions.length ? mentions.map(m => m.toString()).join(", ") : this.t("listEmpty"),
interpolation: {
escapeValue: false,
},
Expand Down
9 changes: 8 additions & 1 deletion src/internals/callClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,10 +283,17 @@ export default class CallClient implements CallsWithNumbers {
}
}

let notificationContent = this.to.number === config.aliasNumbers["*611"] ? `<@&${config.supportGuild.roles.customerSupport}>` : "";

// Mentions
for (const user of this.to.mentions) {
notificationContent += `<@${user}> `;
}

let notificationMessageID: string;
try {
notificationMessageID = (await this.toSend({
content: this.to.number === config.aliasNumbers["*611"] ? `<@&${config.supportGuild.roles.customerSupport}>` : "",
content: notificationContent,

embeds: [{
color: (this.from.vip?.expiry || 0) > new Date() ? this.client.config.colors.vip : this.client.config.colors.info,
Expand Down

0 comments on commit 16c266b

Please sign in to comment.