diff --git a/src/commands-contextmenu/congratsmessage.ts b/src/commands-contextmenu/congratsmessage.ts index 48c12c7..7fcd28d 100644 --- a/src/commands-contextmenu/congratsmessage.ts +++ b/src/commands-contextmenu/congratsmessage.ts @@ -11,7 +11,7 @@ export = { .setType(ApplicationCommandType.Message) .setDefaultMemberPermissions(PermissionFlagsBits.ManageMessages), - async execute(interaction) { + async execute({ interaction }) { const { targetId } = interaction const message = await interaction.channel!.messages.fetch(targetId) diff --git a/src/commands-contextmenu/resetnick.ts b/src/commands-contextmenu/resetnick.ts index 28a8177..d4a9666 100644 --- a/src/commands-contextmenu/resetnick.ts +++ b/src/commands-contextmenu/resetnick.ts @@ -11,7 +11,7 @@ export = { .setType(ApplicationCommandType.User) .setDefaultMemberPermissions(PermissionFlagsBits.ManageNicknames), - async execute(interaction) { + async execute({ interaction }) { const { targetId } = interaction const target = await interaction.guild!.members.fetch(targetId) diff --git a/src/commands-contextmenu/updateuser.ts b/src/commands-contextmenu/updateuser.ts index 557010a..eee3d49 100644 --- a/src/commands-contextmenu/updateuser.ts +++ b/src/commands-contextmenu/updateuser.ts @@ -17,7 +17,7 @@ export = { .setDefaultMemberPermissions(PermissionFlagsBits.Administrator) .setDMPermission(false), - async execute(interaction) { + async execute({ interaction }) { await interaction.deferReply({ ephemeral: true }) const targetId = interaction.targetId diff --git a/src/commands/anime.ts b/src/commands/anime.ts index 07578d1..0bea798 100644 --- a/src/commands/anime.ts +++ b/src/commands/anime.ts @@ -22,7 +22,7 @@ export = { ) .setDMPermission(false), - async execute(interaction) { + async execute({ interaction }) { await interaction.deferReply() const query = interaction.options.getString("query")! diff --git a/src/commands/ban.ts b/src/commands/ban.ts index d5a08da..b7e01e1 100644 --- a/src/commands/ban.ts +++ b/src/commands/ban.ts @@ -42,7 +42,7 @@ export = { .setDefaultMemberPermissions(PermissionFlagsBits.BanMembers) .setDMPermission(false), - async execute(interaction) { + async execute({ interaction }) { await interaction.deferReply() const member = interaction.options.getMember("user") as GuildMember | null diff --git a/src/commands/botinfo.ts b/src/commands/botinfo.ts index 115bebe..2d5966a 100644 --- a/src/commands/botinfo.ts +++ b/src/commands/botinfo.ts @@ -17,7 +17,7 @@ export = { .setDescription("Get information about the bot") .setDMPermission(false), - async execute(interaction, client) { + async execute({ interaction, client }) { const { default: prettyMs } = await import("pretty-ms") const castedDeps = dependencies as { [key: string]: string } const castedDevDeps = devDependencies as { [key: string]: string } diff --git a/src/commands/check.ts b/src/commands/check.ts index 7ca3236..552e00f 100644 --- a/src/commands/check.ts +++ b/src/commands/check.ts @@ -23,7 +23,7 @@ export = { ) .setDMPermission(false), - async execute(interaction) { + async execute({ interaction }) { await interaction.deferReply({}) const ign = interaction.options.getString("ign")! diff --git a/src/commands/clear.ts b/src/commands/clear.ts index e154433..6370939 100644 --- a/src/commands/clear.ts +++ b/src/commands/clear.ts @@ -22,7 +22,7 @@ export = { .setDefaultMemberPermissions(PermissionFlagsBits.Administrator) .setDMPermission(false), - async execute(interaction) { + async execute({ interaction }) { await interaction.deferReply({ ephemeral: true }) const amount = interaction.options.getInteger("amount")! diff --git a/src/commands/config.ts b/src/commands/config.ts index 09c0b0c..044aee2 100644 --- a/src/commands/config.ts +++ b/src/commands/config.ts @@ -32,7 +32,7 @@ export = { .setDMPermission(false) .setDefaultMemberPermissions(PermissionFlagsBits.Administrator), - async execute(interaction) { + async execute({ interaction }) { await interaction.deferReply() const setting = interaction.options.getString("setting") diff --git a/src/commands/counting.ts b/src/commands/counting.ts index b1a4996..ebb99dc 100644 --- a/src/commands/counting.ts +++ b/src/commands/counting.ts @@ -39,7 +39,7 @@ export = { .setDefaultMemberPermissions(PermissionFlagsBits.Administrator) .setDMPermission(false), - async execute(interaction) { + async execute({ interaction }) { const subcommand = interaction.options.getSubcommand() if (subcommand === "ban") { diff --git a/src/commands/find.ts b/src/commands/find.ts index 21fe012..ff99e4d 100644 --- a/src/commands/find.ts +++ b/src/commands/find.ts @@ -22,7 +22,7 @@ export = { .setDefaultMemberPermissions(PermissionFlagsBits.Administrator) .setDMPermission(false), - async execute(interaction) { + async execute({ interaction }) { await interaction.deferReply() const ign = interaction.options.getString("ign")! diff --git a/src/commands/forceunverify.ts b/src/commands/forceunverify.ts index f601086..23c535f 100644 --- a/src/commands/forceunverify.ts +++ b/src/commands/forceunverify.ts @@ -25,7 +25,7 @@ export = { .setDMPermission(false) .setDefaultMemberPermissions(PermissionFlagsBits.Administrator), - async execute(interaction) { + async execute({ interaction }) { const member = interaction.options.getMember("user") as GuildMember const verifiedUser = await verify.findOne({ userID: member.user.id }) const mod = interaction.user diff --git a/src/commands/forceupdate.ts b/src/commands/forceupdate.ts index 8efea7e..b7d7f70 100644 --- a/src/commands/forceupdate.ts +++ b/src/commands/forceupdate.ts @@ -25,7 +25,7 @@ export = { .setDefaultMemberPermissions(PermissionFlagsBits.Administrator) .setDMPermission(false), - async execute(interaction) { + async execute({ interaction }) { await interaction.deferReply() const user = interaction.options.getMember("user") as GuildMember diff --git a/src/commands/forceverify.ts b/src/commands/forceverify.ts index 686e631..0718677 100644 --- a/src/commands/forceverify.ts +++ b/src/commands/forceverify.ts @@ -30,7 +30,7 @@ export = { .setDefaultMemberPermissions(PermissionFlagsBits.Administrator) .setDMPermission(false), - async execute(interaction) { + async execute({ interaction }) { await interaction.deferReply() const user = interaction.options.getMember("user") as GuildMember diff --git a/src/commands/guild.ts b/src/commands/guild.ts index 7576375..ecdfcb9 100644 --- a/src/commands/guild.ts +++ b/src/commands/guild.ts @@ -77,7 +77,7 @@ export = { ) .setDMPermission(false), - async execute(interaction) { + async execute({ interaction }) { const subcommand = interaction.options.getSubcommand() if (subcommand === "member") { diff --git a/src/commands/help.ts b/src/commands/help.ts index ed10d7d..e64558e 100644 --- a/src/commands/help.ts +++ b/src/commands/help.ts @@ -13,7 +13,7 @@ export = { .setDescription("List's all commands usable by a member") .setDMPermission(false), - async execute(interaction, client) { + async execute({ interaction, client }) { await interaction.deferReply({ ephemeral: true }) type CommandList = { diff --git a/src/commands/instructions.ts b/src/commands/instructions.ts index 9f0dce8..bac0b62 100644 --- a/src/commands/instructions.ts +++ b/src/commands/instructions.ts @@ -14,7 +14,7 @@ export = { .setDefaultMemberPermissions(PermissionFlagsBits.Administrator) .setDMPermission(false), - async execute(interaction) { + async execute({ interaction }) { await interaction.reply({ embeds: [{ title: "Verification", diff --git a/src/commands/kick.ts b/src/commands/kick.ts index 7453389..8345f02 100644 --- a/src/commands/kick.ts +++ b/src/commands/kick.ts @@ -28,7 +28,7 @@ export = { .setDefaultMemberPermissions(PermissionFlagsBits.KickMembers) .setDMPermission(false), - async execute(interaction) { + async execute({ interaction }) { await interaction.deferReply() const member = interaction.options.getMember("member") as GuildMember diff --git a/src/commands/music.ts b/src/commands/music.ts index d0fdab8..cdf0bd2 100644 --- a/src/commands/music.ts +++ b/src/commands/music.ts @@ -71,7 +71,7 @@ export = { .setDMPermission(false) .setDefaultMemberPermissions(PermissionFlagsBits.Administrator), - async execute(interaction) { + async execute({ interaction }) { const subcommand = interaction.options.getSubcommand() if (subcommand === "play") { diff --git a/src/commands/ping.ts b/src/commands/ping.ts index cd022f6..1d6b751 100644 --- a/src/commands/ping.ts +++ b/src/commands/ping.ts @@ -13,7 +13,7 @@ export = { .setDescription("Get's the bot's ping.") .setDMPermission(false), - async execute(interaction, client) { + async execute({ interaction, client }) { await interaction.deferReply() await interaction.editReply({ embeds: [{ diff --git a/src/commands/pp.ts b/src/commands/pp.ts index b949f60..e4b0d2b 100644 --- a/src/commands/pp.ts +++ b/src/commands/pp.ts @@ -20,7 +20,7 @@ export = { ) .setDMPermission(false), - async execute(interaction) { + async execute({ interaction }) { const user = (interaction.options.getUser("user") || interaction.user) as User let size: number diff --git a/src/commands/remove.ts b/src/commands/remove.ts index 65f010b..abb2ba6 100644 --- a/src/commands/remove.ts +++ b/src/commands/remove.ts @@ -30,7 +30,7 @@ export = { .setDefaultMemberPermissions(PermissionFlagsBits.Administrator) .setDMPermission(false), - async execute(interaction) { + async execute({ interaction }) { await interaction.deferReply() const member = interaction.options.getMember("user") as GuildMember diff --git a/src/commands/reqs.ts b/src/commands/reqs.ts index c9a4f9f..348299d 100644 --- a/src/commands/reqs.ts +++ b/src/commands/reqs.ts @@ -14,7 +14,7 @@ export = { .setDescription("Displays the requirements for the guild.") .setDMPermission(false), - async execute(interaction) { + async execute({ interaction }) { await interaction.reply({ embeds: [{ title: "Requirements", diff --git a/src/commands/send.ts b/src/commands/send.ts index efe55ac..0e5bd34 100644 --- a/src/commands/send.ts +++ b/src/commands/send.ts @@ -26,7 +26,7 @@ export = { .setDefaultMemberPermissions(PermissionFlagsBits.Administrator) .setDMPermission(false), - async execute(interaction) { + async execute({ interaction }) { await interaction.deferReply({ ephemeral: true }) const message = interaction.options.getString("message")! diff --git a/src/commands/setnick.ts b/src/commands/setnick.ts index 3adf248..2b8c839 100644 --- a/src/commands/setnick.ts +++ b/src/commands/setnick.ts @@ -28,7 +28,7 @@ export = { .setDefaultMemberPermissions(PermissionFlagsBits.ManageNicknames) .setDMPermission(false), - async execute(interaction) { + async execute({ interaction }) { const member = interaction.options.getMember("user") as GuildMember const nickname = interaction.options.getString("nickname") diff --git a/src/commands/setup.ts b/src/commands/setup.ts index 8e2073d..692f90e 100644 --- a/src/commands/setup.ts +++ b/src/commands/setup.ts @@ -75,7 +75,7 @@ export = { .setDefaultMemberPermissions(PermissionFlagsBits.Administrator) .setDMPermission(false), - async execute(interaction) { + async execute({ interaction }) { const subcommand = interaction.options.getSubcommand() const channel = interaction.options.getChannel("channel") as TextChannel let title = "" diff --git a/src/commands/slowmode.ts b/src/commands/slowmode.ts index ac1b053..c1ffc5b 100644 --- a/src/commands/slowmode.ts +++ b/src/commands/slowmode.ts @@ -27,7 +27,7 @@ export = { .setDefaultMemberPermissions(PermissionFlagsBits.Administrator) .setDMPermission(false), - async execute(interaction) { + async execute({ interaction }) { await interaction.deferReply({ ephemeral: true }) const seconds = interaction.options.getInteger("seconds") ?? 5 diff --git a/src/commands/staff.ts b/src/commands/staff.ts index 5625bde..90a7e70 100644 --- a/src/commands/staff.ts +++ b/src/commands/staff.ts @@ -51,7 +51,7 @@ export = { .setDefaultMemberPermissions(PermissionFlagsBits.Administrator) .setDMPermission(false), - async execute(interaction, client) { + async execute({ interaction, client }) { const subcommand = interaction.options.getSubcommand() if (subcommand === "help") { diff --git a/src/commands/timeout.ts b/src/commands/timeout.ts index 8a644af..9a283c7 100644 --- a/src/commands/timeout.ts +++ b/src/commands/timeout.ts @@ -1,4 +1,4 @@ -import { SlashCommandBuilder, PermissionFlagsBits, userMention, ChatInputCommandInteraction, GuildMember } from "discord.js" +import { SlashCommandBuilder, PermissionFlagsBits, userMention, GuildMember } from "discord.js" import { embedColor, devMessage } from "config/options" import { ICommand } from "interfaces" import ms from "ms" @@ -34,7 +34,7 @@ export = { .setDefaultMemberPermissions(PermissionFlagsBits.Administrator) .setDMPermission(false), - async execute(interaction: ChatInputCommandInteraction) { + async execute({ interaction }) { await interaction.deferReply() const target = interaction.options.getMember("user")! as GuildMember diff --git a/src/commands/unban.ts b/src/commands/unban.ts index 2dfcd3a..74017eb 100644 --- a/src/commands/unban.ts +++ b/src/commands/unban.ts @@ -29,7 +29,7 @@ export = { .setDefaultMemberPermissions(PermissionFlagsBits.BanMembers) .setDMPermission(false), - async execute(interaction) { + async execute({ interaction }) { await interaction.deferReply() const userid = interaction.options.getString("user")! diff --git a/src/commands/update.ts b/src/commands/update.ts index fbc2a44..b451884 100644 --- a/src/commands/update.ts +++ b/src/commands/update.ts @@ -18,7 +18,7 @@ export = { .setDescription("Update your discord roles.") .setDMPermission(false), - async execute(interaction) { + async execute({ interaction }) { await interaction.deferReply() const user = interaction.member as GuildMember diff --git a/src/commands/uuid.ts b/src/commands/uuid.ts index 2eb4190..d2d65ed 100644 --- a/src/commands/uuid.ts +++ b/src/commands/uuid.ts @@ -22,7 +22,7 @@ export = { ) .setDMPermission(false), - async execute(interaction) { + async execute({ interaction }) { await interaction.deferReply() const ign = interaction.options.getString("ign")! diff --git a/src/commands/verify.ts b/src/commands/verify.ts index dd76538..f3465a5 100644 --- a/src/commands/verify.ts +++ b/src/commands/verify.ts @@ -27,7 +27,7 @@ export = { ) .setDMPermission(false), - async execute(interaction) { + async execute({ interaction }) { await interaction.deferReply() const user = interaction.member! as GuildMember diff --git a/src/commands/whoami.ts b/src/commands/whoami.ts index 7f724e1..3f02df5 100644 --- a/src/commands/whoami.ts +++ b/src/commands/whoami.ts @@ -15,7 +15,7 @@ export = { .setDescription("Get your user info") .setDMPermission(false), - async execute(interaction) { + async execute({ interaction }) { await interaction.deferReply() const user = interaction.user diff --git a/src/commands/whois.ts b/src/commands/whois.ts index 41181c1..963db42 100644 --- a/src/commands/whois.ts +++ b/src/commands/whois.ts @@ -22,7 +22,7 @@ export = { .setDefaultMemberPermissions(PermissionFlagsBits.Administrator) .setDMPermission(false), - async execute(interaction) { + async execute({ interaction }) { await interaction.deferReply() const user = interaction.options.getUser("user")! diff --git a/src/components/autocomplete/music.ts b/src/components/autocomplete/music.ts index 587cb3f..e0692a3 100644 --- a/src/components/autocomplete/music.ts +++ b/src/components/autocomplete/music.ts @@ -5,7 +5,7 @@ export = { name: "music", description: "Music", - async execute(interaction) { + async execute({ interaction }) { const focusedOption = interaction.options.getFocused(true) if (interaction.options.getSubcommand() !== "play" && focusedOption.name !== "query") return diff --git a/src/components/autocomplete/unban.ts b/src/components/autocomplete/unban.ts index 3df7003..3cef9a8 100644 --- a/src/components/autocomplete/unban.ts +++ b/src/components/autocomplete/unban.ts @@ -4,7 +4,7 @@ export = { name: "unban", description: "Unban a user from the server", - async execute(interaction) { + async execute({ interaction }) { const focusedOption = interaction.options.getFocused(true) if (focusedOption.name !== "user") return diff --git a/src/components/buttons/checkstats.ts b/src/components/buttons/checkstats.ts index 6946712..2cbf9ad 100644 --- a/src/components/buttons/checkstats.ts +++ b/src/components/buttons/checkstats.ts @@ -8,7 +8,7 @@ export = { name: "checkstats", description: "Check your stats.", - async execute(interaction) { + async execute({ interaction }) { await interaction.deferReply() const message = interaction.message diff --git a/src/components/buttons/guildapplicationaccept.ts b/src/components/buttons/guildapplicationaccept.ts index 31c7718..37b0b68 100644 --- a/src/components/buttons/guildapplicationaccept.ts +++ b/src/components/buttons/guildapplicationaccept.ts @@ -12,7 +12,7 @@ export = { name: "guildapplicationaccept", description: "Accept a guild application.", - async execute(interaction) { + async execute({ interaction }) { await interaction.deferReply() const user = interaction.user diff --git a/src/components/buttons/guildapplicationdeny.ts b/src/components/buttons/guildapplicationdeny.ts index ee6b10e..f887e7f 100644 --- a/src/components/buttons/guildapplicationdeny.ts +++ b/src/components/buttons/guildapplicationdeny.ts @@ -5,7 +5,7 @@ export = { name: "guildapplicationdeny", description: "Deny a guild application.", - async execute(interaction) { + async execute({ interaction }) { const modal = new ModalBuilder() .setTitle("Deny Reason") .setCustomId("denyreasonbox") diff --git a/src/components/buttons/guildapply.ts b/src/components/buttons/guildapply.ts index 6abdd11..f8addf7 100644 --- a/src/components/buttons/guildapply.ts +++ b/src/components/buttons/guildapply.ts @@ -12,7 +12,7 @@ export = { name: "guildapply", description: "Guild application button.", - async execute(interaction) { + async execute({ interaction }) { await interaction.deferReply({ ephemeral: true }) const user = interaction.member as GuildMember const guild = interaction.guild! diff --git a/src/components/buttons/guildinactivitylog.ts b/src/components/buttons/guildinactivitylog.ts index 692cc53..1b21ebc 100644 --- a/src/components/buttons/guildinactivitylog.ts +++ b/src/components/buttons/guildinactivitylog.ts @@ -11,7 +11,7 @@ export = { name: "guildinactivitylog", description: "Configure the bot.", - async execute(interaction) { + async execute({ interaction }) { const guild = interaction.guild! const user = interaction.member as GuildMember const userRoles = user.roles.cache diff --git a/src/components/buttons/inactiveapplicationaccept.ts b/src/components/buttons/inactiveapplicationaccept.ts index 51efe22..f93bf43 100644 --- a/src/components/buttons/inactiveapplicationaccept.ts +++ b/src/components/buttons/inactiveapplicationaccept.ts @@ -4,7 +4,7 @@ export = { name: "inactiveapplicationaccept", description: "Accept an inactivity application.", - async execute(interaction) { + async execute({ interaction }) { await interaction.reply({ content: "This button is currently disabled.", ephemeral: true diff --git a/src/components/buttons/inactiveapplicationdeny.ts b/src/components/buttons/inactiveapplicationdeny.ts index c294f67..a28241f 100644 --- a/src/components/buttons/inactiveapplicationdeny.ts +++ b/src/components/buttons/inactiveapplicationdeny.ts @@ -4,7 +4,7 @@ export = { name: "inactiveapplicationdeny", description: "Denies an inactivity application.", - async execute(interaction) { + async execute({ interaction }) { await interaction.reply({ content: "This button is currently disabled.", ephemeral: true diff --git a/src/components/buttons/staffapplicationaccept.ts b/src/components/buttons/staffapplicationaccept.ts index 7691550..f3d1e87 100644 --- a/src/components/buttons/staffapplicationaccept.ts +++ b/src/components/buttons/staffapplicationaccept.ts @@ -7,7 +7,7 @@ export = { name: "staffapplicationaccept", description: "Accept a staff application.", - async execute(interaction) { + async execute({ interaction }) { await interaction.deferReply() const user = interaction.user diff --git a/src/components/buttons/staffapplicationdeny.ts b/src/components/buttons/staffapplicationdeny.ts index 97ccfe6..36a3435 100644 --- a/src/components/buttons/staffapplicationdeny.ts +++ b/src/components/buttons/staffapplicationdeny.ts @@ -5,7 +5,7 @@ export = { name: "staffapplicationdeny", description: "Deny a guild application.", - async execute(interaction) { + async execute({ interaction }) { const modal = new ModalBuilder() .setTitle("Deny Reason") .setCustomId("staffdenyreasonbox") diff --git a/src/components/buttons/staffapply.ts b/src/components/buttons/staffapply.ts index aa564bf..432511b 100644 --- a/src/components/buttons/staffapply.ts +++ b/src/components/buttons/staffapply.ts @@ -14,7 +14,7 @@ export = { name: "staffapply", description: "Apply for the staff team.", - async execute(interaction) { + async execute({ interaction }) { const user = interaction.member as GuildMember const guild = interaction.guild! const userRoles = user.roles.cache diff --git a/src/components/buttons/verify.ts b/src/components/buttons/verify.ts index 593bf2d..bcd6a18 100644 --- a/src/components/buttons/verify.ts +++ b/src/components/buttons/verify.ts @@ -5,7 +5,7 @@ export = { name: "verify", description: "Configure the bot.", - async execute(interaction) { + async execute({ interaction }) { const modal = new ModalBuilder() .setTitle("Verification") .setCustomId("verifybox") diff --git a/src/components/buttons/waitingListUpdate.ts b/src/components/buttons/waitingListUpdate.ts index 65f6e47..7dd8071 100644 --- a/src/components/buttons/waitingListUpdate.ts +++ b/src/components/buttons/waitingListUpdate.ts @@ -7,7 +7,7 @@ export = { name: "waitinglistupdate", description: "Update the waiting list.", - async execute(interaction) { + async execute({ interaction }) { await interaction.deferReply({ ephemeral: true }) const user = interaction.user diff --git a/src/components/modals/denyreasonbox.ts b/src/components/modals/denyreasonbox.ts index 620a5e2..86b17cf 100644 --- a/src/components/modals/denyreasonbox.ts +++ b/src/components/modals/denyreasonbox.ts @@ -7,7 +7,7 @@ export = { name: "denyreasonbox", description: "Deny reason box.", - async execute(interaction) { + async execute({ interaction }) { await interaction.deferReply() const guild = interaction.guild! diff --git a/src/components/modals/staffdenyreasonbox.ts b/src/components/modals/staffdenyreasonbox.ts index 1a1ddff..66cc9bd 100644 --- a/src/components/modals/staffdenyreasonbox.ts +++ b/src/components/modals/staffdenyreasonbox.ts @@ -7,7 +7,7 @@ export = { name: "staffdenyreasonbox", description: "Deny reason box.", - async execute(interaction) { + async execute({ interaction }) { await interaction.deferReply() const guild = interaction.guild diff --git a/src/components/modals/verifyModal.ts b/src/components/modals/verifyModal.ts index 974741a..490ff32 100644 --- a/src/components/modals/verifyModal.ts +++ b/src/components/modals/verifyModal.ts @@ -10,7 +10,7 @@ export = { name: "verifybox", description: "Verify box.", - async execute(interaction) { + async execute({ interaction }) { await interaction.deferReply({ ephemeral: true }) const user = interaction.member as GuildMember diff --git a/src/interfaces/IAutocomplete.ts b/src/interfaces/IAutocomplete.ts index 3c62ce9..937d4ed 100644 --- a/src/interfaces/IAutocomplete.ts +++ b/src/interfaces/IAutocomplete.ts @@ -1,8 +1,9 @@ /* eslint-disable no-unused-vars */ import { AutocompleteInteraction } from "discord.js" +import { ExtendedClient } from "utils/Client" export default interface IAutocomplete { name: string description: string - execute: (interacion: AutocompleteInteraction) => Promise + execute: (arg: { interaction: AutocompleteInteraction, client :ExtendedClient }) => Promise } diff --git a/src/interfaces/IButton.ts b/src/interfaces/IButton.ts index 91a9705..069ced5 100644 --- a/src/interfaces/IButton.ts +++ b/src/interfaces/IButton.ts @@ -1,8 +1,9 @@ /* eslint-disable no-unused-vars */ import { ButtonInteraction } from "discord.js" +import { ExtendedClient } from "utils/Client" export default interface IButton { name: string description: string - execute: (interaction: ButtonInteraction) => Promise + execute: (arg: { interaction: ButtonInteraction, client: ExtendedClient }) => Promise } diff --git a/src/interfaces/ICommand.ts b/src/interfaces/ICommand.ts index 11ae866..3b1c094 100644 --- a/src/interfaces/ICommand.ts +++ b/src/interfaces/ICommand.ts @@ -9,5 +9,5 @@ export default interface ICommand { public: boolean subcommands?: boolean data: SlashCommandBuilder - execute: (interaction: ChatInputCommandInteraction, client: Client) => Promise + execute: (arg: { interaction: ChatInputCommandInteraction, client: Client }) => Promise } diff --git a/src/interfaces/IContextMenu.ts b/src/interfaces/IContextMenu.ts index 067c960..7db513f 100644 --- a/src/interfaces/IContextMenu.ts +++ b/src/interfaces/IContextMenu.ts @@ -1,13 +1,11 @@ /* eslint-disable no-unused-vars */ -import { - ContextMenuCommandInteraction, - ContextMenuCommandBuilder -} from "discord.js" +import { ContextMenuCommandInteraction, ContextMenuCommandBuilder } from "discord.js" +import { ExtendedClient } from "utils/Client" export default interface IContextMenu { name: string description: string dev?: boolean data: ContextMenuCommandBuilder - execute: (interaction: ContextMenuCommandInteraction) => Promise + execute: (arg: { interaction: ContextMenuCommandInteraction, client: ExtendedClient }) => Promise } diff --git a/src/interfaces/IModal.ts b/src/interfaces/IModal.ts index faf0dd6..f4a0d79 100644 --- a/src/interfaces/IModal.ts +++ b/src/interfaces/IModal.ts @@ -1,8 +1,9 @@ /* eslint-disable no-unused-vars */ import { ModalSubmitInteraction } from "discord.js" +import { ExtendedClient } from "utils/Client" export default interface IModal { name: string description: string - execute: (interaction: ModalSubmitInteraction) => Promise + execute: (arg: { interaction: ModalSubmitInteraction, client: ExtendedClient }) => Promise } diff --git a/src/utils/Events/autocomplete.ts b/src/utils/Events/autocomplete.ts index a554c19..f8a58b3 100644 --- a/src/utils/Events/autocomplete.ts +++ b/src/utils/Events/autocomplete.ts @@ -40,7 +40,7 @@ export default function loadAutocompleteEvents(client: Client, ft: FileType) { } try { - await autocomplete.execute(interaction) + await autocomplete.execute({ interaction, client }) } catch (error) { if (process.env.NODE_ENV !== "dev") { await logToChannel("error", { diff --git a/src/utils/Events/button.ts b/src/utils/Events/button.ts index f9f0702..f825b0a 100644 --- a/src/utils/Events/button.ts +++ b/src/utils/Events/button.ts @@ -40,7 +40,7 @@ export default function loadButtonEvents(client: Client, ft: FileType) { } try { - await button.execute(interaction) + await button.execute({ interaction, client }) } catch (error) { if (process.env.NODE_ENV !== "dev") { await logToChannel("error", { diff --git a/src/utils/Events/command.ts b/src/utils/Events/command.ts index 161cb0c..c41f1d5 100644 --- a/src/utils/Events/command.ts +++ b/src/utils/Events/command.ts @@ -43,7 +43,7 @@ export default function loadSlashCommandsEvents(client: Client, ft: FileType) { } try { - await command.execute(interaction, client) + await command.execute({ interaction, client }) } catch (error) { if (process.env.NODE_ENV !== "dev") { await logToChannel("error", { diff --git a/src/utils/Events/contextmenu.ts b/src/utils/Events/contextmenu.ts index 6ef4d2e..184e4bc 100644 --- a/src/utils/Events/contextmenu.ts +++ b/src/utils/Events/contextmenu.ts @@ -41,7 +41,7 @@ export default function loadContextMenuEvents(client: Client, ft: FileType) { } try { - await command.execute(interaction) + await command.execute({ interaction, client }) } catch (error) { if (process.env.NODE_ENV !== "dev") { await logToChannel("error", { diff --git a/src/utils/Events/modal.ts b/src/utils/Events/modal.ts index 2b0e764..33a7994 100644 --- a/src/utils/Events/modal.ts +++ b/src/utils/Events/modal.ts @@ -40,7 +40,7 @@ export default function loadModalEvents(client: Client, ft: FileType) { } try { - await modal.execute(interaction) + await modal.execute({ interaction, client }) } catch (error) { if (process.env.NODE_ENV !== "dev") { await logToChannel("error", {