/[sudobot]/trunk/src/utils/structures/BaseCommand.ts
ViewVC logotype

Diff of /trunk/src/utils/structures/BaseCommand.ts

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 63 by rakin, Mon Jul 29 17:28:25 2024 UTC revision 64 by rakin, Mon Jul 29 17:28:27 2024 UTC
# Line 1  Line 1 
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    
# Line 25  export default abstract class BaseComman Line 26  export default abstract class BaseComman
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));

Legend:
Removed from v.63  
changed lines
  Added in v.64

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26