More trolling

Signed-off-by: PandaNinjas <admin@malwarefight.gq>
This commit is contained in:
PandaNinjas 2023-02-12 18:05:50 -08:00 committed by GitHub
parent 3cdc51ced4
commit f099cc9900
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -35,6 +35,7 @@ export async function expandDiscordLink(message: Message): Promise<void> {
);
if (channel == undefined || channel == null || !channel.isTextBased()) {
execResult = re.exec(message.content);
continue;
}
@ -42,10 +43,12 @@ export async function expandDiscordLink(message: Message): Promise<void> {
if (
!channel.parent?.members?.some((user) => user.id == message.author.id)
) {
execResult = re.exec(message.content);
continue; // do not reveal a message to a user who can't see it
}
} else {
if (!channel.members?.some((user) => user.id == message.author.id)) {
execResult = re.exec(message.content);
continue; // do not reveal a message to a user who can't see it
}
}
@ -90,6 +93,7 @@ export async function expandDiscordLink(message: Message): Promise<void> {
await message.channel.send({ embeds: [builder], components: [row] });
} catch (e) {
console.error(e);
execResult = re.exec(message.content);
continue;
}