seyfert 2.2.1-dev-12530385627.0 → 2.2.1-dev-12543676507.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.
@@ -1,8 +1,8 @@
1
1
  import type { ReturnCache } from '../..';
2
2
  import type { GuildMemberStructure, GuildStructure, InteractionGuildMemberStructure, MessageStructure, OptionResolverStructure, UserStructure, WebhookMessageStructure } from '../../client/transformers';
3
3
  import type { If, MakeRequired, UnionToTuple, When } from '../../common';
4
- import type { InteractionCreateBodyRequest, InteractionMessageUpdateBodyRequest } from '../../common/types/write';
5
- import { type AllChannels, ChatInputCommandInteraction } from '../../structures';
4
+ import type { InteractionCreateBodyRequest, InteractionMessageUpdateBodyRequest, MessageWebhookCreateBodyRequest } from '../../common/types/write';
5
+ import { type AllChannels, ChatInputCommandInteraction, type Message } from '../../structures';
6
6
  import { BaseContext } from '../basecontext';
7
7
  import type { RegisteredMiddlewares } from '../decorators';
8
8
  import type { Command, ContextOptions, OptionsRecord, SubCommand } from './chat';
@@ -21,16 +21,13 @@ export declare class CommandContext<T extends OptionsRecord = {}, M extends keyo
21
21
  options: ContextOptions<T>;
22
22
  metadata: CommandMetadata<UnionToTuple<M>>;
23
23
  globalMetadata: GlobalMetadata;
24
- get proxy(): import("../..").APIRoutes;
25
- get t(): import("../..").__InternalParseLocale<import("./shared").DefaultLocale> & {
26
- get(locale?: string): import("./shared").DefaultLocale;
27
- };
28
24
  get fullCommandName(): string;
29
25
  write<WR extends boolean = false>(body: InteractionCreateBodyRequest, withResponse?: WR): Promise<When<WR, WebhookMessageStructure | When<InferWithPrefix, MessageStructure, never>, void | WebhookMessageStructure | When<InferWithPrefix, MessageStructure, never>>>;
30
26
  deferReply<WR extends boolean = false>(ephemeral?: boolean, withResponse?: WR): Promise<When<WR, WebhookMessageStructure | When<InferWithPrefix, MessageStructure, never>, When<InferWithPrefix, MessageStructure, never> | undefined>>;
31
27
  editResponse(body: InteractionMessageUpdateBodyRequest): Promise<When<InferWithPrefix, WebhookMessageStructure | MessageStructure, WebhookMessageStructure>>;
32
28
  deleteResponse(): Promise<void>;
33
29
  editOrReply<WR extends boolean = false>(body: InteractionCreateBodyRequest | InteractionMessageUpdateBodyRequest, withResponse?: WR): Promise<When<WR, WebhookMessageStructure | When<InferWithPrefix, MessageStructure, never>, void | WebhookMessageStructure | When<InferWithPrefix, MessageStructure, never>>>;
30
+ followup(body: MessageWebhookCreateBodyRequest): Promise<Message> | Promise<import("../..").WebhookMessage>;
34
31
  fetchResponse(): Promise<If<InferWithPrefix, WebhookMessageStructure | MessageStructure, WebhookMessageStructure>>;
35
32
  channel(mode?: 'rest' | 'flow'): Promise<If<InferWithPrefix, AllChannels | undefined, AllChannels>>;
36
33
  channel(mode: 'cache'): ReturnCache<If<InferWithPrefix, AllChannels | undefined, AllChannels>>;
@@ -28,12 +28,6 @@ class CommandContext extends basecontext_1.BaseContext {
28
28
  options = {};
29
29
  metadata = {};
30
30
  globalMetadata = {};
31
- get proxy() {
32
- return this.client.proxy;
33
- }
34
- get t() {
35
- return this.client.t(this.interaction?.locale ?? this.client.langs.defaultLang ?? 'en-US');
36
- }
37
31
  get fullCommandName() {
38
32
  return this.resolver.fullCommandName;
39
33
  }
@@ -75,6 +69,11 @@ class CommandContext extends basecontext_1.BaseContext {
75
69
  }
76
70
  return this.write(body, withResponse);
77
71
  }
