commit
This commit is contained in:
parent
68f4b60012
commit
41ae7ff4bd
1010 changed files with 38622 additions and 17071 deletions
12
node_modules/discord.js/src/structures/TextInputBuilder.js
generated
vendored
12
node_modules/discord.js/src/structures/TextInputBuilder.js
generated
vendored
|
@ -1,6 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
const { TextInputBuilder: BuildersTextInput, isJSONEncodable } = require('@discordjs/builders');
|
||||
const { TextInputBuilder: BuildersTextInput } = require('@discordjs/builders');
|
||||
const { isJSONEncodable } = require('@discordjs/util');
|
||||
const { toSnakeCase } = require('../util/Transformers');
|
||||
|
||||
/**
|
||||
|
@ -14,14 +15,11 @@ class TextInputBuilder extends BuildersTextInput {
|
|||
|
||||
/**
|
||||
* Creates a new text input builder from JSON data
|
||||
* @param {JSONEncodable<APITextInputComponent>|APITextInputComponent} other The other data
|
||||
* @param {TextInputBuilder|TextInputComponent|APITextInputComponent} other The other data
|
||||
* @returns {TextInputBuilder}
|
||||
*/
|
||||
static from(other) {
|
||||
if (isJSONEncodable(other)) {
|
||||
return new this(other.toJSON());
|
||||
}
|
||||
return new this(other);
|
||||
return new this(isJSONEncodable(other) ? other.toJSON() : other);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -29,5 +27,5 @@ module.exports = TextInputBuilder;
|
|||
|
||||
/**
|
||||
* @external BuildersTextInput
|
||||
* @see {@link https://discord.js.org/#/docs/builders/main/class/TextInputBuilder}
|
||||
* @see {@link https://discord.js.org/docs/packages/builders/stable/TextInputBuilder:Class}
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue