summary refs log tree commit diff
path: root/src/opcodes/Identify.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/opcodes/Identify.ts')
-rw-r--r--src/opcodes/Identify.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/opcodes/Identify.ts b/src/opcodes/Identify.ts

index fdde79fc..61238e62 100644 --- a/src/opcodes/Identify.ts +++ b/src/opcodes/Identify.ts
@@ -48,6 +48,8 @@ export async function onIdentify(this: WebSocket, data: Payload) { const channels = await ChannelModel.find({ recipients: this.user_id }).lean().exec(); const user = await UserModel.findOne({ id: this.user_id }).lean().exec(); + if (!user) return this.close(CLOSECODES.Authentication_failed); + const public_user = { username: user.username, discriminator: user.discriminator,