chore: Use the inlineCode function
This commit is contained in:
parent
d0484dae0c
commit
c95ca1f259
4 changed files with 14 additions and 11 deletions
|
@ -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,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
|
@ -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'),
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
|
@ -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,
|
||||||
},
|
},
|
||||||
|
|
|
@ -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,
|
||||||
|
|
Reference in a new issue