refactor: change xID to xId (#6036)

* refactor: change `xID` to `xId`

* Update src/managers/MessageManager.js

Co-authored-by: Noel <buechler.noel@outlook.com>

Co-authored-by: Noel <buechler.noel@outlook.com>
This commit is contained in:
Antonio Román
2021-07-04 20:54:27 +02:00
committed by GitHub
parent 281072be44
commit a7c6678c72
95 changed files with 963 additions and 963 deletions

View File

@@ -13,7 +13,7 @@ class MessageButton extends BaseMessageComponent {
/**
* @typedef {BaseMessageComponentOptions} MessageButtonOptions
* @property {string} [label] The text to be displayed on this button
* @property {string} [customID] A unique string to be sent in the interaction when clicked
* @property {string} [customId] A unique string to be sent in the interaction when clicked
* @property {MessageButtonStyleResolvable} [style] The style of this button
* @property {EmojiIdentifierResolvable} [emoji] The emoji to be displayed to the left of the text
* @property {string} [url] Optional URL for link-style buttons
@@ -40,7 +40,7 @@ class MessageButton extends BaseMessageComponent {
* A unique string to be sent in the interaction when clicked
* @type {?string}
*/
this.customID = data.custom_id ?? data.customID ?? null;
this.customId = data.custom_id ?? data.customId ?? null;
/**
* The style of this button
@@ -68,12 +68,12 @@ class MessageButton extends BaseMessageComponent {
}
/**
* Sets the custom ID of this button
* @param {string} customID A unique string to be sent in the interaction when clicked
* Sets the custom id for this button
* @param {string} customId A unique string to be sent in the interaction when clicked
* @returns {MessageButton}
*/
setCustomID(customID) {
this.customID = Util.verifyString(customID, RangeError, 'BUTTON_CUSTOM_ID');
setCustomId(customId) {
this.customId = Util.verifyString(customId, RangeError, 'BUTTON_CUSTOM_ID');
return this;
}
@@ -134,7 +134,7 @@ class MessageButton extends BaseMessageComponent {
*/
toJSON() {
return {
custom_id: this.customID,
custom_id: this.customId,
disabled: this.disabled,
emoji: this.emoji,
label: this.label,