mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 19:43:29 +01:00
feat: default select menu values (#9867)
* feat: default select menu values * feat(Message): support * fix: fix crashes when an array is supplied and remove assertion * docs(transformResolved): `BaseChannel` is the correct type * refactor: prefer assignment * chore: export function again * fix(Util): fix circular dependency * refactor(MentionableSelectMenu): clone in method * docs: remove semicolon * feat(MentionableSelectMenu): add `addDefaultValues()` * refactor: reduce overhead * types: adjust `channel` --------- Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
This commit is contained in:
14
packages/discord.js/typings/index.d.ts
vendored
14
packages/discord.js/typings/index.d.ts
vendored
@@ -586,9 +586,6 @@ export abstract class CommandInteraction<Cached extends CacheType = CacheType> e
|
||||
option: APIApplicationCommandOption,
|
||||
resolved: APIApplicationCommandInteractionData['resolved'],
|
||||
): CommandInteractionOption<Cached>;
|
||||
private transformResolved(
|
||||
resolved: APIApplicationCommandInteractionData['resolved'],
|
||||
): CommandInteractionResolvedData<Cached>;
|
||||
}
|
||||
|
||||
export class InteractionResponse<Cached extends boolean = boolean> {
|
||||
@@ -2037,6 +2034,7 @@ export class Message<InGuild extends boolean = boolean> extends Base {
|
||||
public stickers: Collection<Snowflake, Sticker>;
|
||||
public position: number | null;
|
||||
public roleSubscriptionData: RoleSubscriptionData | null;
|
||||
public resolved: CommandInteractionResolvedData | null;
|
||||
public system: boolean;
|
||||
public get thread(): AnyThreadChannel | null;
|
||||
public tts: boolean;
|
||||
@@ -3223,6 +3221,10 @@ export function setPosition<T extends Channel | Role>(
|
||||
reason?: string,
|
||||
): Promise<{ id: Snowflake; position: number }[]>;
|
||||
export function parseWebhookURL(url: string): WebhookClientDataIdWithToken | null;
|
||||
export function transformResolved<Cached extends CacheType>(
|
||||
supportingData: SupportingInteractionResolvedData,
|
||||
data?: APIApplicationCommandInteractionData['resolved'],
|
||||
): CommandInteractionResolvedData<Cached>;
|
||||
|
||||
export interface MappedComponentBuilderTypes {
|
||||
[ComponentType.Button]: ButtonBuilder;
|
||||
@@ -6363,6 +6365,12 @@ export interface StageInstanceEditOptions {
|
||||
privacyLevel?: StageInstancePrivacyLevel;
|
||||
}
|
||||
|
||||
export interface SupportingInteractionResolvedData {
|
||||
client: Client;
|
||||
guild?: Guild;
|
||||
channel?: GuildTextBasedChannel;
|
||||
}
|
||||
|
||||
export type SweeperKey = keyof SweeperDefinitions;
|
||||
|
||||
export type CollectionSweepFilter<K, V> = (value: V, key: K, collection: Collection<K, V>) => boolean;
|
||||
|
||||
Reference in New Issue
Block a user