11// loosely based on https://github.com/hackclub/scrappy
22import { setTimeout } from "node:timers/promises" ;
33import type { Message } from "discord.js" ;
4+ import { WACKY_ROLE_ID } from "../../utils/consts" ;
45
56const SHIP_CHANNEL_ID = "904896819165814794" ;
67const CHECKPOINTS_CHANNEL_ID = "1052236377338683514" ;
@@ -17,6 +18,7 @@ const CHECKPOINT_RESPONSE_MESSAGES = [
1718 "Awesome update! :D" ,
1819 "Yay thanks for sharing! :D" ,
1920 "Yippie!! Keep it up! :D" ,
21+ "Who up checking they point?" ,
2022] ;
2123
2224const SHIP_RESPONSE_MESSAGES = [
@@ -32,15 +34,6 @@ const SHIP_RESPONSE_MESSAGES = [
3234 "Boom, nice ship! :D" ,
3335] ;
3436
35- const CHECKPOINTS_MESSAGE_OPT_IN_USERS = [
36- "753840846549418024" , // kian
37- ] ;
38-
39- const SHIP_MESSAGE_OPT_IN_USERS = [
40- "753840846549418024" , // kian
41- "636701123620634653" , // ray
42- ] ;
43-
4437export default async function handler ( message : Message ) {
4538 if ( message . author . bot ) return ;
4639 if ( message . channel . isDMBased ( ) ) return ;
@@ -98,9 +91,7 @@ Cheers! ^•^`;
9891 } ) ;
9992
10093 if ( message . channelId === CHECKPOINTS_CHANNEL_ID ) {
101- // NOTE: a couple people didn't like this, so it's opt-in.
102- // can add it back if people come around to it :3
103- if ( CHECKPOINTS_MESSAGE_OPT_IN_USERS . includes ( message . author . id ) ) {
94+ if ( message . member ?. roles . cache . has ( WACKY_ROLE_ID ) ) {
10495 await Promise . all ( [
10596 message . react ( "🎉" ) ,
10697 message . react ( "✨" ) ,
@@ -117,8 +108,7 @@ Cheers! ^•^`;
117108 }
118109
119110 if ( message . channelId === SHIP_CHANNEL_ID ) {
120- // Keep sending messages for some, we still love you Wack Hacker </3
121- if ( SHIP_MESSAGE_OPT_IN_USERS . includes ( message . author . id ) ) {
111+ if ( message . member ?. roles . cache . has ( WACKY_ROLE_ID ) ) {
122112 await Promise . all ( [
123113 message . react ( "🎉" ) ,
124114 message . react ( "✨" ) ,
0 commit comments