fix: actually check for guildid

Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
Sefa Eyeoglu 2023-02-16 22:41:13 +01:00
parent 627d4b24c2
commit 66a63a12e2
No known key found for this signature in database
GPG key ID: E13DFD4B47127951

View file

@ -31,7 +31,7 @@ export async function expandDiscordLink(message: Message): Promise<void> {
if (n >= 3) if (n >= 3)
break; // only process three previews break; // only process three previews
if (r.groups == undefined && r.groups.server_id != message.guildId) if (r.groups == undefined || r.groups.server_id != message.guildId)
continue; // do not let the bot leak messages from one server to another continue; // do not let the bot leak messages from one server to another
const channel = await message.guild?.channels.fetch( const channel = await message.guild?.channels.fetch(