mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-10 11:16:10 +01:00
feat: markdownEscape
This commit is contained in:
1 parent
01b5ec9bc2
commit
5ef1f87236
11 files changed
+75
-26
No files matched your search
@@ -1,4 +1,5 @@
|
||||
import { EmbedBuilder, SlashCommandBuilder } from 'discord.js';
|
||||
import markdownEscape from 'markdown-escape';
|
||||
import { CommandRegistry } from '../behaviors/interactionCreate.js';
|
||||
import { SKILLED_COLOR } from '../constants/colors.js';
|
||||
import { BlitzServer } from '../constants/servers.js';
|
||||
@@ -68,20 +69,20 @@ export default {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setTitle(
|
||||
`${account.nickname}'s owned ${
|
||||
`${markdownEscape(account.nickname)}'s owned ${
|
||||
tier === null ? '' : `tier ${tier} `
|
||||
}tanks`,
|
||||
)
|
||||
.setDescription(
|
||||
`${
|
||||
tanks.length === 0
|
||||
? `No tanks found for player in tier ${tier}`
|
||||
? `No tanks found in tier ${tier}`
|
||||
: tanks
|
||||
.map(
|
||||
(tank) =>
|
||||
`${TANK_TYPE_EMOJIS[tank.type]} ${tank.name} ${
|
||||
tank.is_premium ? '⭐' : ''
|
||||
}${
|
||||
`${TANK_TYPE_EMOJIS[tank.type]} ${markdownEscape(
|
||||
tank.name,
|
||||
)} ${tank.is_premium ? '⭐' : ''}${
|
||||
COMP_TANKS.includes(tank.tank_id) ? '🏆' : ''
|
||||
}`,
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user