seyfert 3.2.7-dev-17387316482.0 → 3.2.7-dev-17598595685.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.
|
@@ -31,7 +31,7 @@ export declare class GuildShorter extends BaseShorter {
|
|
|
31
31
|
*/
|
|
32
32
|
widgetURL(id: string, style?: GuildWidgetStyle): Promise<import("../../types").APIGuildWidgetSettings>;
|
|
33
33
|
edit(guildId: string, body: RESTPatchAPIGuildJSONBody, reason?: string): Promise<GuildStructure<'api'>>;
|
|
34
|
-
list<T extends boolean = false>(query?: RESTGetAPICurrentUserGuildsQuery, force?: T): Promise<If<T, AnonymousGuildStructure[], GuildStructure<'cached'>[]>>;
|
|
34
|
+
list<T extends boolean = false>(query?: RESTGetAPICurrentUserGuildsQuery, force?: T): Promise<If<T, AnonymousGuildStructure[], GuildStructure<'cached'>[] | AnonymousGuildStructure[]>>;
|
|
35
35
|
fetchSelf(id: string, force?: boolean): Promise<GuildMemberStructure>;
|
|
36
36
|
leave(id: string): Promise<void | undefined>;
|
|
37
37
|
/**
|
|
@@ -23,12 +23,12 @@ export declare class ModalContext<M extends keyof RegisteredMiddlewares = never>
|
|
|
23
23
|
globalMetadata: GlobalMetadata;
|
|
24
24
|
get customId(): string;
|
|
25
25
|
get components(): {
|
|
26
|
-
|
|
26
|
+
component: {
|
|
27
27
|
type: import("../types").ComponentType;
|
|
28
28
|
customId: string;
|
|
29
29
|
value?: string | undefined;
|
|
30
30
|
values?: string[] | undefined;
|
|
31
|
-
}
|
|
31
|
+
};
|
|
32
32
|
type: import("../types").ComponentType.ActionRow;
|
|
33
33
|
}[];
|
|
34
34
|
/**
|
|
@@ -198,12 +198,12 @@ export declare class ModalSubmitInteraction<FromGuild extends boolean = boolean>
|
|
|
198
198
|
deferUpdate<WR extends boolean = false>(withResponse?: WR): Promise<When<WR, WebhookMessageStructure, undefined>>;
|
|
199
199
|
get customId(): string;
|
|
200
200
|
get components(): {
|
|
201
|
-
|
|
201
|
+
component: {
|
|
202
202
|
type: ComponentType;
|
|
203
203
|
customId: string;
|
|
204
204
|
value?: string | undefined;
|
|
205
205
|
values?: string[] | undefined;
|
|
206
|
-
}
|
|
206
|
+
};
|
|
207
207
|
type: ComponentType.ActionRow;
|
|
208
208
|
}[];
|
|
209
209
|
getInputValue(customId: string, required: true): string | string[];
|
|
@@ -516,12 +516,9 @@ let ModalSubmitInteraction = class ModalSubmitInteraction extends BaseInteractio
|
|
|
516
516
|
}
|
|
517
517
|
getInputValue(customId, required) {
|
|
518
518
|
let value;
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
value = get.value ?? get.values;
|
|
523
|
-
break;
|
|
524
|
-
}
|
|
519
|
+
const get = this.components.find(x => x.component.customId === customId);
|
|
520
|
+
if (get) {
|
|
521
|
+
value = get.component.value ?? get.component.values;
|
|
525
522
|
}
|
|
526
523
|
if ((!value || value.length === 0) && required)
|
|
527
524
|
throw new Error(`${customId} component doesn't have a value`);
|
|
@@ -6,7 +6,7 @@ export interface ModalSubmitComponent {
|
|
|
6
6
|
values?: string[];
|
|
7
7
|
}
|
|
8
8
|
export interface ModalSubmitActionRowComponent extends Omit<APIActionRowComponent<APIModalActionRowComponent>, 'components'> {
|
|
9
|
-
|
|
9
|
+
component: ModalSubmitComponent;
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
12
|
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-modal-submit-data-structure
|