diff options
| -rw-r--r-- | example.env | 1 | ||||
| -rw-r--r-- | index.ts | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/example.env b/example.env index 0672d63..ce25cd3 100644 --- a/example.env +++ b/example.env @@ -1,3 +1,4 @@ DISCORD_CLIENT_ID="public_blah" DISCORD_TOKEN="secret_bleh" CELEBRATION_MESSAGE="<:club_mate:889629353934213210> 🎉" +ACTIVITY="https://git.0m.nu/flagboat" @@ -19,6 +19,7 @@ function requireEnv(key: string): string { let clientId = requireEnv("DISCORD_CLIENT_ID"); let token = requireEnv("DISCORD_TOKEN"); +let activity = requireEnv("ACTIVITY"); export let celebrationMessage = requireEnv("CELEBRATION_MESSAGE"); let client = new Client({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages] }); @@ -90,6 +91,8 @@ try { }); await client.login(token); + + client.user?.setActivity(activity); } catch (error) { console.error("Discord bot failed to start", error); process.exit(1); |
