chore: Use the inlineCode function

This commit is contained in:
Siwoo Jeon 2025-03-15 19:43:22 +09:00
parent d0484dae0c
commit c95ca1f259
Signed by: migan
GPG key ID: 036E9A8C5E8E48DA
4 changed files with 14 additions and 11 deletions

View file

@ -4,6 +4,7 @@ import { ApplyOptions } from '@sapphire/decorators'
import { Command } from '@sapphire/framework' import { Command } from '@sapphire/framework'
import { import {
EmbedBuilder, EmbedBuilder,
inlineCode,
Message, Message,
MessageFlags, MessageFlags,
type ChatInputCommandInteraction, type ChatInputCommandInteraction,
@ -73,30 +74,30 @@ export default class DataLengthCommand extends Command {
const embed = new EmbedBuilder() const embed = new EmbedBuilder()
.setTitle('저장된 데이터량') .setTitle('저장된 데이터량')
.setDescription(`총합: \`${sum}\``) .setDescription(`총합: ${inlineCode(String(sum))}`)
.addFields( .addFields(
{ {
name: '총 채팅 데이터량', name: '총 채팅 데이터량',
value: `\`${textLength}\``, value: `${inlineCode(String(textLength))}`,
inline: true, inline: true,
}, },
{ {
name: '총 지식 데이터량', name: '총 지식 데이터량',
value: `\`${learnLength}\``, value: `${inlineCode(String(learnLength))}`,
inline: true, inline: true,
}, },
{ {
name: '머핀 데이터량', name: '머핀 데이터량',
value: `\`${muffinLength}\``, value: `${inlineCode(String(muffinLength))}`,
}, },
{ {
name: 'nsfw 데이터량', name: 'nsfw 데이터량',
value: `\`${nsfwLength}\``, value: `${inlineCode(String(nsfwLength))}`,
inline: true, inline: true,
}, },
{ {
name: `${username}님이 가르쳐준 데이터량`, name: `${username}님이 가르쳐준 데이터량`,
value: `\`${userLearnLength}\``, value: `${inlineCode(String(userLearnLength))}`,
inline: true, inline: true,
}, },
) )

View file

@ -10,6 +10,7 @@ import {
ChatInputCommandInteraction, ChatInputCommandInteraction,
codeBlock, codeBlock,
EmbedBuilder, EmbedBuilder,
inlineCode,
Message, Message,
MessageFlags, MessageFlags,
StringSelectMenuBuilder, StringSelectMenuBuilder,
@ -74,12 +75,12 @@ export default class DeleteLearnedData extends Command {
.addFields( .addFields(
{ {
name: '사용법', name: '사용법',
value: `\`${this.detailedDescription.usage}\``, value: inlineCode(this.detailedDescription.usage),
}, },
{ {
name: '예시', name: '예시',
value: this.detailedDescription value: this.detailedDescription
.examples!.map(example => `\`${example}\``) .examples!.map(example => inlineCode(example))
.join('\n'), .join('\n'),
}, },
) )

View file

@ -5,6 +5,7 @@ import { Args, Command } from '@sapphire/framework'
import { import {
ChatInputCommandInteraction, ChatInputCommandInteraction,
EmbedBuilder, EmbedBuilder,
inlineCode,
Message, Message,
MessageFlags, MessageFlags,
} from 'discord.js' } from 'discord.js'
@ -87,13 +88,13 @@ export default class LearnCommand extends Command {
.addFields( .addFields(
{ {
name: '사용법', name: '사용법',
value: `\`${this.detailedDescription.usage}\``, value: inlineCode(this.detailedDescription.usage),
inline: true, inline: true,
}, },
{ {
name: '예시', name: '예시',
value: this.detailedDescription value: this.detailedDescription
.examples!.map(example => `\`${example}\``) .examples!.map(example => inlineCode(example))
.join('\n'), .join('\n'),
inline: true, inline: true,
}, },

View file

@ -31,7 +31,7 @@ declare module '@sapphire/framework' {
container.dbDisconnect = async () => await disconnect() container.dbDisconnect = async () => await disconnect()
container.config = new Config() container.config = new Config()
container.prefix = container.config.bot.prefix container.prefix = container.config.bot.prefix
container.version = '5.0.0-yogurt_canary.250309a' container.version = '5.0.0-yogurt_canary.250315a'
container.embedColors = { container.embedColors = {
default: 0xaddb87, default: 0xaddb87,
fail: 0xff0000, fail: 0xff0000,