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

@@ -8,7 +8,7 @@ const Util = require('../util/Util');
/**
* Activity sent in a message.
* @typedef {Object} MessageActivity
* @property {string} [partyID] Id of the party represented in activity
* @property {string} [partyId] Id of the party represented in activity
* @property {number} [type] Type of activity sent
*/
@@ -46,13 +46,13 @@ class Presence {
*/
Object.defineProperty(this, 'client', { value: client });
/**
* The user ID of this presence
* The presence's user id
* @type {Snowflake}
*/
this.userID = data.user.id;
this.userId = data.user.id;
/**
* The guild of this presence
* The guild this presence is in
* @type {?Guild}
*/
this.guild = data.guild ?? null;
@@ -66,7 +66,7 @@ class Presence {
* @readonly
*/
get user() {
return this.client.users.resolve(this.userID);
return this.client.users.resolve(this.userId);
}
/**
@@ -75,7 +75,7 @@ class Presence {
* @readonly
*/
get member() {
return this.guild.members.resolve(this.userID);
return this.guild.members.resolve(this.userId);
}
patch(data) {
@@ -148,19 +148,19 @@ class Activity {
Object.defineProperty(this, 'presence', { value: presence });
/**
* The ID of the activity
* The activity's id
* @type {string}
*/
this.id = data.id;
/**
* The name of the activity
* The activity's name
* @type {string}
*/
this.name = data.name;
/**
* The type of the activity status
* The activity status's type
* @type {ActivityType}
*/
this.type = typeof data.type === 'number' ? ActivityTypes[data.type] : data.type;
@@ -184,10 +184,10 @@ class Activity {
this.state = data.state ?? null;
/**
* Application ID associated with this activity
* The id of the application associated with this activity
* @type {?Snowflake}
*/
this.applicationID = data.application_id ?? null;
this.applicationId = data.application_id ?? null;
/**
* Timestamps for the activity
@@ -203,10 +203,10 @@ class Activity {
: null;
/**
* The ID of the song on Spotify
* The Spotify song's id
* @type {?string}
*/
this.syncID = data.sync_id ?? null;
this.syncId = data.sync_id ?? null;
/**
* The platform the game is being played on
@@ -217,7 +217,7 @@ class Activity {
/**
* Party of the activity
* @type {?Object}
* @property {?string} id ID of the party
* @property {?string} id The party's id
* @property {number[]} size Size of the party as `[current, max]`
*/
this.party = data.party ?? null;
@@ -241,10 +241,10 @@ class Activity {
this.emoji = data.emoji ? new Emoji(presence.client, data.emoji) : null;
/**
* The ID of the game or Spotify session
* The game's or Spotify session's id
* @type {?string}
*/
this.sessionID = data.session_id ?? null;
this.sessionId = data.session_id ?? null;
/**
* The labels of the buttons of this rich presence
@@ -318,13 +318,13 @@ class RichPresenceAssets {
this.smallText = assets.small_text ?? null;
/**
* ID of the large image asset
* The large image asset's id
* @type {?Snowflake}
*/
this.largeImage = assets.large_image ?? null;
/**
* ID of the small image asset
* The small image asset's id
* @type {?Snowflake}
*/
this.smallImage = assets.small_image ?? null;
@@ -338,7 +338,7 @@ class RichPresenceAssets {
smallImageURL({ format, size } = {}) {
return (
this.smallImage &&
this.activity.presence.client.rest.cdn.AppAsset(this.activity.applicationID, this.smallImage, {
this.activity.presence.client.rest.cdn.AppAsset(this.activity.applicationId, this.smallImage, {
format,
size,
})
@@ -357,7 +357,7 @@ class RichPresenceAssets {
} else if (/^twitch:/.test(this.largeImage)) {
return `https://static-cdn.jtvnw.net/previews-ttv/live_user_${this.largeImage.slice(7)}.png`;
}
return this.activity.presence.client.rest.cdn.AppAsset(this.activity.applicationID, this.largeImage, {
return this.activity.presence.client.rest.cdn.AppAsset(this.activity.applicationId, this.largeImage, {
format,
size,
});