diff --git a/package.json b/package.json index 1c580c5..07417d2 100644 --- a/package.json +++ b/package.json @@ -64,6 +64,7 @@ "qrcode": "^1.5.3", "tough-cookie": "^4.1.4", "tree-kill": "^1.2.2", + "tweetnacl": "^1.0.3", "ws": "^8.16.0" }, "engines": { @@ -93,4 +94,4 @@ "tslint": "^6.1.3", "typescript": "^5.5.4" } -} \ No newline at end of file +} diff --git a/src/managers/ChannelManager.js b/src/managers/ChannelManager.js index ca2abb9..9c2632e 100644 --- a/src/managers/ChannelManager.js +++ b/src/managers/ChannelManager.js @@ -128,7 +128,7 @@ class ChannelManager extends CachedManager { recipients = recipients .map(r => this.client.users.resolveId(r)) .filter(r => r && this.client.relationships.cache.get(r) == RelationshipTypes.FRIEND); - if (recipients.length > 9) throw new Error('Invalid Users length (max=9)'); + if (recipients.length == 1 || recipients.length > 9) throw new Error('Invalid Users length (max=9)'); const data = await this.client.api.users['@me'].channels.post({ data: { recipients }, }); diff --git a/src/structures/Message.js b/src/structures/Message.js index 25add04..a23fdf6 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -1170,13 +1170,7 @@ class Message extends Base { return this.client.api.channels[this.channelId].messages[this.id].ack.post({ data: { manual: true, - mention_count: - this.mentions.everyone || - this.mentions.repliedUser?.id === this.client.user.id || - this.mentions.users.has(this.client.user.id) || - (this.guildId && this.mentions.roles.some(r => this.guild.members.me._roles?.includes(r.id))) - ? 1 - : 0, + mention_count: 1, }, }); } diff --git a/src/structures/Presence.js b/src/structures/Presence.js index 4c052d9..25dc1d0 100644 --- a/src/structures/Presence.js +++ b/src/structures/Presence.js @@ -650,7 +650,7 @@ class CustomStatus extends Activity { constructor(client, data = {}) { if (!client) throw new Error("Class constructor CustomStatus cannot be invoked without 'client'"); super('presence' in client ? client.presence : client, { - name: 'Custom Status', + name: ' ', type: ActivityTypes.CUSTOM, ...data, });