seyfert 1.3.3 → 1.5.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.
Files changed (138) hide show
  1. package/README.md +7 -7
  2. package/lib/api/Router.js +3 -1
  3. package/lib/api/Routes/guilds.d.ts +4 -1
  4. package/lib/api/api.js +13 -7
  5. package/lib/builders/Attachment.d.ts +1 -4
  6. package/lib/builders/Attachment.js +4 -4
  7. package/lib/cache/adapters/workeradapter.js +7 -3
  8. package/lib/cache/index.d.ts +6 -2
  9. package/lib/cache/index.js +18 -0
  10. package/lib/cache/resources/bans.d.ts +12 -0
  11. package/lib/cache/resources/bans.js +35 -0
  12. package/lib/cache/resources/default/base.d.ts +1 -2
  13. package/lib/cache/resources/default/guild-based.d.ts +1 -2
  14. package/lib/cache/resources/members.js +4 -4
  15. package/lib/cache/resources/messages.js +8 -6
  16. package/lib/client/base.d.ts +33 -7
  17. package/lib/client/base.js +80 -21
  18. package/lib/client/client.d.ts +18 -6
  19. package/lib/client/client.js +45 -37
  20. package/lib/client/collectors.d.ts +36 -0
  21. package/lib/client/collectors.js +85 -0
  22. package/lib/client/httpclient.d.ts +7 -8
  23. package/lib/client/httpclient.js +96 -17
  24. package/lib/client/oninteractioncreate.d.ts +2 -2
  25. package/lib/client/oninteractioncreate.js +15 -7
  26. package/lib/client/onmessagecreate.d.ts +12 -2
  27. package/lib/client/onmessagecreate.js +105 -82
  28. package/lib/client/workerclient.d.ts +5 -2
  29. package/lib/client/workerclient.js +66 -63
  30. package/lib/collection.d.ts +2 -2
  31. package/lib/collection.js +2 -2
  32. package/lib/commands/applications/chat.d.ts +11 -10
  33. package/lib/commands/applications/chat.js +23 -8
  34. package/lib/commands/applications/chatcontext.d.ts +1 -1
  35. package/lib/commands/applications/chatcontext.js +2 -2
  36. package/lib/commands/applications/menu.d.ts +8 -7
  37. package/lib/commands/applications/menu.js +3 -50
  38. package/lib/commands/applications/menucontext.d.ts +1 -1
  39. package/lib/commands/applications/menucontext.js +3 -3
  40. package/lib/commands/applications/options.d.ts +3 -1
  41. package/lib/commands/applications/shared.d.ts +12 -0
  42. package/lib/commands/basecontext.d.ts +26 -0
  43. package/lib/commands/{basecontex.js → basecontext.js} +24 -0
  44. package/lib/commands/decorators.d.ts +11 -17
  45. package/lib/commands/decorators.js +7 -14
  46. package/lib/commands/handler.d.ts +6 -1
  47. package/lib/commands/handler.js +161 -29
  48. package/lib/common/bot/watcher.d.ts +1 -2
  49. package/lib/common/bot/watcher.js +9 -4
  50. package/lib/common/index.d.ts +1 -0
  51. package/lib/common/index.js +3 -1
  52. package/lib/common/it/formatter.d.ts +155 -0
  53. package/lib/common/it/formatter.js +184 -0
  54. package/lib/common/it/logger.d.ts +1 -1
  55. package/lib/common/it/logger.js +14 -13
  56. package/lib/common/it/utils.d.ts +2 -0
  57. package/lib/common/it/utils.js +21 -9
  58. package/lib/common/shorters/bans.d.ts +43 -0
  59. package/lib/common/shorters/bans.js +78 -0
  60. package/lib/common/shorters/emojis.d.ts +1 -1
  61. package/lib/common/shorters/emojis.js +4 -3
  62. package/lib/common/shorters/interaction.js +9 -7
  63. package/lib/common/shorters/messages.js +2 -2
  64. package/lib/common/shorters/webhook.js +2 -2
  65. package/lib/components/componentcommand.d.ts +22 -0
  66. package/lib/components/{command.js → componentcommand.js} +3 -5
  67. package/lib/components/componentcontext.d.ts +20 -16
  68. package/lib/components/componentcontext.js +27 -9
  69. package/lib/components/handler.d.ts +11 -6
  70. package/lib/components/handler.js +106 -32
  71. package/lib/components/index.d.ts +3 -1
  72. package/lib/components/index.js +3 -1
  73. package/lib/components/modalcommand.d.ts +16 -0
  74. package/lib/components/modalcommand.js +10 -0
  75. package/lib/components/modalcontext.d.ts +104 -0
  76. package/lib/components/modalcontext.js +132 -0
  77. package/lib/events/event.d.ts +4 -3
  78. package/lib/events/handler.d.ts +12 -6
  79. package/lib/events/handler.js +60 -20
  80. package/lib/events/hooks/application_command.d.ts +2 -2
  81. package/lib/events/hooks/auto_moderation.d.ts +5 -5
  82. package/lib/events/hooks/channel.d.ts +5 -5
  83. package/lib/events/hooks/custom.d.ts +3 -3
  84. package/lib/events/hooks/dispatch.d.ts +4 -4
  85. package/lib/events/hooks/entitlement.d.ts +4 -4
  86. package/lib/events/hooks/guild.d.ts +41 -96
  87. package/lib/events/hooks/guild.js +6 -6
  88. package/lib/events/hooks/integration.d.ts +61 -4
  89. package/lib/events/hooks/interactions.d.ts +2 -2
  90. package/lib/events/hooks/invite.d.ts +6 -3
  91. package/lib/events/hooks/message.d.ts +23 -18
  92. package/lib/events/hooks/message.js +1 -1
  93. package/lib/events/hooks/presence.d.ts +11 -3
  94. package/lib/events/hooks/presence.js +2 -2
  95. package/lib/events/hooks/stage.d.ts +7 -13
  96. package/lib/events/hooks/stage.js +2 -2
  97. package/lib/events/hooks/thread.d.ts +21 -10
  98. package/lib/events/hooks/thread.js +2 -2
  99. package/lib/events/hooks/typing.d.ts +3 -2
  100. package/lib/events/hooks/user.d.ts +2 -2
  101. package/lib/events/hooks/user.js +2 -2
  102. package/lib/events/hooks/voice.d.ts +5 -45
  103. package/lib/events/hooks/voice.js +4 -7
  104. package/lib/events/hooks/webhook.d.ts +2 -2
  105. package/lib/index.d.ts +4 -4
  106. package/lib/index.js +11 -5
  107. package/lib/langs/handler.d.ts +4 -1
  108. package/lib/langs/handler.js +3 -3
  109. package/lib/structures/Guild.d.ts +9 -1
  110. package/lib/structures/Guild.js +2 -0
  111. package/lib/structures/GuildBan.d.ts +25 -0
  112. package/lib/structures/GuildBan.js +36 -0
  113. package/lib/structures/GuildEmoji.d.ts +1 -1
  114. package/lib/structures/GuildMember.d.ts +7 -2
  115. package/lib/structures/GuildMember.js +4 -4
  116. package/lib/structures/Interaction.d.ts +4 -3
  117. package/lib/structures/Interaction.js +29 -12
  118. package/lib/structures/Message.d.ts +69 -8
  119. package/lib/structures/Message.js +59 -17
  120. package/lib/structures/Sticker.d.ts +3 -3
  121. package/lib/structures/User.d.ts +1 -0
  122. package/lib/structures/User.js +4 -1
  123. package/lib/structures/VoiceState.d.ts +6 -5
  124. package/lib/structures/VoiceState.js +6 -3
  125. package/lib/structures/channels.d.ts +4 -1
  126. package/lib/structures/channels.js +37 -6
  127. package/lib/structures/extra/functions.js +1 -1
  128. package/lib/websocket/discord/basesocket.d.ts +1 -0
  129. package/lib/websocket/discord/basesocket.js +17 -0
  130. package/lib/websocket/discord/shard.d.ts +1 -0
  131. package/lib/websocket/discord/shard.js +6 -0
  132. package/lib/websocket/discord/sharder.js +10 -3
  133. package/lib/websocket/discord/shared.d.ts +1 -0
  134. package/lib/websocket/discord/workermanager.d.ts +2 -3
  135. package/lib/websocket/discord/workermanager.js +4 -2
  136. package/package.json +7 -7
  137. package/lib/commands/basecontex.d.ts +0 -15
  138. package/lib/components/command.d.ts +0 -24
