mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-18 04:23:31 +01:00
types(MessageButtonOptions): Clean up and export some button option type definitions (#6291)
This commit is contained in:
22
typings/index.d.ts
vendored
22
typings/index.d.ts
vendored
@@ -3908,17 +3908,17 @@ export interface BaseButtonOptions extends BaseMessageComponentOptions {
|
|||||||
label?: string;
|
label?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type MessageButtonOptions = BaseButtonOptions &
|
export interface LinkButtonOptions extends BaseButtonOptions {
|
||||||
(
|
style: 'LINK' | MessageButtonStyles.LINK;
|
||||||
| {
|
url: string;
|
||||||
style: Exclude<MessageButtonStyleResolvable, 'LINK' | MessageButtonStyles.LINK>;
|
}
|
||||||
customId: string;
|
|
||||||
}
|
export interface InteractionButtonOptions extends BaseButtonOptions {
|
||||||
| {
|
style: Exclude<MessageButtonStyleResolvable, 'LINK' | MessageButtonStyles.LINK>;
|
||||||
style: 'LINK' | MessageButtonStyles.LINK;
|
customId: string;
|
||||||
url: string;
|
}
|
||||||
}
|
|
||||||
);
|
export type MessageButtonOptions = InteractionButtonOptions | LinkButtonOptions;
|
||||||
|
|
||||||
export type MessageButtonStyle = keyof typeof MessageButtonStyles;
|
export type MessageButtonStyle = keyof typeof MessageButtonStyles;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user