1 |
import { CommandInteraction, CommandInteractionOption, Interaction, Message, MessageEditOptions, MessageOptions, MessagePayload, WebhookEditMessageOptions } from 'discord.js'; |
import { AutocompleteInteraction, CommandInteraction, CommandInteractionOption, Interaction, Message, MessageEditOptions, MessageOptions, MessagePayload, WebhookEditMessageOptions } from 'discord.js'; |
2 |
import DiscordClient from '../../client/Client'; |
import DiscordClient from '../../client/Client'; |
3 |
|
import AutoCompleteOptions from '../../types/AutoCompleteOptions'; |
4 |
import CommandOptions from '../../types/CommandOptions'; |
import CommandOptions from '../../types/CommandOptions'; |
5 |
import InteractionOptions from '../../types/InteractionOptions'; |
import InteractionOptions from '../../types/InteractionOptions'; |
6 |
|
|
26 |
return this.aliases; |
return this.aliases; |
27 |
} |
} |
28 |
|
|
29 |
|
async autoComplete(client: DiscordClient, interaction: AutocompleteInteraction, options: AutoCompleteOptions): Promise <void> { |
30 |
|
|
31 |
|
} |
32 |
|
|
33 |
async deferReply(msg: Message | CommandInteraction, options: MessageOptions | string | MessagePayload | WebhookEditMessageOptions, edit: boolean = false): Promise<Message | CommandInteraction> { |
async deferReply(msg: Message | CommandInteraction, options: MessageOptions | string | MessagePayload | WebhookEditMessageOptions, edit: boolean = false): Promise<Message | CommandInteraction> { |
34 |
if (msg instanceof Message) { |
if (msg instanceof Message) { |
35 |
return await msg[edit ? 'edit' : 'reply'](options as (MessageOptions & MessageEditOptions)); |
return await msg[edit ? 'edit' : 'reply'](options as (MessageOptions & MessageEditOptions)); |