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",
|
||||
"version": "4.0.0-pudding.experimental_slash_test.1",
|
||||
"version": "4.0.0-pudding.experimental_slash_test.2",
|
||||
"main": "dist/index.js",
|
||||
"private": true,
|
||||
"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 { ApplyOptions } from '@sapphire/decorators'
|
||||
import { platform, arch } from 'os'
|
||||
|
@ -17,8 +17,10 @@ class InformationCommand extends Command {
|
|||
)
|
||||
}
|
||||
|
||||
private async _embed(): Promise<APIEmbed> {
|
||||
return {
|
||||
private async _run(ctx: Message | ChatInputCommandInteraction) {
|
||||
await ctx.reply({
|
||||
embeds: [
|
||||
{
|
||||
title: `${this.container.client.user?.username}의 정ㅂ보`,
|
||||
fields: [
|
||||
{
|
||||
|
@ -56,19 +58,17 @@ class InformationCommand extends Command {
|
|||
thumbnail: {
|
||||
url: this.container.client.user!.displayAvatarURL()!,
|
||||
},
|
||||
}
|
||||
},
|
||||
],
|
||||
})
|
||||
}
|
||||
|
||||
public async messageRun(msg: Message) {
|
||||
await msg.reply({
|
||||
embeds: [await this._embed()],
|
||||
})
|
||||
await this._run(msg)
|
||||
}
|
||||
|
||||
public async chatInputRun(interaction: ChatInputCommandInteraction) {
|
||||
await interaction.reply({
|
||||
embeds: [await this._embed()],
|
||||
})
|
||||
await this._run(interaction)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue