fix: Edit logic
This commit is contained in:
parent
f4b479a9ca
commit
355fd0b1f3
2 changed files with 45 additions and 45 deletions
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "muffinbot",
|
"name": "muffinbot",
|
||||||
"version": "4.0.0-pudding.experimental_slash_test.1",
|
"version": "4.0.0-pudding.experimental_slash_test.2",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { type ChatInputCommandInteraction, APIEmbed, Message } from 'discord.js'
|
import type { ChatInputCommandInteraction, Message } from 'discord.js'
|
||||||
import { Command, container } from '@sapphire/framework'
|
import { Command, container } from '@sapphire/framework'
|
||||||
import { ApplyOptions } from '@sapphire/decorators'
|
import { ApplyOptions } from '@sapphire/decorators'
|
||||||
import { platform, arch } from 'os'
|
import { platform, arch } from 'os'
|
||||||
|
@ -17,58 +17,58 @@ class InformationCommand extends Command {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
private async _embed(): Promise<APIEmbed> {
|
private async _run(ctx: Message | ChatInputCommandInteraction) {
|
||||||
return {
|
await ctx.reply({
|
||||||
title: `${this.container.client.user?.username}의 정ㅂ보`,
|
embeds: [
|
||||||
fields: [
|
|
||||||
{
|
{
|
||||||
name: '구동ㅎ환경',
|
title: `${this.container.client.user?.username}의 정ㅂ보`,
|
||||||
value: `${platform()} ${arch()}`,
|
fields: [
|
||||||
inline: false,
|
{
|
||||||
},
|
name: '구동ㅎ환경',
|
||||||
{
|
value: `${platform()} ${arch()}`,
|
||||||
name: '버ㅈ전',
|
inline: false,
|
||||||
value: this.container.version,
|
},
|
||||||
inline: true,
|
{
|
||||||
},
|
name: '버ㅈ전',
|
||||||
{
|
value: this.container.version,
|
||||||
name: '채ㄴ널',
|
inline: true,
|
||||||
value: this.container.channel.toLowerCase(),
|
},
|
||||||
inline: true,
|
{
|
||||||
},
|
name: '채ㄴ널',
|
||||||
{
|
value: this.container.channel.toLowerCase(),
|
||||||
name: '최근 업ㄷ데이트 날짜',
|
inline: true,
|
||||||
value: this.container.lastUpdated.toLocaleDateString('ko', {
|
},
|
||||||
dateStyle: 'long',
|
{
|
||||||
}),
|
name: '최근 업ㄷ데이트 날짜',
|
||||||
inline: true,
|
value: this.container.lastUpdated.toLocaleDateString('ko', {
|
||||||
},
|
dateStyle: 'long',
|
||||||
{
|
}),
|
||||||
name: '개ㅂ발자',
|
inline: true,
|
||||||
value: (
|
},
|
||||||
await this.container.client.users.fetch(
|
{
|
||||||
this.container.config.bot.owner_ID,
|
name: '개ㅂ발자',
|
||||||
)
|
value: (
|
||||||
).username,
|
await this.container.client.users.fetch(
|
||||||
inline: false,
|
this.container.config.bot.owner_ID,
|
||||||
|
)
|
||||||
|
).username,
|
||||||
|
inline: false,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
thumbnail: {
|
||||||
|
url: this.container.client.user!.displayAvatarURL()!,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
thumbnail: {
|
})
|
||||||
url: this.container.client.user!.displayAvatarURL()!,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public async messageRun(msg: Message) {
|
public async messageRun(msg: Message) {
|
||||||
await msg.reply({
|
await this._run(msg)
|
||||||
embeds: [await this._embed()],
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public async chatInputRun(interaction: ChatInputCommandInteraction) {
|
public async chatInputRun(interaction: ChatInputCommandInteraction) {
|
||||||
await interaction.reply({
|
await this._run(interaction)
|
||||||
embeds: [await this._embed()],
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue