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

View file

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

View file

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

View file

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