seyfert 1.3.2 → 1.3.3

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.
@@ -6,7 +6,9 @@ const base_1 = require("./base");
6
6
  class InteractionShorter extends base_1.BaseShorter {
7
7
  async reply(id, token, body) {
8
8
  //@ts-expect-error
9
- const { files, ...data } = body.data ?? {};
9
+ const { files, ...rest } = body.data ?? {};
10
+ //@ts-expect-error
11
+ const data = body.data instanceof __1.Modal ? body.data : rest;
10
12
  return this.client.proxy
11
13
  .interactions(id)(token)
12
14
  .callback.post({
@@ -10,6 +10,7 @@ export declare const ENTITLEMENT_CREATE: (_: BaseClient, data: APIEntitlement) =
10
10
  deleted: boolean;
11
11
  startsAt?: string | undefined;
12
12
  endsAt?: string | undefined;
13
+ consumed?: boolean | undefined;
13
14
  };
14
15
  export declare const ENTITLEMENT_UPDATE: (_: BaseClient, data: APIEntitlement) => {
15
16
  id: string;
@@ -21,6 +22,7 @@ export declare const ENTITLEMENT_UPDATE: (_: BaseClient, data: APIEntitlement) =
21
22
  deleted: boolean;
22
23
  startsAt?: string | undefined;
23
24
  endsAt?: string | undefined;
25
+ consumed?: boolean | undefined;
24
26
  };
25
27
  export declare const ENTITLEMENT_DELETE: (_: BaseClient, data: APIEntitlement) => {
26
28
  id: string;
@@ -32,4 +34,5 @@ export declare const ENTITLEMENT_DELETE: (_: BaseClient, data: APIEntitlement) =
32
34
  deleted: boolean;
33
35
  startsAt?: string | undefined;
34
36
  endsAt?: string | undefined;
37
+ consumed?: boolean | undefined;
35
38
  };
@@ -142,6 +142,22 @@ export declare const GUILD_AUDIT_LOG_ENTRY_CREATE: (_self: BaseClient, data: Gat
142
142
  key: "available";
143
143
  newValue?: boolean | undefined;
144
144
  oldValue?: boolean | undefined;
145
+ } | {
146
+ key: "available_tags";
147
+ newValue?: {
148
+ id: string;
149
+ name: string;
150
+ moderated: boolean;
151
+ emojiId: string | null;
152
+ emojiName: string | null;
153
+ }[] | undefined;
154
+ oldValue?: {
155
+ id: string;
156
+ name: string;
157
+ moderated: boolean;
158
+ emojiId: string | null;
159
+ emojiName: string | null;
160
+ }[] | undefined;
145
161
  } | {
146
162
  key: "avatar_hash";
147
163
  newValue?: string | undefined;
@@ -182,6 +198,20 @@ export declare const GUILD_AUDIT_LOG_ENTRY_CREATE: (_self: BaseClient, data: Gat
182
198
  key: "default_message_notifications";
183
199
  newValue?: import("discord-api-types/v10").GuildDefaultMessageNotifications | undefined;
184
200
  oldValue?: import("discord-api-types/v10").GuildDefaultMessageNotifications | undefined;
201
+ } | {
202
+ key: "default_reaction_emoji";
203
+ newValue?: {
204
+ emojiId: string | null;
205
+ emojiName: string | null;
206
+ } | undefined;
207
+ oldValue?: {
208
+ emojiId: string | null;
209
+ emojiName: string | null;
210
+ } | undefined;
211
+ } | {
212
+ key: "default_thread_rate_limit_per_user";
213
+ newValue?: number | undefined;
214
+ oldValue?: number | undefined;
185
215
  } | {
186
216
  key: "deny";
187
217
  newValue?: string | undefined;
@@ -230,6 +260,10 @@ export declare const GUILD_AUDIT_LOG_ENTRY_CREATE: (_self: BaseClient, data: Gat
230
260
  key: "explicit_content_filter";
231
261
  newValue?: import("discord-api-types/v10").GuildExplicitContentFilter | undefined;
232
262
  oldValue?: import("discord-api-types/v10").GuildExplicitContentFilter | undefined;
263
+ } | {
264
+ key: "flags";
265
+ newValue?: number | undefined;
266
+ oldValue?: number | undefined;
233
267
  } | {
234
268
  key: "format_type";
235
269
  newValue?: import("discord-api-types/v10").StickerFormatType | undefined;
@@ -100,7 +100,9 @@ class BaseInteraction extends DiscordBase_1.DiscordBase {
100
100
  async matchReplied(body) {
101
101
  if (this.__reply) {
102
102
  //@ts-expect-error
103
- const { files, ...data } = body.data ?? {};
103
+ const { files, ...rest } = body.data ?? {};
104
+ //@ts-expect-error
105
+ const data = body.data instanceof builders_1.Modal ? body.data : rest;
104
106
  return (this.replied = this.__reply({
105
107
  body: BaseInteraction.transformBodyRequest({ data, type: body.type }),
106
108
  files: files ? await (0, builders_1.resolveFiles)(files) : undefined,
@@ -49,8 +49,8 @@ export declare class Message extends BaseMessage {
49
49
  delete(reason?: string): Promise<void>;
50
50
  crosspost(reason?: string): Promise<Message>;
51
51
  }
52
- export type EditMessageWebhook = Omit<MessageWebhookMethodEditParams, 'messageId'>;
53
- export type WriteMessageWebhook = MessageWebhookMethodWriteParams;
52
+ export type EditMessageWebhook = Omit<MessageWebhookMethodEditParams, 'messageId'>['body'] & Pick<MessageWebhookMethodEditParams, 'query'>;
53
+ export type WriteMessageWebhook = MessageWebhookMethodWriteParams['body'] & Pick<MessageWebhookMethodWriteParams, 'query'>;
54
54
  export declare class WebhookMessage extends BaseMessage {
55
55
  readonly webhookId: string;
56
56
  readonly webhookToken: string;
@@ -122,10 +122,19 @@ class WebhookMessage extends BaseMessage {
122
122
  return this.api.webhooks(this.webhookId)(this.webhookToken).get({ query: this.thread?.id });
123
123
  }
124
124
  edit(body) {
125
- return this.client.webhooks.editMessage(this.webhookId, this.webhookToken, { ...body, messageId: this.id });
125
+ const { query, ...rest } = body;
126
+ return this.client.webhooks.editMessage(this.webhookId, this.webhookToken, {
127
+ body: rest,
128
+ query,
129
+ messageId: this.id,
130
+ });
126
131
  }
127
132
  write(body) {
128
- return this.client.webhooks.writeMessage(this.webhookId, this.webhookToken, body);
133
+ const { query, ...rest } = body;
134
+ return this.client.webhooks.writeMessage(this.webhookId, this.webhookToken, {
135
+ body: rest,
136
+ query,
137
+ });
129
138
  }
130
139
  delete(reason) {
131
140
  return this.client.webhooks.deleteMessage(this.webhookId, this.webhookToken, this.id, reason);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "seyfert",
3
- "version": "1.3.2",
3
+ "version": "1.3.3",
4
4
  "description": "The most advanced framework for discord bots",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./lib/index.js",