File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,13 @@ const STAFF_ACCEPT_THRESHOLD = 2;
1818
1919const autoThread : ChannelHandlers = {
2020 handleMessage : async ( { msg : maybeMessage } ) => {
21+ if (
22+ maybeMessage . channel . type === ChannelType . PublicThread ||
23+ maybeMessage . channel . type === ChannelType . PrivateThread
24+ ) {
25+ return ;
26+ }
27+
2128 const msg = maybeMessage . partial
2229 ? await maybeMessage . fetch ( )
2330 : maybeMessage ;
Original file line number Diff line number Diff line change @@ -4,10 +4,17 @@ import { ChannelHandlers } from "../types";
44import { threadStats } from "../features/stats" ;
55import { format } from "date-fns" ;
66import fetch from "node-fetch" ;
7- import { MessageType } from "discord.js" ;
7+ import { ChannelType , MessageType } from "discord.js" ;
88
99const promotionThread : ChannelHandlers = {
1010 handleMessage : async ( { msg : maybeMessage } ) => {
11+ if (
12+ maybeMessage . channel . type === ChannelType . PublicThread ||
13+ maybeMessage . channel . type === ChannelType . PrivateThread
14+ ) {
15+ return ;
16+ }
17+
1118 const msg = maybeMessage . partial
1219 ? await maybeMessage . fetch ( )
1320 : maybeMessage ;
You can’t perform that action at this time.
0 commit comments