72
+ followup(body) {
73
+ if (this.interaction)
74
+ return this.interaction.followup(body);
75
+ return this.messageResponse.reply(body);
76
+ }
78
77
  async fetchResponse() {
79
78
  if (this.interaction)
80
79
  return this.interaction.fetchResponse();
@@ -1,6 +1,6 @@
1
1
  import type { ReturnCache } from '../..';
2
2
  import type { GuildMemberStructure, GuildStructure, InteractionGuildMemberStructure, UserStructure, WebhookMessageStructure } from '../../client/transformers';
3
- import type { InteractionCreateBodyRequest, InteractionMessageUpdateBodyRequest, MakeRequired, ModalCreateBodyRequest, UnionToTuple, When } from '../../common';
3
+ import type { InteractionCreateBodyRequest, InteractionMessageUpdateBodyRequest, MakeRequired, MessageWebhookCreateBodyRequest, ModalCreateBodyRequest, UnionToTuple, When } from '../../common';
4
4
  import type { AllChannels, EntryPointInteraction } from '../../structures';
5
5
  import { BaseContext } from '../basecontext';
6
6
  import type { RegisteredMiddlewares } from '../decorators';
@@ -26,6 +26,7 @@ export declare class EntryPointContext<M extends keyof RegisteredMiddlewares = n
26
26
  editResponse(body: InteractionMessageUpdateBodyRequest): Promise<WebhookMessageStructure>;
27
27
  deleteResponse(): Promise<void>;
28
28
  editOrReply<WR extends boolean = false>(body: InteractionCreateBodyRequest | InteractionMessageUpdateBodyRequest, withResponse?: WR): Promise<When<WR, WebhookMessageStructure, void>>;
29
+ followup(body: MessageWebhookCreateBodyRequest): Promise<import("../..").WebhookMessage>;
29
30
  fetchResponse(): Promise<WebhookMessageStructure>;
30
31
  channel(mode?: 'rest' | 'flow'): Promise<AllChannels>;
31
32
  channel(mode: 'cache'): ReturnCache<AllChannels>;
@@ -41,6 +41,9 @@ class EntryPointContext extends basecontext_1.BaseContext {
41
41
  editOrReply(body, withResponse) {
42
42
  return this.interaction.editOrReply(body, withResponse);
43
43
  }
44
+ followup(body) {
45
+ return this.interaction.followup(body);
46
+ }
44
47
  fetchResponse() {
45
48
  return this.interaction.fetchResponse();
46
49
  }
@@ -1,6 +1,6 @@
1
1
  import type { ContextMenuCommand, InteractionGuildMemberStructure, ReturnCache } from '../..';
2
2
  import { type GuildMemberStructure, type GuildStructure, type MessageStructure, type UserStructure, type WebhookMessageStructure } from '../../client/transformers';
3
- import { type InteractionCreateBodyRequest, type InteractionMessageUpdateBodyRequest, type MakeRequired, type ModalCreateBodyRequest, type UnionToTuple, type When } from '../../common';
3
+ import { type InteractionCreateBodyRequest, type InteractionMessageUpdateBodyRequest, type MakeRequired, type MessageWebhookCreateBodyRequest, type ModalCreateBodyRequest, type UnionToTuple, type When } from '../../common';
4
4
  import type { AllChannels, MessageCommandInteraction, UserCommandInteraction } from '../../structures';
5
5
  import { BaseContext } from '../basecontext';
6
6
  import type { RegisteredMiddlewares } from '../decorators';
@@ -27,6 +27,7 @@ export declare class MenuCommandContext<T extends MessageCommandInteraction | Us
27
27
  editResponse(body: InteractionMessageUpdateBodyRequest): Promise<WebhookMessageStructure>;
28
28
  deleteResponse(): Promise<void>;
29
29
  editOrReply<WR extends boolean = false>(body: InteractionCreateBodyRequest | InteractionMessageUpdateBodyRequest, withResponse?: WR): Promise<When<WR, WebhookMessageStructure, void>>;
30
+ followup(body: MessageWebhookCreateBodyRequest): Promise<import("../..").WebhookMessage>;
30
31
  fetchResponse(): Promise<WebhookMessageStructure>;
31
32
  channel(mode?: 'rest' | 'flow'): Promise<AllChannels>;
32
33
  channel(mode: 'cache'): ReturnCache<AllChannels>;
@@ -56,6 +56,9 @@ class MenuCommandContext extends basecontext_1.BaseContext {
56
56
  editOrReply(body, withResponse) {
57
57
  return this.interaction.editOrReply(body, withResponse);
58
58
  }
59
+ followup(body) {
60
+ return this.interaction.followup(body);
61
+ }
59
62
  fetchResponse() {
60
63
  return this.interaction.fetchResponse();
61
64
  }
@@ -2,7 +2,7 @@ import type { AllChannels, ButtonInteraction, ChannelSelectMenuInteraction, Comp
2
2
  import type { GuildMemberStructure, GuildStructure, InteractionGuildMemberStructure, UserStructure, WebhookMessageStructure } from '../client/transformers';
3
3
  import type { CommandMetadata, ExtendContext, GlobalMetadata, RegisteredMiddlewares, UsingClient } from '../commands';
4
4
  import { BaseContext } from '../commands/basecontext';
5
- import type { ComponentInteractionMessageUpdate, InteractionCreateBodyRequest, InteractionMessageUpdateBodyRequest, MakeRequired, ModalCreateBodyRequest, UnionToTuple, When } from '../common';
5
+ import type { ComponentInteractionMessageUpdate, InteractionCreateBodyRequest, InteractionMessageUpdateBodyRequest, MakeRequired, MessageWebhookCreateBodyRequest, ModalCreateBodyRequest, UnionToTuple, When } from '../common';
6
6
  export interface ComponentContext<Type extends keyof ContextComponentCommandInteractionMap = keyof ContextComponentCommandInteractionMap> extends BaseContext, ExtendContext {
7
7
  }
8
8
  /**
@@ -62,6 +62,7 @@ export declare class ComponentContext<Type extends keyof ContextComponentCommand
62
62
  * @param fetchReply - Whether to fetch the reply or not.
63
63
  */
64
64
  editOrReply<FR extends boolean = false>(body: InteractionCreateBodyRequest | InteractionMessageUpdateBodyRequest, fetchReply?: FR): Promise<When<FR, WebhookMessageStructure, void>>;
65
+ followup(body: MessageWebhookCreateBodyRequest): Promise<import("..").WebhookMessage>;
65
66
  /**
66
67
  * @returns A Promise that resolves to the fetched message
67
68
  */
@@ -78,6 +78,9 @@ class ComponentContext extends basecontext_1.BaseContext {
78
78
  editOrReply(body, fetchReply) {
79
79
  return this.interaction.editOrReply(body, fetchReply);
80
80
  }
81
+ followup(body) {
82
+ return this.interaction.followup(body);
83
+ }
81
84
  /**
82
85
  * @returns A Promise that resolves to the fetched message
83
86
  */
@@ -2,7 +2,7 @@ import type { AllChannels, Interaction, ModalCommand, ModalSubmitInteraction, Re
2
2
  import type { GuildMemberStructure, GuildStructure, InteractionGuildMemberStructure, UserStructure, WebhookMessageStructure } from '../client/transformers';
3
3
  import type { CommandMetadata, ExtendContext, GlobalMetadata, RegisteredMiddlewares, UsingClient } from '../commands';
4
4
  import { BaseContext } from '../commands/basecontext';
5
- import type { InteractionCreateBodyRequest, InteractionMessageUpdateBodyRequest, MakeRequired, ModalCreateBodyRequest, UnionToTuple, When } from '../common';
5
+ import type { InteractionCreateBodyRequest, InteractionMessageUpdateBodyRequest, MakeRequired, MessageWebhookCreateBodyRequest, ModalCreateBodyRequest, UnionToTuple, When } from '../common';
6
6
  export interface ModalContext extends BaseContext, ExtendContext {
7
7
  }
8
8
  /**
@@ -58,6 +58,7 @@ export declare class ModalContext<M extends keyof RegisteredMiddlewares = never>
58
58
  * @param fetchReply - Whether to fetch the reply or not.
59
59
  */
60
60
  editOrReply<FR extends boolean = false>(body: InteractionCreateBodyRequest | InteractionMessageUpdateBodyRequest, fetchReply?: FR): Promise<When<FR, WebhookMessageStructure, void>>;
61
+ followup(body: MessageWebhookCreateBodyRequest): Promise<import("..").WebhookMessage>;
61
62
  /**
62
63
  * @returns A Promise that resolves to the fetched message
63
64
  */
@@ -65,6 +65,9 @@ class ModalContext extends basecontext_1.BaseContext {
65
65
  editOrReply(body, fetchReply) {
66
66
  return this.interaction.editOrReply(body, fetchReply);
67
67
  }
68
+ followup(body) {
69
+ return this.interaction.followup(body);
70
+ }
68
71
  /**
69
72
  * @returns A Promise that resolves to the fetched message
70
73
  */
package/lib/deps/mixer.js CHANGED
@@ -48,7 +48,7 @@ function Mixin(...args) {
48
48
  const ignoreOverwriteToString = Object.keys(Object.getOwnPropertyDescriptors(args[0].prototype)).includes('toString');
49
49
  function MixedClass(...constructorArgs) {
50
50
  for (const i of args) {
51
- const descriptors = getDescriptors(i).toReversed();
51
+ const descriptors = getDescriptors(i).reverse();
52
52
  for (const j of descriptors) {
53
53
  // @ts-expect-error
54
54
  Object.assign(this, new j.constructor.value(...constructorArgs));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "seyfert",
3
- "version": "2.2.1-dev-12530385627.0",
3
+ "version": "2.2.1-dev-12543676507.0",
4
4
  "description": "The most advanced framework for discord bots",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./lib/index.js",