summaryrefslogtreecommitdiff
path: root/index.ts
diff options
context:
space:
mode:
authorMathias Magnusson <mathias@magnusson.space>2026-01-20 11:13:34 +0100
committerMathias Magnusson <mathias@magnusson.space>2026-01-20 11:13:34 +0100
commit1d6bd068ccec00486cc99e2b35a746d1afaf3764 (patch)
tree56e9456651f9de7a921b78e9f8edd95804358688 /index.ts
parente7306a6703e353ea0acd5ba07d4d1db2827890c5 (diff)
downloadchalle-anka-1d6bd068ccec00486cc99e2b35a746d1afaf3764.tar.gz
set bot's activity to git repo url
Diffstat (limited to 'index.ts')
-rw-r--r--index.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/index.ts b/index.ts
index 98ddb0c..9bf969d 100644
--- a/index.ts
+++ b/index.ts
@@ -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);