typing add
This commit is contained in:
parent
9a1a43a5ce
commit
d867cb27cc
@ -209,6 +209,12 @@ class MessageSelectMenu extends BaseMessageComponent {
|
||||
return options.flat(Infinity).map(option => this.normalizeOption(option));
|
||||
}
|
||||
// Add
|
||||
/**
|
||||
* Select in menu
|
||||
* @param {Message} message Discord Message
|
||||
* @param {Array<String>} values Option values
|
||||
* @returns {Promise<boolean}
|
||||
*/
|
||||
async select(message, values = []) {
|
||||
// Github copilot is the best :))
|
||||
// POST data from https://github.com/phamleduy04
|
||||
|
3
typings/index.d.ts
vendored
3
typings/index.d.ts
vendored
@ -1630,7 +1630,7 @@ export class MessageButton extends BaseMessageComponent {
|
||||
public setStyle(style: MessageButtonStyleResolvable): this;
|
||||
public setURL(url: string): this;
|
||||
public toJSON(): APIButtonComponent;
|
||||
public click(message): Promise<boolean>;
|
||||
public click(message: Message): Promise<boolean>;
|
||||
private static resolveStyle(style: MessageButtonStyleResolvable): MessageButtonStyle;
|
||||
}
|
||||
|
||||
@ -1837,6 +1837,7 @@ export class MessageSelectMenu extends BaseMessageComponent {
|
||||
...options: MessageSelectOptionData[] | MessageSelectOptionData[][]
|
||||
): this;
|
||||
public toJSON(): APISelectMenuComponent;
|
||||
public select(message: Message, values: Array<String>): Promise<Boolean>;
|
||||
}
|
||||
|
||||
export class NewsChannel extends BaseGuildTextChannel {
|
||||
|
Loading…
Reference in New Issue
Block a user