Skip to content

Commit

Permalink
add prefixes to promotion messages
Browse files Browse the repository at this point in the history
  • Loading branch information
WhatCats committed Feb 29, 2024
1 parent 972b8aa commit 7020b7a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/modules/vouch-system/AutoPromoteHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ for (const rank of Object.values(RANKS)) {
Config.declareType(`${rank} Devouch Expiration`)
}

const PROMOTION_PREFIX: Record<string, string> = {
Prime: "### ",
Private: "## ",
Premium: "# "
}

export class AutoPromoteHandler {
static onVouched(vouch: Vouch) {
const user = vouch.user()
Expand Down Expand Up @@ -59,7 +65,7 @@ export class AutoPromoteHandler {
ScrimsBot.INSTANCE?.buildSendMessages(
PROMOTIONS_CHANNEL,
null,
new MessageOptionsBuilder().setContent(`**${user} has been promoted to ${rank}!**`),
new MessageOptionsBuilder().setContent(`${PROMOTION_PREFIX[rank] ?? ""}${user} has been promoted to ${rank}!`),
)
}
}

0 comments on commit 7020b7a

Please sign in to comment.