feat(GuildMember): set theme colors

This commit is contained in:
March 7th
2022-10-26 22:34:09 +07:00
parent 0c3d922096
commit 31e0de6a05
5 changed files with 33 additions and 1 deletions

View File

@@ -9,6 +9,7 @@ module.exports = (client, packet) => {
*/
const channel = client.channels.cache.get(packet.d.channel_id);
if (!channel) return;
if (!channel._recipients) channel._recipients = [];
channel._recipients.push(packet.d.user);
const user = client.users._add(packet.d.user);
client.emit(Events.CHANNEL_RECIPIENT_ADD, channel, user);

View File

@@ -9,6 +9,7 @@ module.exports = (client, packet) => {
*/
const channel = client.channels.cache.get(packet.d.channel_id);
if (!channel) return;
if (!channel._recipients) channel._recipients = [];
channel._recipients = channel._recipients.filter(r => r !== packet.d.user.id);
const user = client.users._add(packet.d.user);
client.emit(Events.CHANNEL_RECIPIENT_REMOVE, channel, user);