File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import type { ModuleProps } from "../plugins" ;
2+ import { Emoji } from "../style" ;
23import * as utils from "../utils" ;
34
45export default ( { config, commands } : ModuleProps ) => {
@@ -8,6 +9,27 @@ export default ({ config, commands }: ModuleProps) => {
89 async ( msg , args , thread ) => {
910 if ( ! thread ) return ;
1011
12+ // Temporary joke referencing Annie's dream.
13+ function isLessThanSixHoursAgo ( date : Date ) : boolean {
14+ const sixHoursInMs = 6 * 60 * 60 * 1000 ;
15+ return Date . now ( ) - date . getTime ( ) < sixHoursInMs ;
16+ }
17+
18+ if (
19+ msg . author . id === "756447259159166978" &&
20+ isLessThanSixHoursAgo ( thread . created_at )
21+ ) {
22+ // @ts -ignore
23+ await msg . channel . send (
24+ `${ Emoji . Banned } Could not send reply: Thread is less than 6 hours old.` ,
25+ ) ;
26+
27+ setTimeout ( ( ) => {
28+ // @ts -ignore
29+ await msg . channel . send ( `🥃 Swish... just kidding :)` ) ;
30+ } , 3000 ) ;
31+ }
32+
1133 if ( ! args . text && msg . attachments . size === 0 ) {
1234 utils . postError ( msg . channel , "Text or attachment required" ) ;
1335 return ;
You can’t perform that action at this time.
0 commit comments