Skip to content

Make #general thread-only with channel permission overwrites - #251

Merged
localden merged 3 commits into
mainfrom
general-thread-only
Nov 29, 2026
Merged

localden merged 3 commits into
mainfrom
general-thread-only

Conversation

@dend

@dend dend commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Makes the existing #general text channel thread-only in place, using channel permission overwrites. The channel keeps its ID and history.

  • @everyone: deny Send Messages; allow Create Public Threads and Send Messages in Threads
  • Moderators and community managers: allow Send Messages

To support this, channel entries in channels.ts can now declare permissionOverwrites. Only the declared permissions are managed; other overwrites on the channel are left alone.

Before deploying, the bot needs Manage Roles, Send Messages, Create Public Threads and Send Messages in Threads.

Discord cannot convert a text channel into a forum, so making #general
thread-only means creating a new forum channel in the General category.
The existing #general text channel is left untouched and must be retired
by hand once people have moved over.
@dend
dend requested a review from a team as a code owner November 21, 2026 16:20
Replace the new forum channel with a policy on the existing #general text
channel: @everyone is denied SEND_MESSAGES and allowed CREATE_PUBLIC_THREADS
and SEND_MESSAGES_IN_THREADS, so members can only start threads and reply in
them. Moderators and community managers keep SEND_MESSAGES.

Add permissionOverwrites to channel entries to support this. Pulumi owns only
the declared permissions: other bits on the same overwrite and overwrites for
other roles or members are preserved, and permissions removed from config are
cleared on the next deploy.
@dend dend changed the title Add a thread-only general forum channel Make #general thread-only with channel permission overwrites Nov 21, 2026
@github-actions

Copy link
Copy Markdown

Pulumi Preview

