This commit is contained in:
Skillz
2020-05-22 15:58:22 -04:00
parent 94d2a36c25
commit 41620c2df2
5 changed files with 9 additions and 7 deletions

View File

@@ -70,7 +70,9 @@ export const createGuild = (data: CreateGuildPayload) => {
/** The users in this guild. */
members: new Map<string, Member>(),
/** The channels in the guild */
channels: new Map(data.channels.map((c) => [c.id, createChannel(c, data.id)])),
channels: new Map(
data.channels.map((c) => [c.id, createChannel(c, data.id)]),
),
/** The presences of all the users in the guild. */
presences: new Map(data.presences.map((p) => [p.user.id, p])),
/** The total number of members in this guild. This value is updated as members leave and join the server. However, if you do not have the intent enabled to be able to listen to these events, then this will not be accurate. */

View File

@@ -18,7 +18,7 @@ import { createUser } from "./user.ts";
export const createMember = (data: MemberCreatePayload, guild: Guild) => {
// Add the user to cache as well
cache.users.set(data.user.id, createUser(data.user))
cache.users.set(data.user.id, createUser(data.user));
return {
...data,