blob: b22f600b90e383290d72add40692bb83d201dec0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
'use strict';
const { MentionableSelectMenuBuilder: BuildersMentionableSelectMenu } = require('@discordjs/builders');
const { isJSONEncodable } = require('@discordjs/util');
const { toSnakeCase } = require('../util/Transformers');
/**
* Class used to build select menu components to be sent through the API
* @extends {BuildersMentionableSelectMenu}
*/
class MentionableSelectMenuBuilder extends BuildersMentionableSelectMenu {
constructor(data = {}) {
super(toSnakeCase(data));
}
/**
* Creates a new select menu builder from JSON data
* @param {MentionableSelectMenuBuilder|MentionableSelectMenuComponent|APIMentionableSelectComponent} other
* The other data
* @returns {MentionableSelectMenuBuilder}
*/
static from(other) {
return new this(isJSONEncodable(other) ? other.toJSON() : other);
}
}
module.exports = MentionableSelectMenuBuilder;
/**
* @external BuildersMentionableSelectMenu
* @see {@link https://discord.js.org/docs/packages/builders/stable/MentionableSelectMenuBuilder:Class}
*/
|