qaut.js 1.0.4 → 1.0.5

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +5 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qaut.js",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "Official QauT bot framework for building bots and integrations.",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
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,11 @@ 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.globalName || this.username || this.id; }
548
+ });
549
+
546
550
  module.exports = {
547
551
  ActionRowBuilder, ActivityType, AttachmentBuilder, BitField, ButtonBuilder, Channel, ChannelSelectMenuBuilder,
548
552
  Client, Collection, ContextMenuCommandBuilder, CreateEmbed, DefaultRestBase, EmbedBuilder, Emoji, Events,