diff options
Diffstat (limited to 'packages/gateway/src/index.ts')
| -rw-r--r-- | packages/gateway/src/index.ts | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/packages/gateway/src/index.ts b/packages/gateway/src/index.ts new file mode 100644 index 0000000..1e1184a --- /dev/null +++ b/packages/gateway/src/index.ts @@ -0,0 +1,21 @@ +import { GatewayIntentBits, Client } from "discord.js"; +import dotenv from "dotenv"; +import { handleCommands } from "./commands"; +import { handleListeners } from "./listeners"; + +dotenv.config({ path: "../../.dev.vars" }); +console.log("Discord Token loaded:", process.env.DISCORD_TOKEN ? "Yes" : "No"); +console.log("Token length:", process.env.DISCORD_TOKEN?.length || 0); + +const client = new Client({ + intents: [ + GatewayIntentBits.Guilds, + GatewayIntentBits.GuildMembers, + GatewayIntentBits.GuildMessages, + GatewayIntentBits.MessageContent, + ], +}); + +handleCommands(client); +handleListeners(client); +client.login(process.env.DISCORD_TOKEN); |