@@ -0,0 +1,132 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ModalContext = void 0;
4
+ const v10_1 = require("discord-api-types/v10");
5
+ const basecontext_1 = require("../commands/basecontext");
6
+ /**
7
+ * Represents a context for interacting with components in a Discord bot.
8
+ * @template Type - The type of component interaction.
9
+ */
10
+ class ModalContext extends basecontext_1.BaseContext {
11
+ client;
12
+ interaction;
13
+ /**
14
+ * Creates a new instance of the ComponentContext class.
15
+ * @param client - The UsingClient instance.
16
+ * @param interaction - The component interaction object.
17
+ */
18
+ constructor(client, interaction) {
19
+ super(client);
20
+ this.client = client;
21
+ this.interaction = interaction;
22
+ }
23
+ command;
24
+ metadata = {};
25
+ globalMetadata = {};
26
+ get customId() {
27
+ return this.interaction.customId;
28
+ }
29
+ get components() {
30
+ return this.interaction.components;
31
+ }
32
+ /**
33
+ * Gets the language object for the interaction's locale.
34
+ */
35
+ get t() {
36
+ return this.client.t(this.interaction?.locale ?? this.client.langs?.defaultLang ?? 'en-US');
37
+ }
38
+ /**
39
+ * Writes a response to the interaction.
40
+ * @param body - The body of the response.
41
+ * @param fetchReply - Whether to fetch the reply or not.
42
+ */
43
+ write(body, fetchReply) {
44
+ return this.interaction.write(body, fetchReply);
45
+ }
46
+ /**
47
+ * Defers the reply to the interaction.
48
+ * @param ephemeral - Whether the reply should be ephemeral or not.
49
+ */
50
+ deferReply(ephemeral = false) {
51
+ return this.interaction.deferReply(ephemeral ? v10_1.MessageFlags.Ephemeral : undefined);
52
+ }
53
+ /**
54
+ * Edits the response of the interaction.
55
+ * @param body - The updated body of the response.
56
+ */
57
+ editResponse(body) {
58
+ return this.interaction.editResponse(body);
59
+ }
60
+ /**
61
+ * Edits the response or replies to the interaction.
62
+ * @param body - The body of the response or updated body of the interaction.
63
+ * @param fetchReply - Whether to fetch the reply or not.
64
+ */
65
+ editOrReply(body, fetchReply) {
66
+ return this.interaction.editOrReply(body, fetchReply);
67
+ }
68
+ /**
69
+ * Deletes the response of the interaction.
70
+ * @returns A promise that resolves when the response is deleted.
71
+ */
72
+ deleteResponse() {
73
+ return this.interaction.deleteResponse();
74
+ }
75
+ modal(body) {
76
+ //@ts-expect-error
77
+ return this.interaction.modal(body);
78
+ }
79
+ channel(mode = 'cache') {
80
+ if (this.interaction?.channel && mode === 'cache')
81
+ return this.client.cache.adapter.isAsync ? Promise.resolve(this.interaction.channel) : this.interaction.channel;
82
+ return this.client.channels.fetch(this.channelId, mode === 'rest');
83
+ }
84
+ me(mode = 'cache') {
85
+ if (!this.guildId)
86
+ return mode === 'cache' ? (this.client.cache.adapter.isAsync ? Promise.resolve() : undefined) : Promise.resolve();
87
+ switch (mode) {
88
+ case 'cache':
89
+ return this.client.cache.members?.get(this.client.botId, this.guildId);
90
+ default:
91
+ return this.client.members.fetch(this.guildId, this.client.botId, mode === 'rest');
92
+ }
93
+ }
94
+ guild(mode = 'cache') {
95
+ if (!this.guildId)
96
+ return (mode === 'cache' ? (this.client.cache.adapter.isAsync ? Promise.resolve() : undefined) : Promise.resolve());
97
+ switch (mode) {
98
+ case 'cache':
99
+ return this.client.cache.guilds?.get(this.guildId);
100
+ default:
101
+ return this.client.guilds.fetch(this.guildId, mode === 'rest');
102
+ }
103
+ }
104
+ /**
105
+ * Gets the ID of the guild of the interaction.
106
+ */
107
+ get guildId() {
108
+ return this.interaction.guildId;
109
+ }
110
+ /**
111
+ * Gets the ID of the channel of the interaction.
112
+ */
113
+ get channelId() {
114
+ return this.interaction.channelId;
115
+ }
116
+ /**
117
+ * Gets the author of the interaction.
118
+ */
119
+ get author() {
120
+ return this.interaction.user;
121
+ }
122
+ /**
123
+ * Gets the member of the interaction.
124
+ */
125
+ get member() {
126
+ return this.interaction.member;
127
+ }
128
+ isModal() {
129
+ return true;
130
+ }
131
+ }
132
+ exports.ModalContext = ModalContext;
@@ -1,16 +1,17 @@
1
1
  import type { UsingClient } from '../commands';
