Repository navigation
fix: give the bot access to the ticket channels it creates - #38
Merged
Musiker15 merged 1 commit intoOct 23, 2026
Merged
Conversation
Member
|
Thanks, good find. I checked it against main: no move resets the overwrites (everything uses #32 is merged now, so this branch conflicts with main in |
9 tasks done
The overwrites deny ViewChannel to @everyone and allow the creator and staff roles, but never the bot. A bot without Administrator (the permissions the startup check and invite URL ask for) locked itself out of every new ticket: the opening message failed with Missing Access and the player got 'an internal error has occurred'. Found in the live test. Claude-Session: https://claude.ai/code/session_01HZPZxD3edzJNFFsiWsHYY1
shane615
force-pushed
the
fix/bot-channel-access
branch
from
October 23, 2026 21:08
903c67a to
eba6eab
Compare
Contributor
Author
|
Rebased onto main; the entry is at the end of |
This was referenced Oct 23, 2026
shane615
added a commit
to Uncharted-Roleplay/ucrp-ticketbot
that referenced
this pull request
Oct 23, 2026
openTicket now looks the member up for getOpenRefusal, so the MSK-Scripts#38 test's fake guild needs members.fetch; and since MSK-Scripts#38 the channel overwrites read client.user.id, so the race test's fake client needs a bot user. Test fixtures only. Claude-Session: https://claude.ai/code/session_01HZPZxD3edzJNFFsiWsHYY1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
New ticket channels deny
ViewChannelto@everyoneand allow the creator and the staff roles. The@everyonedeny applies to the bot as well, and nothing allows it back in. A bot with Administrator doesn't notice, but with the permissions the startup check and the invite URL ask for (Manage Channels, Manage Roles, View Channel, Send Messages, Manage Messages, Embed Links, Attach Files, Read Message History), every new ticket fails right after the channel is created:The user gets "an internal error has occurred", and the half-created channel stays behind as an open ticket.
The fix adds a member overwrite for the bot itself (View Channel, Send Messages, Read Message History, Attach Files, Embed Links) to the channel's initial overwrites. Later moves use
lockPermissions: false, so the overwrite stays.Related Issue
None; found while testing #32–#34 live with a bot that has no Administrator.
Type of Change
How Was This Tested?
npm test: all pass, plustests/ticket-channel-access.test.js(fails without the fix).Checklist
MSK_API_KEYCHANGELOG.mdentry under[Unreleased]https://claude.ai/code/session_01HZPZxD3edzJNFFsiWsHYY1