mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-17 12:03:31 +01:00
add way more friend shit (#815)
This commit is contained in:
committed by
Schuyler Cebulskie
parent
9f7c630796
commit
422b90c711
@@ -17,8 +17,12 @@ class ReadyHandler extends AbstractHandler {
|
||||
for (const privateDM of data.private_channels) client.dataManager.newChannel(privateDM);
|
||||
|
||||
for (const relation of data.relationships) {
|
||||
const friend = client.dataManager.newUser(relation.user);
|
||||
client.user.friends.set(friend.id, friend);
|
||||
const user = client.dataManager.newUser(relation.user);
|
||||
if (relation.type === 1) {
|
||||
client.user.friends.set(user.id, user);
|
||||
} else if (relation.type === 2) {
|
||||
client.user.blocked.set(user.id, user);
|
||||
}
|
||||
}
|
||||
|
||||
data.presences = data.presences || [];
|
||||
|
||||
Reference in New Issue
Block a user