diff --git a/src/commandDetails/coin/leaderboard.ts b/src/commandDetails/coin/leaderboard.ts index cb7df7a5..1d61e86c 100644 --- a/src/commandDetails/coin/leaderboard.ts +++ b/src/commandDetails/coin/leaderboard.ts @@ -53,6 +53,7 @@ const getCoinLeaderboardEmbed = async ( if (userCoinEntry.user_id === userId) { position = rank; } + let sanitizedTag: string; if (leaderboardArray.length < LEADERBOARD_LIMIT_DISPLAY) { const userTag = user?.tag ?? ''; const cleanUserTag = userTag @@ -64,7 +65,12 @@ const getCoinLeaderboardEmbed = async ( .join('\\_') .split('`') .join('\\`'); - const userCoinEntryText = `${rank}. ${cleanUserTag} - ${ + if (cleanUserTag.endsWith('#0')) { + sanitizedTag = cleanUserTag.substring(0, cleanUserTag.length - 2); + } else { + sanitizedTag = cleanUserTag; + } + const userCoinEntryText = `${rank}. ${sanitizedTag} - ${ userCoinEntry.balance } ${getCoinEmoji()}`; leaderboardArray.push(userCoinEntryText); diff --git a/src/commands/games/blackjack.ts b/src/commands/games/blackjack.ts index f22b72fd..2bd889c8 100644 --- a/src/commands/games/blackjack.ts +++ b/src/commands/games/blackjack.ts @@ -274,6 +274,7 @@ export class GamesBlackjackCommand extends Command { // if player has not acted within time limit, consider it as quitting the game game = await performGameAction(author.id, BlackjackAction.QUIT); message.reply("you didn't act within the time limit, please start another game!"); + if (game) game.stage = BlackjackStage.DONE; } } if (game) {