Click to expand preview output
Previewing update (prod):
  pulumi:pulumi:Stack: (same)
    [urn=urn:pulumi:prod::mcp-access::pulumi:pulumi:Stack::mcp-access-prod]
    ~ googleworkspace:index/orgUnit:OrgUnit: (update)
        [id=id:03ph8a2z0nc6rsr]
        [urn=urn:pulumi:prod::mcp-access::googleworkspace:index/orgUnit:OrgUnit::mcp-org-unit]
        [provider=urn:pulumi:prod::mcp-access::pulumi:providers:googleworkspace::default_0_11_2::2a78e29b-bbb9-425e-a8de-1a161a6a7d9f]
        description      : "Model Context Protocol"
        name             : "Model Context Protocol"
        parentOrgUnitPath: "/"
    + pulumi-nodejs:dynamic:Resource: (create)
        [urn=urn:pulumi:prod::mcp-access::pulumi-nodejs:dynamic:Resource::discord-channel-1358869848138059969]
        channel             : {
            id                  : "1358869848138059969"
            permissionOverwrites: [
                [0]: {
                    allow: [
                        [0]: "CREATE_PUBLIC_THREADS"
                        [1]: "SEND_MESSAGES_IN_THREADS"
                    ]
                    deny : [
                        [0]: "SEND_MESSAGES"
                    ]
                    role : "@everyone"
                }
                [1]: {
                    allow: [
                        [0]: "SEND_MESSAGES"
                    ]
                    role : "moderators"
                }
                [2]: {
                    allow: [
                        [0]: "SEND_MESSAGES"
                    ]
                    role : "community-managers"
                }
            ]
            type                : "text"
        }
        guildId             : "1358869848138059966"
        permissionOverwrites: [
            [0]: {
                allow: "309237645312"
                deny : "2048"
                id   : "1358869848138059966"
            }
            [1]: {
                allow: "2048"
                deny : "0"
                id   : "1460760656226680903"
            }
            [2]: {
                allow: "2048"
                deny : "0"
                id   : "1461488567162503189"
            }
        ]
        token               : [secret]
    ~ googleworkspace:index/groupSettings:GroupSettings: (update)
        [id=registry-wg@modelcontextprotocol.io]
        [urn=urn:pulumi:prod::mcp-access::googleworkspace:index/groupSettings:GroupSettings::registry-wg]
        [provider=urn:pulumi:prod::mcp-access::pulumi:providers:googleworkspace::default_0_11_2::2a78e29b-bbb9-425e-a8de-1a161a6a7d9f]
        allowExternalMembers : true
        email                : "registry-wg@modelcontextprotocol.io"
        whoCanContactOwner   : "ALL_OWNERS_CAN_CONTACT"
        whoCanJoin           : "INVITED_CAN_JOIN"
        whoCanLeaveGroup     : "NONE_CAN_LEAVE"
        whoCanModerateMembers: "NONE"
        whoCanPostMessage    : "ALL_OWNERS_CAN_POST"
        whoCanViewGroup      : "ALL_OWNERS_CAN_VIEW"
        whoCanViewMembership : "ALL_IN_DOMAIN_CAN_VIEW"
    ~ googleworkspace:index/groupSettings:GroupSettings: (update)
        [id=moderators@modelcontextprotocol.io]
        [urn=urn:pulumi:prod::mcp-access::googleworkspace:index/groupSettings:GroupSettings::moderators]
        [provider=urn:pulumi:prod::mcp-access::pulumi:providers:googleworkspace::default_0_11_2::2a78e29b-bbb9-425e-a8de-1a161a6a7d9f]
        allowExternalMembers : false
        email                : "moderators@modelcontextprotocol.io"
        whoCanContactOwner   : "ALL_OWNERS_CAN_CONTACT"
        whoCanJoin           : "INVITED_CAN_JOIN"
        whoCanLeaveGroup     : "NONE_CAN_LEAVE"
        whoCanModerateMembers: "NONE"
        whoCanPostMessage    : "ALL_OWNERS_CAN_POST"
        whoCanViewGroup      : "ALL_OWNERS_CAN_VIEW"
        whoCanViewMembership : "ALL_IN_DOMAIN_CAN_VIEW"
    ~ googleworkspace:index/groupSettings:GroupSettings: (update)
        [id=appeals@modelcontextprotocol.io]
        [urn=urn:pulumi:prod::mcp-access::googleworkspace:index/groupSettings:GroupSettings::appeals]
        [provider=urn:pulumi:prod::mcp-access::pulumi:providers:googleworkspace::default_0_11_2::2a78e29b-bbb9-425e-a8de-1a161a6a7d9f]
        allowExternalMembers : false
        email                : "appeals@modelcontextprotocol.io"
        whoCanContactOwner   : "ALL_OWNERS_CAN_CONTACT"
        whoCanJoin           : "INVITED_CAN_JOIN"
        whoCanLeaveGroup     : "NONE_CAN_LEAVE"
        whoCanModerateMembers: "NONE"
        whoCanPostMessage    : "ANYONE_CAN_POST"
        whoCanViewGroup      : "ALL_MEMBERS_CAN_VIEW"
        whoCanViewMembership : "ALL_IN_DOMAIN_CAN_VIEW"
    ~ googleworkspace:index/groupSettings:GroupSettings: (update)
        [id=catch-all@modelcontextprotocol.io]
        [urn=urn:pulumi:prod::mcp-access::googleworkspace:index/groupSettings:GroupSettings::catch-all]
        [provider=urn:pulumi:prod::mcp-access::pulumi:providers:googleworkspace::default_0_11_2::2a78e29b-bbb9-425e-a8de-1a161a6a7d9f]
        allowExternalMembers : true
        email                : "catch-all@modelcontextprotocol.io"
        whoCanContactOwner   : "ALL_OWNERS_CAN_CONTACT"
        whoCanJoin           : "INVITED_CAN_JOIN"
        whoCanLeaveGroup     : "NONE_CAN_LEAVE"
        whoCanModerateMembers: "NONE"
        whoCanPostMessage    : "ANYONE_CAN_POST"
        whoCanViewGroup      : "ALL_MEMBERS_CAN_VIEW"
        whoCanViewMembership : "ALL_IN_DOMAIN_CAN_VIEW"
    ~ googleworkspace:index/groupSettings:GroupSettings: (update)
        [id=antitrust@modelcontextprotocol.io]
        [urn=urn:pulumi:prod::mcp-access::googleworkspace:index/groupSettings:GroupSettings::antitrust]
        [provider=urn:pulumi:prod::mcp-access::pulumi:providers:googleworkspace::default_0_11_2::2a78e29b-bbb9-425e-a8de-1a161a6a7d9f]
        allowExternalMembers : true
        email                : "antitrust@modelcontextprotocol.io"
        whoCanContactOwner   : "ALL_OWNERS_CAN_CONTACT"
        whoCanJoin           : "INVITED_CAN_JOIN"
        whoCanLeaveGroup     : "NONE_CAN_LEAVE"
        whoCanModerateMembers: "NONE"
        whoCanPostMessage    : "ANYONE_CAN_POST"
        whoCanViewGroup      : "ALL_MEMBERS_CAN_VIEW"
        whoCanViewMembership : "ALL_IN_DOMAIN_CAN_VIEW"
    ~ googleworkspace:index/groupSettings:GroupSettings: (update)
        [id=core-maintainers@modelcontextprotocol.io]
        [urn=urn:pulumi:prod::mcp-access::googleworkspace:index/groupSettings:GroupSettings::core-maintainers]
        [provider=urn:pulumi:prod::mcp-access::pulumi:providers:googleworkspace::default_0_11_2::2a78e29b-bbb9-425e-a8de-1a161a6a7d9f]
        allowExternalMembers : false
        email                : "core-maintainers@modelcontextprotocol.io"
        whoCanContactOwner   : "ALL_OWNERS_CAN_CONTACT"
        whoCanJoin           : "INVITED_CAN_JOIN"
        whoCanLeaveGroup     : "NONE_CAN_LEAVE"
        whoCanModerateMembers: "NONE"
        whoCanPostMessage    : "ALL_OWNERS_CAN_POST"
        whoCanViewGroup      : "ALL_OWNERS_CAN_VIEW"
        whoCanViewMembership : "ALL_IN_DOMAIN_CAN_VIEW"
    ~ googleworkspace:index/groupSettings:GroupSettings: (update)
        [id=security@modelcontextprotocol.io]
        [urn=urn:pulumi:prod::mcp-access::googleworkspace:index/groupSettings:GroupSettings::security]
        [provider=urn:pulumi:prod::mcp-access::pulumi:providers:googleworkspace::default_0_11_2::2a78e29b-bbb9-425e-a8de-1a161a6a7d9f]
        allowExternalMembers : false
        email                : "security@modelcontextprotocol.io"
        whoCanContactOwner   : "ALL_OWNERS_CAN_CONTACT"
        whoCanJoin           : "INVITED_CAN_JOIN"
        whoCanLeaveGroup     : "NONE_CAN_LEAVE"
        whoCanModerateMembers: "NONE"
        whoCanPostMessage    : "ANYONE_CAN_POST"
        whoCanViewGroup      : "ALL_MEMBERS_CAN_VIEW"
        whoCanViewMembership : "ALL_IN_DOMAIN_CAN_VIEW"
    ~ googleworkspace:index/groupSettings:GroupSettings: (update)
        [id=maintainers@modelcontextprotocol.io]
        [urn=urn:pulumi:prod::mcp-access::googleworkspace:index/groupSettings:GroupSettings::maintainers]
        [provider=urn:pulumi:prod::mcp-access::pulumi:providers:googleworkspace::default_0_11_2::2a78e29b-bbb9-425e-a8de-1a161a6a7d9f]
        allowExternalMembers : true
        email                : "maintainers@modelcontextprotocol.io"
        whoCanContactOwner   : "ALL_OWNERS_CAN_CONTACT"
        whoCanJoin           : "INVITED_CAN_JOIN"
        whoCanLeaveGroup     : "NONE_CAN_LEAVE"
        whoCanModerateMembers: "NONE"
        whoCanPostMessage    : "ALL_OWNERS_CAN_POST"
        whoCanViewGroup      : "ALL_OWNERS_CAN_VIEW"
        whoCanViewMembership : "ALL_IN_DOMAIN_CAN_VIEW"
    ~ googleworkspace:index/groupSettings:GroupSettings: (update)
        [id=lead-maintainers@modelcontextprotocol.io]
        [urn=urn:pulumi:prod::mcp-access::googleworkspace:index/groupSettings:GroupSettings::lead-maintainers]
        [provider=urn:pulumi:prod::mcp-access::pulumi:providers:googleworkspace::default_0_11_2::2a78e29b-bbb9-425e-a8de-1a161a6a7d9f]
        allowExternalMembers : false
        email                : "lead-maintainers@modelcontextprotocol.io"
        whoCanContactOwner   : "ALL_OWNERS_CAN_CONTACT"
        whoCanJoin           : "INVITED_CAN_JOIN"
        whoCanLeaveGroup     : "NONE_CAN_LEAVE"
        whoCanModerateMembers: "NONE"
        whoCanPostMessage    : "ALL_OWNERS_CAN_POST"
        whoCanViewGroup      : "ALL_OWNERS_CAN_VIEW"
        whoCanViewMembership : "ALL_IN_DOMAIN_CAN_VIEW"
    --outputs:--
  ~ cloudflareAccessPolicies : {
      ~ security-room-maintainers: {
            accountId                   : "c39d6379ccfdb20a3627eeddffa80ec9"
            appCount                    : 1
          + approvalGroups              : [unknown]
          + approvalRequired            : [unknown]
            connectionRules             : {
                rdp: {}
            }
            createdAt                   : "2026-08-30T07:04:32Z"
            decision                    : "allow"
          + excludes                    : [unknown]
            id                          : "11a6814e-bb85-4ea2-aa12-6b081b09aa56"
            includes                    : [
                [0]: {
                    githubOrganization: {
                        identityProviderId: "1e53bc11-a504-4572-92d1-4c8d56fc198b"
                        name              : "modelcontextprotocol"
                        team              : "core-maintainers"
                    }
                }
                [1]: {
                    githubOrganization: {
                        identityProviderId: "1e53bc11-a504-4572-92d1-4c8d56fc198b"
                        name              : "modelcontextprotocol"
                        team              : "lead-maintainers"
                    }
                }
                [2]: {
                    githubOrganization: {
                        identityProviderId: "1e53bc11-a504-4572-92d1-4c8d56fc198b"
                        name              : "modelcontextprotocol"
                        team              : "security-managers"
                    }
                }
                [3]: {
                    githubOrganization: {
                        identityProviderId: "1e53bc11-a504-4572-92d1-4c8d56fc198b"
                        name              : "modelcontextprotocol"
                        team              : "security-team"
                    }
                }
            ]
          + isolationRequired           : [unknown]
          + mfaConfig                   : [unknown]
            name                        : "Maintainers"
          + purposeJustificationPrompt  : [unknown]
          + purposeJustificationRequired: [unknown]
          + requires                    : [unknown]
            reusable                    : true
          + sessionDuration             : [unknown]
            updatedAt                   : "2026-09-29T22:44:09Z"
            urn                         : "urn:pulumi:prod::mcp-access::cloudflare:index/zeroTrustAccessPolicy:ZeroTrustAccessPolicy::access-policy-security-room-maintainers"
        }
    }
  ~ discordChannels          : {
      + 1358869848138059969: {
          + channel             : {
              + id                  : "1358869848138059969"
              + permissionOverwrites: [
              +     [0]: {
                      + allow: [
                      +     [0]: "CREATE_PUBLIC_THREADS"
                      +     [1]: "SEND_MESSAGES_IN_THREADS"
                        ]
                      + deny : [
                      +     [0]: "SEND_MESSAGES"
                        ]
                      + role : "@everyone"
                    }
              +     [1]: {
                      + allow: [
                      +     [0]: "SEND_MESSAGES"
                        ]
                      + role : "moderators"
                    }
              +     [2]: {
                      + allow: [
                      +     [0]: "SEND_MESSAGES"
                        ]
                      + role : "community-managers"
                    }
                ]
              + type                : "text"
            }
          + channelId           : [unknown]
          + guildId             : "1358869848138059966"
          + id                  : [unknown]
          + permissionOverwrites: [
          +     [0]: {
                  + allow: "309237645312"
                  + deny : "2048"
                  + id   : "1358869848138059966"
                }
          +     [1]: {
                  + allow: "2048"
                  + deny : "0"
                  + id   : "1460760656226680903"
                }
          +     [2]: {
                  + allow: "2048"
                  + deny : "0"
                  + id   : "1461488567162503189"
                }
            ]
          + state               : [unknown]
          + token               : [secret]
          + urn                 : "urn:pulumi:prod::mcp-access::pulumi-nodejs:dynamic:Resource::discord-channel-1358869848138059969"
        }
    }
  ~ googleGroups             : {
      ~ antitrust       : {
            adminCreated      : true
            description       : "Antitrust compliance contacts \n(Managed by github.com/modelcontextprotocol/access)"
            directMembersCount: 3
            email             : "antitrust@modelcontextprotocol.io"
            etag              : "\"VbqSf-yrmEfRSgG5mKhNXH6ZbZd6vfos28i0x3r99Hg/12nXGX1E7I-1YUOAYQeNSbKogNo\""
            id                : "03jtnz0s4hi6gld"
            name              : "antitrust"
            nonEditableAliases: [
                [0]: "antitrust@modelcontextprotocol.io.test-google-a.com"
            ]
          + timeouts          : [unknown]
            urn               : "urn:pulumi:prod::mcp-access::googleworkspace:index/group:Group::antitrust"
        }
      ~ appeals         : {
            adminCreated      : true
            description       : "Code of Conduct ban appeals inbox \n(Managed by github.com/modelcontextprotocol/access)"
            directMembersCount: 7
            email             : "appeals@modelcontextprotocol.io"
            etag              : "\"VbqSf-yrmEfRSgG5mKhNXH6ZbZd6vfos28i0x3r99Hg/YG7AugYroj58SMbKq19ZUn2K0oo\""
            id                : "02lwamvv3jybavz"
            name              : "appeals"
            nonEditableAliases: [
                [0]: "appeals@modelcontextprotocol.io.test-google-a.com"
            ]
          + timeouts          : [unknown]
            urn               : "urn:pulumi:prod::mcp-access::googleworkspace:index/group:Group::appeals"
        }
      ~ catch-all       : {
            adminCreated      : true
            description       : "Catch-all email group \n(Managed by github.com/modelcontextprotocol/access)"
            directMembersCount: 1
            email             : "catch-all@modelcontextprotocol.io"
            etag              : "\"VbqSf-yrmEfRSgG5mKhNXH6ZbZd6vfos28i0x3r99Hg/pTou_lPGwjMpstD35DKtK2YkPfY\""
            id                : "00upglbi31qapnv"
            name              : "catch-all"
            nonEditableAliases: [
                [0]: "catch-all@modelcontextprotocol.io.test-google-a.com"
            ]
          + timeouts          : [unknown]
            urn               : "urn:pulumi:prod::mcp-access::googleworkspace:index/group:Group::catch-all"
        }
      ~ core-maintainers: {
            adminCreated      : true
            description       : "Core maintainers \n(Managed by github.com/modelcontextprotocol/access)"
            directMembersCount: 9
            email             : "core-maintainers@modelcontextprotocol.io"
            etag              : "\"VbqSf-yrmEfRSgG5mKhNXH6ZbZd6vfos28i0x3r99Hg/Js8-fag3WWiFJ5ogLQnHbUkeNNQ\""
            id                : "028h4qwu28692os"
            name              : "core-maintainers"
            nonEditableAliases: [
                [0]: "core-maintainers@modelcontextprotocol.io.test-google-a.com"
            ]
          + timeouts          : [unknown]
            urn               : "urn:pulumi:prod::mcp-access::googleworkspace:index/group:Group::core-maintainers"
        }
      ~ lead-maintainers: {
            adminCreated      : true
            description       : "Lead core maintainers \n(Managed by github.com/modelcontextprotocol/access)"
            directMembersCount: 3
            email             : "lead-maintainers@modelcontextprotocol.io"
            etag              : "\"VbqSf-yrmEfRSgG5mKhNXH6ZbZd6vfos28i0x3r99Hg/n2Lvhva7IyRgxEYaRf4y0umm-8I\""
            id                : "00meukdy1121tlu"
            name              : "lead-maintainers"
            nonEditableAliases: [
                [0]: "lead-maintainers@modelcontextprotocol.io.test-google-a.com"
            ]
          + timeouts          : [unknown]
            urn               : "urn:pulumi:prod::mcp-access::googleworkspace:index/group:Group::lead-maintainers"
        }
      ~ maintainers     : {
            adminCreated      : true
            description       : "General maintainers \n(Managed by github.com/modelcontextprotocol/access)"
            directMembersCount: 21
            email             : "maintainers@modelcontextprotocol.io"
            etag              : "\"VbqSf-yrmEfRSgG5mKhNXH6ZbZd6vfos28i0x3r99Hg/LXvhHnqRmEEEa81aQhhRofT32_g\""
            id                : "04f1mdlm38smb30"
            name              : "maintainers"
            nonEditableAliases: [
                [0]: "maintainers@modelcontextprotocol.io.test-google-a.com"
            ]
          + timeouts          : [unknown]
            urn               : "urn:pulumi:prod::mcp-access::googleworkspace:index/group:Group::maintainers"
        }
      ~ moderators      : {
            adminCreated      : true
            description       : "Community moderators \n(Managed by github.com/modelcontextprotocol/access)"
            directMembersCount: 8
            email             : "moderators@modelcontextprotocol.io"
            etag              : "\"VbqSf-yrmEfRSgG5mKhNXH6ZbZd6vfos28i0x3r99Hg/hrsc4FmmaLhHGshskk933rKRxa4\""
            id                : "028h4qwu0zx0c4t"
            name              : "moderators"
            nonEditableAliases: [
                [0]: "moderators@modelcontextprotocol.io.test-google-a.com"
            ]
          + timeouts          : [unknown]
            urn               : "urn:pulumi:prod::mcp-access::googleworkspace:index/group:Group::moderators"
        }
      ~ registry-wg     : {
            adminCreated      : true
            description       : "Official registry builders and maintainers \n(Managed by github.com/modelcontextprotocol/access)"
            directMembersCount: 4
            email             : "registry-wg@modelcontextprotocol.io"
            etag              : "\"VbqSf-yrmEfRSgG5mKhNXH6ZbZd6vfos28i0x3r99Hg/BW1gtJfJQOnzFgOMqoUNAsxYhRQ\""
            id                : "040ew0vw3g472qb"
            name              : "registry-wg"
            nonEditableAliases: [
                [0]: "registry-wg@modelcontextprotocol.io.test-google-a.com"
            ]
          + timeouts          : [unknown]
            urn               : "urn:pulumi:prod::mcp-access::googleworkspace:index/group:Group::registry-wg"
        }
      ~ security        : {
            adminCreated      : true
            description       : "Organization security managers (security_manager org role via orgRoles.ts) \n(Managed by github.com/modelcontextprotocol/access)"
            directMembersCount: 3
            email             : "security@modelcontextprotocol.io"
            etag              : "\"VbqSf-yrmEfRSgG5mKhNXH6ZbZd6vfos28i0x3r99Hg/epy6JJzMg42SQvZAKqU-i71G148\""
            id                : "04k668n32gk6gpc"
            name              : "security"
            nonEditableAliases: [
                [0]: "security@modelcontextprotocol.io.test-google-a.com"
            ]
          + timeouts          : [unknown]
            urn               : "urn:pulumi:prod::mcp-access::googleworkspace:index/group:Group::security"
        }
    }
Resources:
    + 1 to create
    ~ 10 to update
    11 changes. 754 unchanged

@localden
localden merged commit 70daac9 into main Nov 29, 2026
5 checks passed
@localden
localden deleted the general-thread-only branch November 29, 2026 02:54

This branch had an error being deployed

1 failed (outdated) and 1 active deployments
preview — a12a146f Deployed Nov 29, 2026 by localden via Preview Changes #449
production — 18e5a639 Deployed Nov 21, 2026 by dend via Preview Changes #422
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.

2 participants