Skip to content

feat: admit an allowlisted operator's mention anywhere in an allowlisted guild - #89

Merged
EthanThatOneKid merged 1 commit into
mainfrom
guild-wide-internal
Sep 23, 2026
Merged

EthanThatOneKid merged 1 commit into
mainfrom
guild-wide-internal

Conversation

@EthanThatOneKid

Copy link
Copy Markdown
Contributor

The internal tier requires the channel to be on DISCORD_INTERNAL_CHANNEL_IDS, so a mention from an allowlisted operator in any other channel is dropped even when the bot can read it. DISCORD_INTERNAL_GUILD_WIDE=1 makes the channel allowlist optional inside an allowlisted guild, keeping the guild allowlist and the user/role allowlist mandatory — a public or shared server stays closed, and the public tier is untouched. Off by default, so existing deployments do not change behavior.

…ted guild

The internal tier required the channel to be on the allowlist, so an operator
mentioning the bot outside the allowlisted channels was dropped even when the
bot could read the message. DISCORD_INTERNAL_GUILD_WIDE makes the channel
allowlist optional inside an allowlisted guild while keeping both the guild
allowlist and the user/role allowlist mandatory, so a public or shared server
stays closed. Off by default.
@vercel

vercel Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
computer Ready Ready Preview Sep 23, 2026 9:34pm UTC

@wazoocomputer

wazoocomputer Bot commented Sep 23, 2026

Copy link
Copy Markdown

This pull request, titled "feat: admit an allowlisted operator's mention anywhere in an allowlisted guild", allows an allowlisted operator to mention the bot in any channel of an allowlisted Discord guild, rather than being restricted to specific allowlisted channels. This change is controlled by a new DISCORD_INTERNAL_GUILD_WIDE environment variable, which, when enabled, makes the channel allowlist optional within an allowlisted guild, while the guild and user/role allowlists remain mandatory. This ensures that public or shared servers are not inadvertently opened.

Changed files

File Path Change Type Summary
.github/ARCHITECTURE.md modified Updated the description of discord-mentions.ts to include the DISCORD_INTERNAL_GUILD_WIDE flag.
README.md modified Added documentation for the new DISCORD_INTERNAL_GUILD_WIDE environment variable.
lib/discord-guild-wide.test.ts added New test file to verify the behavior of guild-wide internal Discord access.
lib/discord-policy.test.ts modified Added test cases for discordPolicyConfigFromEnv to cover the new internalGuildWide flag.
lib/discord-policy.ts modified Implemented the parseFlag function and integrated internalGuildWide into discordPolicyConfigFromEnv and resolveDiscordAccess.

Reviewers, please start by examining lib/discord-policy.ts to understand the core logic change.

1 similar comment
@wazoocomputer

wazoocomputer Bot commented Sep 23, 2026

Copy link
Copy Markdown

This pull request, titled "feat: admit an allowlisted operator's mention anywhere in an allowlisted guild", allows an allowlisted operator to mention the bot in any channel of an allowlisted Discord guild, rather than being restricted to specific allowlisted channels. This change is controlled by a new DISCORD_INTERNAL_GUILD_WIDE environment variable, which, when enabled, makes the channel allowlist optional within an allowlisted guild, while the guild and user/role allowlists remain mandatory. This ensures that public or shared servers are not inadvertently opened.

Changed files

File Path Change Type Summary
.github/ARCHITECTURE.md modified Updated the description of discord-mentions.ts to include the DISCORD_INTERNAL_GUILD_WIDE flag.
README.md modified Added documentation for the new DISCORD_INTERNAL_GUILD_WIDE environment variable.
lib/discord-guild-wide.test.ts added New test file to verify the behavior of guild-wide internal Discord access.
lib/discord-policy.test.ts modified Added test cases for discordPolicyConfigFromEnv to cover the new internalGuildWide flag.
lib/discord-policy.ts modified Implemented the parseFlag function and integrated internalGuildWide into discordPolicyConfigFromEnv and resolveDiscordAccess.

Reviewers, please start by examining lib/discord-policy.ts to understand the core logic change.

@EthanThatOneKid
EthanThatOneKid merged commit 50485e9 into main Sep 23, 2026
3 checks passed
@EthanThatOneKid
EthanThatOneKid deleted the guild-wide-internal branch September 23, 2026 21:37

This branch was successfully deployed

1 active deployment
Preview — fd46e43a Deployed Sep 23, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant