Moved to using an object for execute args
This commit is contained in:
@@ -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<void>
|
||||
execute: (arg: { interaction: AutocompleteInteraction, client :ExtendedClient }) => Promise<void>
|
||||
}
|
||||
|
||||
@@ -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<void>
|
||||
execute: (arg: { interaction: ButtonInteraction, client: ExtendedClient }) => Promise<void>
|
||||
}
|
||||
|
||||
@@ -9,5 +9,5 @@ export default interface ICommand {
|
||||
public: boolean
|
||||
subcommands?: boolean
|
||||
data: SlashCommandBuilder
|
||||
execute: (interaction: ChatInputCommandInteraction, client: Client) => Promise<void>
|
||||
execute: (arg: { interaction: ChatInputCommandInteraction, client: Client }) => Promise<void>
|
||||
}
|
||||
|
||||
@@ -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<void>
|
||||
execute: (arg: { interaction: ContextMenuCommandInteraction, client: ExtendedClient }) => Promise<void>
|
||||
}
|
||||
|
||||
@@ -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<void>
|
||||
execute: (arg: { interaction: ModalSubmitInteraction, client: ExtendedClient }) => Promise<void>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user