From fd4dba022f6901f1e2d324baf5b1e9bfeec724e8 Mon Sep 17 00:00:00 2001 From: Seth Etter Date: Sat, 11 Jul 2026 08:49:47 -0500 Subject: [PATCH] rename: bot token -> token --- .env.example | 2 +- src/config.ts | 8 ++++---- src/main.ts | 2 +- test/server.test.ts | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.env.example b/.env.example index 5651cdf..e0a8cb6 100644 --- a/.env.example +++ b/.env.example @@ -1,3 +1,3 @@ SLACK_SIGNING_SECRET=asdf -SLACK_BOT_TOKEN=asdf +SLACK_TOKEN=asdf SLACK_ADMIN_TOKEN=asdf diff --git a/src/config.ts b/src/config.ts index 5dcf160..bfceb5d 100644 --- a/src/config.ts +++ b/src/config.ts @@ -4,9 +4,9 @@ export function loadConfig() { throw new Error("SLACK_SIGNING_SECRET is required"); } - const SLACK_BOT_TOKEN = process.env.SLACK_BOT_TOKEN; - if (!SLACK_BOT_TOKEN) { - throw new Error("SLACK_BOT_TOKEN is required"); + const SLACK_TOKEN = process.env.SLACK_TOKEN; + if (!SLACK_TOKEN) { + throw new Error("SLACK_TOKEN is required"); } const SLACK_ADMIN_TOKEN = process.env.SLACK_ADMIN_TOKEN; @@ -14,7 +14,7 @@ export function loadConfig() { throw new Error("SLACK_ADMIN_TOKEN is required"); } - return { SLACK_SIGNING_SECRET, SLACK_BOT_TOKEN, SLACK_ADMIN_TOKEN }; + return { SLACK_SIGNING_SECRET, SLACK_TOKEN, SLACK_ADMIN_TOKEN }; } export type AppConfig = ReturnType; diff --git a/src/main.ts b/src/main.ts index 618bbdb..1fa1d6d 100644 --- a/src/main.ts +++ b/src/main.ts @@ -8,7 +8,7 @@ const config = loadConfig(); const eventsClient = eventsClientFromOpenAPI(); const slackClient = makeSlackClient({ - botToken: config.SLACK_BOT_TOKEN, + botToken: config.SLACK_TOKEN, adminToken: config.SLACK_ADMIN_TOKEN, signingSecret: config.SLACK_SIGNING_SECRET, }); diff --git a/test/server.test.ts b/test/server.test.ts index 112ba90..134b9d7 100644 --- a/test/server.test.ts +++ b/test/server.test.ts @@ -9,7 +9,7 @@ import type { SlackClient } from "../src/slack/slack.ts"; const config: AppConfig = { SLACK_SIGNING_SECRET: "test-secret", - SLACK_BOT_TOKEN: "xoxb-test", + SLACK_TOKEN: "xoxb-test", SLACK_ADMIN_TOKEN: "xoxp-test", }; -- 2.51.2