aboutsummaryrefslogtreecommitdiff
path: root/src/listeners/message
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-12-29 16:20:06 -0500
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-12-29 16:20:06 -0500
commitdcdfc1fda7cfedf7c0f69ba51857fd7ebc71a2dd (patch)
tree49845130275172abe14162427336842a7a71ccad /src/listeners/message
parent4cebaca70939b87c78537c5c3cd099e29e2e4e04 (diff)
downloadtanzanite-dcdfc1fda7cfedf7c0f69ba51857fd7ebc71a2dd.tar.gz
tanzanite-dcdfc1fda7cfedf7c0f69ba51857fd7ebc71a2dd.tar.bz2
tanzanite-dcdfc1fda7cfedf7c0f69ba51857fd7ebc71a2dd.zip
refactoring & documentation
Diffstat (limited to 'src/listeners/message')
-rw-r--r--src/listeners/message/blacklistedFile.ts3
1 files changed, 2 insertions, 1 deletions
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(/<(?<animated>a?):\w+:(?<id>\d+)>/g)];
if (message.attachments.size + embedAttachments.length + foundEmojis.length < 1) return;