From dcdfc1fda7cfedf7c0f69ba51857fd7ebc71a2dd Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Wed, 29 Dec 2021 16:20:06 -0500 Subject: refactoring & documentation --- src/listeners/message/blacklistedFile.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/listeners') diff --git a/src/listeners/message/blacklistedFile.ts b/src/listeners/message/blacklistedFile.ts index 26e1719..5b01218 100644 --- a/src/listeners/message/blacklistedFile.ts +++ b/src/listeners/message/blacklistedFile.ts @@ -56,7 +56,7 @@ export default class BlacklistedFileListener extends BushListener { } ]; - constructor() { + public constructor() { super('blacklistedFile', { emitter: 'client', event: 'messageCreate', @@ -66,6 +66,7 @@ export default class BlacklistedFileListener extends BushListener { public override async exec(...[message]: BushClientEvents['messageCreate']) { if (!message.guild || !(await message.guild.hasFeature('blacklistedFile'))) return; + // eslint-disable-next-line deprecation/deprecation const embedAttachments = message.embeds.filter((e) => ['image', 'video', 'gifv'].includes(e.type)); const foundEmojis = [...message.content.matchAll(/<(?a?):\w+:(?\d+)>/g)]; if (message.attachments.size + embedAttachments.length + foundEmojis.length < 1) return; -- cgit