Performance testing
diff --git a/src/actions/roleMenu.ts b/src/actions/roleMenu.ts
index 48ca49c..1c493bb 100644
--- a/src/actions/roleMenu.ts
+++ b/src/actions/roleMenu.ts
@@ -1,11 +1,10 @@
-import { Interaction, ButtonBuilder, CommandInteraction, Role, ButtonStyle } from "discord.js";
+import { Interaction, ButtonBuilder, CommandInteraction, Role, ButtonStyle, ButtonInteraction } from "discord.js";
import EmojiEmbed from "../utils/generateEmojiEmbed.js";
import { ActionRowBuilder, SelectMenuBuilder } from "discord.js";
import getEmojiByName from "../utils/getEmojiByName.js";
import client from "../utils/client.js";
import { LoadingEmbed } from "../utils/defaultEmbeds.js";
import type { GuildConfig } from "../utils/database.js";
-import type { ButtonComponent } from "@discordjs/builders";
export interface RoleMenuSchema {
guild: string;
@@ -17,7 +16,7 @@
interaction: Interaction;
}
-export async function callback(interaction: CommandInteraction) {
+export async function callback(interaction: CommandInteraction | ButtonInteraction) {
if(!interaction.guild) return interaction.reply({ content: "This command can only be used in a server.", ephemeral: true });
if(!interaction.member) return interaction.reply({ content: "You must be in a server to use this command.", ephemeral: true });
const config = await client.database.guilds.read(interaction.guild.id);
diff --git a/src/actions/tickets/create.ts b/src/actions/tickets/create.ts
index e1821ef..595a5b3 100644
--- a/src/actions/tickets/create.ts
+++ b/src/actions/tickets/create.ts
@@ -1,4 +1,4 @@
-import Discord, { ActionRowBuilder, ButtonBuilder, ButtonStyle, CommandInteraction } from "discord.js";
+import Discord, { ActionRowBuilder, ButtonBuilder, ButtonStyle, CommandInteraction, ButtonInteraction } from "discord.js";
import { tickets, toHexArray } from "../../utils/calculate.js";
import client from "../../utils/client.js";
import EmojiEmbed from "../../utils/generateEmojiEmbed.js";
@@ -9,7 +9,7 @@
return s.length < 3 ? s.toUpperCase() : s[0].toUpperCase() + s.slice(1).toLowerCase();
}
-export default async function (interaction: CommandInteraction) {
+export default async function (interaction: CommandInteraction | ButtonInteraction) {
if (!interaction.guild) return;
const { log, NucleusColors, entry, renderUser, renderChannel, renderDelta } = client.logger;
diff --git a/src/actions/tickets/delete.ts b/src/actions/tickets/delete.ts
index 33860b7..cab38ec 100644
--- a/src/actions/tickets/delete.ts
+++ b/src/actions/tickets/delete.ts
@@ -1,9 +1,9 @@
-import Discord, { ButtonBuilder, ActionRowBuilder, ButtonStyle } from "discord.js";
+import Discord, { ButtonBuilder, ActionRowBuilder, ButtonStyle, ButtonInteraction } from "discord.js";
import client from "../../utils/client.js";
import EmojiEmbed from "../../utils/generateEmojiEmbed.js";
import getEmojiByName from "../../utils/getEmojiByName.js";
-export default async function (interaction: Discord.CommandInteraction) {
+export default async function (interaction: Discord.CommandInteraction | ButtonInteraction) {
if (!interaction.guild) return;
const { log, NucleusColors, entry, renderUser, renderChannel, renderDelta } = client.logger;