2
2
  import type { ClientEvents } from './hooks';
3
- export interface DeclareEventsOptions {
4
- name: `${keyof ClientEvents}`;
5
- once?: boolean;
3
+ export interface CustomEvents {
6
4
  }
7
5
  export type ClientNameEvents = Extract<keyof ClientEvents, string>;
6
+ export type CustomEventsKeys = Extract<keyof CustomEvents, string>;
8
7
  export interface ClientDataEvent {
9
8
  name: ClientNameEvents;
10
9
  once: boolean;
11
10
  }
12
11
  export type CallbackEventHandler = {
13
12
  [K in keyof ClientEvents]: (...data: [Awaited<ClientEvents[K]>, UsingClient, number]) => unknown;
13
+ } & {
14
+ [K in keyof CustomEvents]: (...data: [Parameters<CustomEvents[K]>, UsingClient, number]) => unknown;
14
15
  };
15
16
  export type EventContext<T extends {
16
17
  data: {
@@ -2,20 +2,26 @@ import type { GatewayDispatchPayload } from 'discord-api-types/v10';
2
2
  import type { Client, WorkerClient } from '../client';
3
3
  import { BaseHandler, type MakeRequired, type SnakeCase } from '../common';
4
4
  import type { ClientEvents } from '../events/hooks';
5
- import type { ClientEvent, ClientNameEvents } from './event';
5
+ import type { ClientEvent, CustomEvents, CustomEventsKeys } from './event';
6
6
  export type EventValue = MakeRequired<ClientEvent, '__filePath'> & {
7
7
  fired?: boolean;
8
8
  };
9
9
  export type GatewayEvents = Uppercase<SnakeCase<keyof ClientEvents>>;
10
10
  export declare class EventHandler extends BaseHandler {
11
- onFail: (event: GatewayEvents, err: unknown) => void;
11
+ protected client: Client | WorkerClient;
12
+ constructor(client: Client | WorkerClient);
13
+ onFail: (event: GatewayEvents | CustomEventsKeys, err: unknown) => void;
12
14
  protected filter: (path: string) => boolean;
13
- values: Partial<Record<GatewayEvents, EventValue>>;
14
- load(eventsDir: string): Promise<void>;
15
+ values: Partial<Record<GatewayEvents | CustomEventsKeys, EventValue>>;
16
+ load(eventsDir: string, instances?: {
17
+ file: ClientEvent;
18
+ path: string;
19
+ }[]): Promise<void>;
15
20
  execute(name: GatewayEvents, ...args: [GatewayDispatchPayload, Client<true> | WorkerClient<true>, number]): Promise<void>;
16
21
  runEvent(name: GatewayEvents, client: Client | WorkerClient, packet: any, shardId: number): Promise<void>;
17
- reload(name: ClientNameEvents): Promise<any>;
18
- reloadAll(): Promise<void>;
22
+ runCustom<T extends CustomEventsKeys>(name: T, ...args: Parameters<CustomEvents[T]>): Promise<void>;
23
+ reload(name: GatewayEvents | CustomEventsKeys): Promise<any>;
24
+ reloadAll(stopIfFail?: boolean): Promise<void>;
19
25
  setHandlers({ callback }: {
20
26
  callback: EventHandler['callback'];
21
27
  }): void;
@@ -27,11 +27,17 @@ exports.EventHandler = void 0;
27
27
  const common_1 = require("../common");
28
28
  const RawEvents = __importStar(require("../events/hooks"));
29
29
  class EventHandler extends common_1.BaseHandler {
30
+ client;
31
+ constructor(client) {
32
+ super(client.logger);
33
+ this.client = client;
34
+ }
30
35
  onFail = (event, err) => this.logger.warn('<Client>.events.onFail', err, event);
31
36
  filter = (path) => path.endsWith('.js') || (!path.endsWith('.d.ts') && path.endsWith('.ts'));
32
37
  values = {};
33
- async load(eventsDir) {
34
- for (const i of await this.loadFilesK(await this.getFiles(eventsDir))) {
38
+ async load(eventsDir, instances) {
39
+ const discordEvents = Object.keys(RawEvents).map(x => common_1.ReplaceRegex.camel(x.toLowerCase()));
40
+ for (const i of instances ?? (await this.loadFilesK(await this.getFiles(eventsDir)))) {
35
41
  const instance = this.callback(i.file);
36
42
  if (!instance)
37
43
  continue;
@@ -40,21 +46,18 @@ class EventHandler extends common_1.BaseHandler {
40
46
  continue;
41
47
  }
42
48
  instance.__filePath = i.path;
43
- this.values[common_1.ReplaceRegex.snake(instance.data.name).toUpperCase()] = instance;
49
+ this.values[discordEvents.includes(instance.data.name)
50
+ ? common_1.ReplaceRegex.snake(instance.data.name).toUpperCase()
51
+ : instance.data.name] = instance;
44
52
  }
45
53
  }
46
54
  async execute(name, ...args) {
47
55
  switch (name) {
48
- case 'GUILD_DELETE':
49
- case 'CHANNEL_UPDATE':
50
- await this.runEvent(args[0].t, args[1], args[0], args[2]);
51
- await args[1].cache.onPacket(args[0]);
52
- return;
53
56
  case 'MESSAGE_CREATE':
54
57
  {
55
58
  const { d: data } = args[0];
56
- if (args[1].components?.values.has(data.interaction?.id ?? data.id)) {
57
- args[1].components.values.get(data.interaction?.id ?? data.id).messageId = data.id;
59
+ if (args[1].components?.values.has(data.interaction_metadata?.id ?? data.id)) {
60
+ args[1].components.values.get(data.interaction_metadata?.id ?? data.id).messageId = data.id;
58
61
  }
59
62
  }
60
63
  break;
@@ -80,39 +83,76 @@ class EventHandler extends common_1.BaseHandler {
80
83
  }
81
84
  break;
82
85
  }
83
- await this.runEvent(args[0].t, args[1], args[0].d, args[2]);
86
+ await Promise.all([
87
+ this.runEvent(args[0].t, args[1], args[0].d, args[2]),
88
+ this.client.collectors.run(args[0].t, args[0].d),
89
+ ]);
84
90
  }
85
91
  async runEvent(name, client, packet, shardId) {
86
92
  const Event = this.values[name];
87
93
  if (!Event) {
88
- return;
94
+ return this.client.cache.onPacket({
95
+ t: name,
96
+ d: packet,
97
+ });
89
98
  }
90
99
  try {
91
100
  if (Event.data.once && Event.fired) {
92
- return;
101
+ return this.client.cache.onPacket({
102
+ t: name,
103
+ d: packet,
104
+ });
93
105
  }
94
106
  Event.fired = true;
95
107
  const hook = await RawEvents[name]?.(client, packet);
96
- await Event.run(...[hook, client, shardId]);
108
+ if (name !== 'RAW')
109
+ await this.client.cache.onPacket({
110
+ t: name,
111
+ d: packet,
112
+ });
113
+ await Event.run(hook, client, shardId);
114
+ }
115
+ catch (e) {
116
+ await this.onFail(name, e);
117
+ }
118
+ }
119
+ async runCustom(name, ...args) {
120
+ const Event = this.values[name];
121
+ if (!Event) {
122
+ return this.client.collectors.run(name, args);
123
+ }
124
+ try {
125
+ if (Event.data.once && Event.fired) {
126
+ return this.client.collectors.run(name, args);
127
+ }
128
+ Event.fired = true;
129
+ this.logger.debug(`executed a custom event [${name}]`, Event.data.once ? 'once' : '');
130
+ await Promise.all([Event.run(args, this.client), this.client.collectors.run(name, args)]);
97
131
  }
98
132
  catch (e) {
99
133
  await this.onFail(name, e);
100
134
  }
101
135
  }
102
136
  async reload(name) {
103
- const eventName = common_1.ReplaceRegex.snake(name).toUpperCase();
104
- const event = this.values[eventName];
105
- if (!event)
137
+ const event = this.values[name];
138
+ if (!event?.__filePath)
106
139
  return null;
107
140
  delete require.cache[event.__filePath];
108
141
  const imported = await (0, common_1.magicImport)(event.__filePath).then(x => x.default ?? x);
109
142
  imported.__filePath = event.__filePath;
110
- this.values[eventName] = imported;
143
+ this.values[name] = imported;
111
144
  return imported;
112
145
  }
113
- async reloadAll() {
146
+ async reloadAll(stopIfFail = true) {
114
147
  for (const i in this.values) {
115
- await this.reload(common_1.ReplaceRegex.camel(i));
148
+ try {
149
+ await this.reload(i);
150
+ }
151
+ catch (e) {
152
+ if (stopIfFail) {
153
+ throw e;
154
+ }
155
+ }
116
156
  }
117
157
  }
118
158
  setHandlers({ callback }) {
@@ -1,6 +1,6 @@
1
1
  import type { GatewayApplicationCommandPermissionsUpdateDispatchData } from 'discord-api-types/v10';
2
- import type { BaseClient } from '../../client/base';
3
- export declare const APPLICATION_COMMAND_PERMISSIONS_UPDATE: (_self: BaseClient, data: GatewayApplicationCommandPermissionsUpdateDispatchData) => {
2
+ import type { UsingClient } from '../../commands';
3
+ export declare const APPLICATION_COMMAND_PERMISSIONS_UPDATE: (_self: UsingClient, data: GatewayApplicationCommandPermissionsUpdateDispatchData) => {
4
4
  id: string;
5
5
  applicationId: string;
6
6
  guildId: string;
@@ -1,7 +1,7 @@
1
1
  import type { GatewayAutoModerationActionExecutionDispatchData, GatewayAutoModerationRuleCreateDispatchData, GatewayAutoModerationRuleDeleteDispatchData, GatewayAutoModerationRuleUpdateDispatchData } from 'discord-api-types/v10';
2
- import type { BaseClient } from '../../client/base';
3
2
  import { AutoModerationRule } from '../../structures';
4
- export declare const AUTO_MODERATION_ACTION_EXECUTION: (_self: BaseClient, data: GatewayAutoModerationActionExecutionDispatchData) => {
3
+ import type { UsingClient } from '../../commands';
4
+ export declare const AUTO_MODERATION_ACTION_EXECUTION: (_self: UsingClient, data: GatewayAutoModerationActionExecutionDispatchData) => {
5
5
  guildId: string;
6
6
  action: {
7
7
  type: import("discord-api-types/v10").AutoModerationActionType;
@@ -21,6 +21,6 @@ export declare const AUTO_MODERATION_ACTION_EXECUTION: (_self: BaseClient, data:
21
21
  matchedKeyword: string | null;
22
22
  matchedContent: string | null;
23
23
  };
24
- export declare const AUTO_MODERATION_RULE_CREATE: (self: BaseClient, data: GatewayAutoModerationRuleCreateDispatchData) => AutoModerationRule;
25
- export declare const AUTO_MODERATION_RULE_DELETE: (self: BaseClient, data: GatewayAutoModerationRuleDeleteDispatchData) => AutoModerationRule;
26
- export declare const AUTO_MODERATION_RULE_UPDATE: (self: BaseClient, data: GatewayAutoModerationRuleUpdateDispatchData) => AutoModerationRule;
24
+ export declare const AUTO_MODERATION_RULE_CREATE: (self: UsingClient, data: GatewayAutoModerationRuleCreateDispatchData) => AutoModerationRule;
25
+ export declare const AUTO_MODERATION_RULE_DELETE: (self: UsingClient, data: GatewayAutoModerationRuleDeleteDispatchData) => AutoModerationRule;
26
+ export declare const AUTO_MODERATION_RULE_UPDATE: (self: UsingClient, data: GatewayAutoModerationRuleUpdateDispatchData) => AutoModerationRule;
@@ -1,11 +1,11 @@
1
1
  import type { GatewayChannelCreateDispatchData, GatewayChannelDeleteDispatchData, GatewayChannelPinsUpdateDispatchData, GatewayChannelUpdateDispatchData } from 'discord-api-types/v10';
2
- import type { BaseClient } from '../../client/base';
3
2
  import type { AllChannels } from '../../structures';
4
- export declare const CHANNEL_CREATE: (self: BaseClient, data: GatewayChannelCreateDispatchData) => AllChannels;
5
- export declare const CHANNEL_DELETE: (self: BaseClient, data: GatewayChannelDeleteDispatchData) => AllChannels;
6
- export declare const CHANNEL_PINS_UPDATE: (_self: BaseClient, data: GatewayChannelPinsUpdateDispatchData) => {
3
+ import type { UsingClient } from '../../commands';
4
+ export declare const CHANNEL_CREATE: (self: UsingClient, data: GatewayChannelCreateDispatchData) => AllChannels;
5
+ export declare const CHANNEL_DELETE: (self: UsingClient, data: GatewayChannelDeleteDispatchData) => AllChannels;
6
+ export declare const CHANNEL_PINS_UPDATE: (_self: UsingClient, data: GatewayChannelPinsUpdateDispatchData) => {
7
7
  guildId?: string | undefined;
8
8
  channelId: string;
9
9
  lastPinTimestamp?: string | null | undefined;
10
10
  };
11
- export declare const CHANNEL_UPDATE: (self: BaseClient, data: GatewayChannelUpdateDispatchData) => Promise<[channel: AllChannels, old?: AllChannels]>;
11
+ export declare const CHANNEL_UPDATE: (self: UsingClient, data: GatewayChannelUpdateDispatchData) => Promise<[channel: AllChannels, old?: AllChannels]>;
@@ -1,4 +1,4 @@
1
- import type { BaseClient } from '../../client/base';
1
+ import type { UsingClient } from '../../commands';
2
2
  import type { ClientUser } from '../../structures';
3
- export declare const BOT_READY: (_self: BaseClient, me: ClientUser) => ClientUser;
4
- export declare const WORKER_READY: (_self: BaseClient, me: ClientUser) => ClientUser;
3
+ export declare const BOT_READY: (_self: UsingClient, me: ClientUser) => ClientUser;
4
+ export declare const WORKER_READY: (_self: UsingClient, me: ClientUser) => ClientUser;
@@ -1,6 +1,6 @@
1
1
  import type { GatewayDispatchPayload, GatewayReadyDispatchData, GatewayResumedDispatch } from 'discord-api-types/v10';
2
- import type { BaseClient } from '../../client/base';
3
2
  import { ClientUser } from '../../structures';
4
- export declare const READY: (self: BaseClient, data: GatewayReadyDispatchData) => ClientUser;
5
- export declare const RESUMED: (_self: BaseClient, _data: GatewayResumedDispatch['d']) => void;
6
- export declare const RAW: (_self: BaseClient, data: GatewayDispatchPayload) => GatewayDispatchPayload;
3
+ import type { UsingClient } from '../../commands';
4
+ export declare const READY: (self: UsingClient, data: GatewayReadyDispatchData) => ClientUser;
5
+ export declare const RESUMED: (_self: UsingClient, _data: GatewayResumedDispatch['d']) => void;
6
+ export declare const RAW: (_self: UsingClient, data: GatewayDispatchPayload) => GatewayDispatchPayload;
@@ -1,6 +1,6 @@
1
1
  import type { APIEntitlement } from 'discord-api-types/v10';
2
- import type { BaseClient } from '../../client/base';
3
- export declare const ENTITLEMENT_CREATE: (_: BaseClient, data: APIEntitlement) => {
2
+ import type { UsingClient } from '../../commands';
3
+ export declare const ENTITLEMENT_CREATE: (_: UsingClient, data: APIEntitlement) => {
4
4
  id: string;
5
5
  skuId: string;
6
6
  userId?: string | undefined;
@@ -12,7 +12,7 @@ export declare const ENTITLEMENT_CREATE: (_: BaseClient, data: APIEntitlement) =
12
12
  endsAt?: string | undefined;
13
13
  consumed?: boolean | undefined;
14
14
  };
15
- export declare const ENTITLEMENT_UPDATE: (_: BaseClient, data: APIEntitlement) => {
15
+ export declare const ENTITLEMENT_UPDATE: (_: UsingClient, data: APIEntitlement) => {
16
16
  id: string;
17
17
  skuId: string;
18
18
  userId?: string | undefined;
@@ -24,7 +24,7 @@ export declare const ENTITLEMENT_UPDATE: (_: BaseClient, data: APIEntitlement) =
24
24
  endsAt?: string | undefined;
25
25
  consumed?: boolean | undefined;
26
26
  };
27
- export declare const ENTITLEMENT_DELETE: (_: BaseClient, data: APIEntitlement) => {
27
+ export declare const ENTITLEMENT_DELETE: (_: UsingClient, data: APIEntitlement) => {
28
28
  id: string;
29
29
  skuId: string;
30
30
  userId?: string | undefined;