qaut.js 1.0.4 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/index.js +6 -1
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -390,7 +390,6 @@ class User extends Base {
|
|
|
390
390
|
avatarURL() { return this.avatar || this.defaultAvatarURL(); }
|
|
391
391
|
bannerURL() { return this.banner || null; }
|
|
392
392
|
defaultAvatarURL() { return `${DefaultRestBase.replace('/api', '')}/assets/qautapp.png`; }
|
|
393
|
-
get displayName() { return this.globalName || this.username || this.id; }
|
|
394
393
|
fetchFlags() { return Promise.resolve(this.flags || []); }
|
|
395
394
|
}
|
|
396
395
|
|
|
@@ -543,6 +542,12 @@ function structuredCloneSafe(value) { return JSON.parse(JSON.stringify(value, (_
|
|
|
543
542
|
function idOf(value) { return typeof value === 'object' && value ? value.id : value; }
|
|
544
543
|
function idsOf(values) { return Array.isArray(values) ? values.map(idOf) : [idOf(values)]; }
|
|
545
544
|
|
|
545
|
+
Object.defineProperty(User.prototype, 'displayName', {
|
|
546
|
+
configurable: true,
|
|
547
|
+
get() { return this._displayName || this.globalName || this.username || this.id; },
|
|
548
|
+
set(value) { this._displayName = value; }
|
|
549
|
+
});
|
|
550
|
+
|
|
546
551
|
module.exports = {
|
|
547
552
|
ActionRowBuilder, ActivityType, AttachmentBuilder, BitField, ButtonBuilder, Channel, ChannelSelectMenuBuilder,
|
|
548
553
|
Client, Collection, ContextMenuCommandBuilder, CreateEmbed, DefaultRestBase, EmbedBuilder, Emoji, Events,
|