summaryrefslogtreecommitdiff
path: root/node_modules/discord.js/src/structures/WidgetMember.js
diff options
context:
space:
mode:
authorsowgro <tpoke.ferrari@gmail.com>2023-09-02 19:12:47 -0400
committersowgro <tpoke.ferrari@gmail.com>2023-09-02 19:12:47 -0400
commite4450c8417624b71d779cb4f41692538f9165e10 (patch)
treeb70826542223ecdf8a7a259f61b0a1abb8a217d8 /node_modules/discord.js/src/structures/WidgetMember.js
downloadsowbot3-e4450c8417624b71d779cb4f41692538f9165e10.tar.gz
sowbot3-e4450c8417624b71d779cb4f41692538f9165e10.tar.bz2
sowbot3-e4450c8417624b71d779cb4f41692538f9165e10.zip
first commit
Diffstat (limited to 'node_modules/discord.js/src/structures/WidgetMember.js')
-rw-r--r--node_modules/discord.js/src/structures/WidgetMember.js99
1 files changed, 99 insertions, 0 deletions
diff --git a/node_modules/discord.js/src/structures/WidgetMember.js b/node_modules/discord.js/src/structures/WidgetMember.js
new file mode 100644
index 0000000..d7aca21
--- /dev/null
+++ b/node_modules/discord.js/src/structures/WidgetMember.js
@@ -0,0 +1,99 @@
+'use strict';
+
+const Base = require('./Base');
+
+/**
+ * Represents a WidgetMember.
+ * @extends {Base}
+ */
+class WidgetMember extends Base {
+ /**
+ * Activity sent in a {@link WidgetMember}.
+ * @typedef {Object} WidgetActivity
+ * @property {string} name The name of the activity
+ */
+
+ constructor(client, data) {
+ super(client);
+
+ /**
+ * The id of the user. It's an arbitrary number.
+ * @type {string}
+ */
+ this.id = data.id;
+
+ /**
+ * The username of the member.
+ * @type {string}
+ */
+ this.username = data.username;
+
+ /**
+ * The discriminator of the member.
+ * @type {string}
+ */
+ this.discriminator = data.discriminator;
+
+ /**
+ * The avatar of the member.
+ * @type {?string}
+ */
+ this.avatar = data.avatar;
+
+ /**
+ * The status of the member.
+ * @type {PresenceStatus}
+ */
+ this.status = data.status;
+
+ /**
+ * If the member is server deafened
+ * @type {?boolean}
+ */
+ this.deaf = data.deaf ?? null;
+
+ /**
+ * If the member is server muted
+ * @type {?boolean}
+ */
+ this.mute = data.mute ?? null;
+
+ /**
+ * If the member is self deafened
+ * @type {?boolean}
+ */
+ this.selfDeaf = data.self_deaf ?? null;
+
+ /**
+ * If the member is self muted
+ * @type {?boolean}
+ */
+ this.selfMute = data.self_mute ?? null;
+
+ /**
+ * If the member is suppressed
+ * @type {?boolean}
+ */
+ this.suppress = data.suppress ?? null;
+
+ /**
+ * The id of the voice channel the member is in, if any
+ * @type {?Snowflake}
+ */
+ this.channelId = data.channel_id ?? null;
+
+ /**
+ * The avatar URL of the member.
+ * @type {string}
+ */
+ this.avatarURL = data.avatar_url;
+
+ /**
+ * The activity of the member.
+ * @type {?WidgetActivity}
+ */
+ this.activity = data.activity ?? null;
+ }
+}
+
+module.exports = WidgetMember;