seyfert 3.1.3-dev-14894629220.0 → 3.1.3-dev-14983655996.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -47,8 +47,8 @@ export interface ClientOptions extends BaseClientOptions {
47
47
  };
48
48
  commands?: BaseClientOptions['commands'] & {
49
49
  prefix?: (message: MessageStructure) => Awaitable<string[]>;
50
- deferReplyResponse?: (ctx: CommandContext) => Parameters<Message['write']>[0];
51
- reply?: (ctx: CommandContext) => boolean;
50
+ deferReplyResponse?: (ctx: CommandContext) => Awaitable<Parameters<Message['write']>[0]>;
51
+ reply?: (ctx: CommandContext) => Awaitable<boolean>;
52
52
  };
53
53
  handlePayload?: ShardManagerOptions['handlePayload'];
54
54
  resharding?: PickPartial<NonNullable<ShardManagerOptions['resharding']>, 'getInfo'>;
@@ -38,14 +38,14 @@ class CommandContext extends basecontext_1.BaseContext {
38
38
  if (this.interaction)
39
39
  return this.interaction.write(body, withResponse);
40
40
  const options = this.client.options?.commands;
41
- return (this.messageResponse = await this.message[!this.messageResponse && options?.reply?.(this) ? 'reply' : 'write'](body));
41
+ return (this.messageResponse = await this.message[!this.messageResponse && (await options?.reply?.(this)) ? 'reply' : 'write'](body));
42
42
  }
43
43
  async deferReply(ephemeral = false, withResponse) {
44
44
  if (this.interaction)
45
45
  return this.interaction.deferReply(ephemeral ? types_1.MessageFlags.Ephemeral : undefined, withResponse);
46
46
  this.__deferred = true;
47
47
  const options = this.client.options?.commands;
48
- return (this.messageResponse = await this.message[options?.reply?.(this) ? 'reply' : 'write'](options?.deferReplyResponse?.(this) ?? { content: 'Thinking...' }));
48
+ return (this.messageResponse = await this.message[(await options?.reply?.(this)) ? 'reply' : 'write']((await options?.deferReplyResponse?.(this)) ?? { content: 'Thinking...' }));
49
49
  }
50
50
  async editResponse(body) {
51
51
  if (this.interaction)
@@ -29,6 +29,7 @@ export type ComponentCommands = ComponentCommand | ModalCommand;
29
29
  export interface CreateComponentCollectorResult {
30
30
  run<T extends CollectorInteraction = CollectorInteraction>(customId: UserMatches, callback: ComponentCallback<T>): void;
31
31
  stop(reason?: string): void;
32
+ resetTimeouts(): void;
32
33
  }
33
34
  export declare class ComponentHandler extends BaseHandler {
34
35
  protected client: UsingClient;
@@ -73,6 +73,9 @@ class ComponentHandler extends common_1.BaseHandler {
73
73
  this.createComponentCollector(messageId, channelId, guildId, options, old.components);
74
74
  });
75
75
  },
76
+ resetTimeouts: () => {
77
+ this.resetTimeouts(messageId);
78
+ },
76
79
  };
77
80
  }
78
81
  async onComponent(id, interaction) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "seyfert",
3
- "version": "3.1.3-dev-14894629220.0",
3
+ "version": "3.1.3-dev-14983655996.0",
4
4
  "description": "The most advanced framework for discord bots",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./lib/index.js",