diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-09-09 21:50:20 -0400 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-09-09 21:50:20 -0400 |
commit | b8eb96c439b4e387fbb0854f0148d3ae74ddfeed (patch) | |
tree | 258be76d05849ca05901b790353b3fa50eeddce2 /src/listeners/message | |
parent | 22731b8bf1c66e4d66ee692cd2a650d609c206e0 (diff) | |
download | tanzanite-b8eb96c439b4e387fbb0854f0148d3ae74ddfeed.tar.gz tanzanite-b8eb96c439b4e387fbb0854f0148d3ae74ddfeed.tar.bz2 tanzanite-b8eb96c439b4e387fbb0854f0148d3ae74ddfeed.zip |
fix autothread
Diffstat (limited to 'src/listeners/message')
-rw-r--r-- | src/listeners/message/autoThread.ts | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/listeners/message/autoThread.ts b/src/listeners/message/autoThread.ts index 04f6bcf..a254337 100644 --- a/src/listeners/message/autoThread.ts +++ b/src/listeners/message/autoThread.ts @@ -6,8 +6,8 @@ import { BushClientEvents } from '../../lib/extensions/discord.js/BushClientEven export default class autoThreadListener extends BushListener { public constructor() { super('autoThread', { - emitter: 'commandHandler', - event: 'messageInvalid', + emitter: 'client', + event: 'messageCreate', category: 'message' }); } @@ -23,6 +23,17 @@ export default class autoThreadListener extends BushListener { message.content.includes('<:yes:822211477624586260>') ) return; + + if ( + (message.content.trim().startsWith(await message.guild.getSetting('prefix')) || + message.content.trim().startsWith(`<@!${client.user!.id}>`) || + message.content.trim().startsWith(`<@${client.user!.id}>`)) && + client.commandHandler.aliases.some((alias) => message.content.includes(alias)) + ) + return; + + if (message.thread) return; + // todo: make these configurable etc... if (message.guild.id !== '516977525906341928') return; // mb if (message.channel.id !== '714332750156660756') return; // neu-support-1 |