1- import { Client , REST , Routes } from "discord.js" ;
1+ import { Client , REST , Routes , Partials } from "discord.js" ;
22import * as v from "valibot" ;
33import * as modules from "./modules" ;
44import { config } from "dotenv" ;
@@ -8,17 +8,28 @@ const envSchema = v.object({
88 BOT_ID : v . string ( ) ,
99 GUILD_ID : v . string ( ) ,
1010 OBSERVER_CHANNEL_ID : v . string ( ) ,
11+ REACTION_FORWARDER_CHANNEL_ID : v . string ( ) ,
12+ REACTION_FORWARDER_REACTIONS : v . string ( ) ,
13+ REACTION_FORWARDER_THRESHOLD : v . pipe ( v . string ( ) , v . transform ( Number ) , v . integer ( ) ) ,
1114} ) ;
1215
1316config ( ) ;
1417
15- export type Env = v . InferInput < typeof envSchema > ;
18+ export type Env = v . InferOutput < typeof envSchema > ;
1619
1720const env = v . parse ( envSchema , process . env ) ;
1821process . env . TZ = "Asia/Tokyo" ;
1922
2023const client = new Client ( {
21- intents : [ "Guilds" , "GuildVoiceStates" , "GuildMessages" , "GuildMembers" , "MessageContent" ] ,
24+ intents : [
25+ "Guilds" ,
26+ "GuildVoiceStates" ,
27+ "GuildMessages" ,
28+ "GuildMembers" ,
29+ "MessageContent" ,
30+ "GuildMessageReactions" ,
31+ ] ,
32+ partials : [ Partials . Message , Partials . Channel , Partials . Reaction ] ,
2233} ) ;
2334
2435client . once ( "ready" , ( ) => {
0 commit comments