diff --git a/src/gateway/opcodes/Identify.ts b/src/gateway/opcodes/Identify.ts
index 6ae1f9c2..6aa152d3 100644
--- a/src/gateway/opcodes/Identify.ts
+++ b/src/gateway/opcodes/Identify.ts
@@ -249,21 +249,14 @@ export async function onIdentify(this: WebSocket, data: Payload) {
// Generate guilds list ( make them unavailable if user is bot )
const guilds: GuildOrUnavailable[] = members.map((member) => {
- // Some Discord libraries do `'blah' in object` instead of
- // checking if the type is correct
- member.guild.roles.forEach((role) => {
- for (const key in role) {
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
- //@ts-ignore
- if (!role[key]) role[key] = undefined;
- }
- });
-
// filter guild channels we don't have permission to view
// TODO: check if this causes issues when the user is granted other roles?
member.guild.channels = member.guild.channels.filter((channel) => {
const perms = Permissions.finalPermission({
- user: { id: member.id, roles: member.roles.map((x) => x.id) },
+ user: {
+ id: member.id,
+ roles: member.roles.map((x) => x.id),
+ },
guild: member.guild,
channel,
});
@@ -422,6 +415,7 @@ export async function onIdentify(this: WebSocket, data: Payload) {
Config.get().gateway.endpointPublic ||
"ws://127.0.0.1:3001",
session_type: "normal", // TODO
+ auth_session_id_hash: "", // TODO
// lol hack whatever
required_action:
diff --git a/src/util/interfaces/Event.ts b/src/util/interfaces/Event.ts
index cbfa0767..21c34c6c 100644
--- a/src/util/interfaces/Event.ts
+++ b/src/util/interfaces/Event.ts
@@ -121,6 +121,7 @@ export interface ReadyEventData {
tutorial: number | null;
resume_gateway_url: string;
session_type: string;
+ auth_session_id_hash: string;
required_action?:
| "REQUIRE_VERIFIED_EMAIL"
| "REQUIRE_VERIFIED_PHONE"
|