From a7b28b9f11a076eca17ad63e987e963e9a2f45c4 Mon Sep 17 00:00:00 2001 From: Qreepex <65496825+Qreepex@users.noreply.github.com> Date: Sun, 12 Jun 2022 13:05:34 +0200 Subject: [PATCH] fix: fix something ig --- package.json | 2 +- src/index.ts | 1 + src/structures/Command.ts | 17 +++++++++-------- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 4f85dee..125ac15 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@eazyautodelete/eazyautodelete-core", - "version": "1.4.1", + "version": "1.5.1", "description": "🧰 Core Package used by the EazyAutodelete Discord Bot", "main": "build/index.js", "scripts": { diff --git a/src/index.ts b/src/index.ts index 35635ac..d2f17a5 100644 --- a/src/index.ts +++ b/src/index.ts @@ -8,6 +8,7 @@ export { default as Bot } from "./structures/Bot"; export { default as ButtonArgs } from "./structures/ButtonArgs"; export { default as CommandArgs } from "./structures/CommandArgs"; export { default as Command } from "./structures/Command"; +export { default as CommandButton } from "./structures/CommandButton"; export { default as CommandMessage } from "./structures/CommandMessage"; export { default as CommandResponseHandler } from "./structures/discord/CommandResponseHandler"; export { default as Logger } from "./structures/Logger"; diff --git a/src/structures/Command.ts b/src/structures/Command.ts index e5e9bfe..6b6208c 100644 --- a/src/structures/Command.ts +++ b/src/structures/Command.ts @@ -3,14 +3,15 @@ import { MessageActionRow, MessageButton, SelectMenuInteraction, - ButtonInteraction, ApplicationCommandOptionChoiceData, } from "discord.js"; import { CommandConfig, CommandData, CommandHelp, CommandOptions } from "../"; import Bot from "./Bot"; +import ButtonArgs from "./ButtonArgs"; import Logger from "./Logger"; +import CommandArgs from "./CommandArgs"; +import CommandButton from "./CommandButton"; import CommandMessage from "./CommandMessage"; -import Args from "./CommandArgs"; export default class Command { client: Bot; @@ -100,16 +101,16 @@ export default class Command { return this.urlButton("https://docs.eazyautodelete.xyz/" + url, "Help", "❓"); } - async run(client: Bot, interaction: CommandMessage, args: Args): Promise { - interaction.error("An Error occured - Please contact staff: Core.Command.run"); + async run(client: Bot, message: CommandMessage, args: CommandArgs): Promise { + message.error("An Error occured - Please contact staff: Core.Command.run"); return this.Logger.warn( "Ended up in command.js [ " + this.config.name + " - " + - interaction.guild?.id + + message.guild?.id + " - " + - interaction.channel?.id + + message.channel?.id + " ]" ); } @@ -132,9 +133,9 @@ export default class Command { return; } - async buttonHandler(interaction: ButtonInteraction): Promise { + async buttonHandler(button: CommandButton, args: ButtonArgs): Promise { this.Logger.warn( - "Ended up in command.js [ " + this.config.name + " - " + interaction.id + " ]" + "Ended up in command.js [ " + this.config.name + " - " + button.id + " ]" ); return;