CopilotKit / CopilotKit/outpost

Finish the GUILD_ID -> DISCORD_GUILD_* migration: .env.example crashes the discord-bot at boot

Open
#155 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area: channels roadmap roadmap: now
Dominant language
TypeScript
Stars
7
Forks
3
Avg merge
7d 16h
Merged PRs (30d)
15

Description

.env.example and the discord-bot disagree about a required variable, so provisioning a service from the example file fails at startup.

  • .env.example:54# Guild (server) IDs per community — replaces the old single GUILD_ID, then defines DISCORD_GUILD_COPILOTKIT and DISCORD_GUILD_AGUI. No GUILD_ID line is provided.
  • apps/discord-bot/src/config.ts:7guildId: requireEnv('GUILD_ID').

requireEnv throws on a missing value, so a bot configured from .env.example exits with Missing required environment variable: GUILD_ID before it connects. docs/deployment.md:79 also still lists GUILD_ID in the Discord env group, so the docs and the example contradict each other as well.

Either the migration is unfinished (the bot should read the per-community vars) or the comment is wrong (GUILD_ID is still required and belongs in the example). Both readings are defensible from the code, which is the problem — pick one and make the three places agree:

  1. apps/discord-bot/src/config.ts
  2. .env.example (lines 53-57, and 79's counterpart in the docs)
  3. docs/deployment.md:79

Verified during CR of #150; unrelated to that PR's subject, hence a separate issue. Directly relevant to the Slack/Discord deploy in #62/#63.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Compare the environment-variable contract in apps/discord-bot/src/config.ts with .env.example lines 53-57 and docs/deployment.md:79. Decide whether the bot should use the per-community variables or retain GUILD_ID, then make all three locations agree. Done means provisioning from .env.example no longer fails with a missing-variable error and the deployment documentation matches the example.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.