Use a dropdown and a Create ticket button on the ticket panel, in orange
The panel is now one category dropdown and a Create ticket button instead of a button per category. Discord doesn't send the dropdown's value with a button click, so each member's pick is remembered in memory for 15 minutes (per guild and member, capped). Panels posted before keep working until they're reposted. Every ticket embed is orange, closed tickets included. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
e453a9ba94
commit
e10e1f7a86
8 files changed
+178
-50
No files matched your search
@@ -1,7 +1,8 @@
|
||||
// Package tickets is the support ticket system: a panel message with one
|
||||
// button per category, a short form, and a private thread per ticket that
|
||||
// staff can claim and anyone involved can close. Closing locks and archives
|
||||
// the thread and posts a transcript to the log channel.
|
||||
// Package tickets is the support ticket system: a panel message with a
|
||||
// category dropdown and a Create ticket button, a short form, and a private
|
||||
// thread per ticket that staff can claim and anyone involved can close.
|
||||
// Closing locks and archives the thread and posts a transcript to the log
|
||||
// channel.
|
||||
//
|
||||
// The Discord and database calls go through small interfaces so the flows
|
||||
// can be tested without either; the slash command and button handlers in
|
||||
@@ -67,7 +68,9 @@ const (
|
||||
|
||||
var (
|
||||
defaultStore Store
|
||||
accent = 0x2b7bfa
|
||||
// Every ticket embed (panel, ticket, log) is orange, so support stands
|
||||
// apart from the bot's other messages.
|
||||
accent = 0xf97316
|
||||
)
|
||||
|
||||
func Init(s Store) { defaultStore = s }
|
||||
@@ -80,7 +83,6 @@ const (
|
||||
maxSubject = 100
|
||||
maxDetails = 1000
|
||||
maxReason = 300
|
||||
maxPanelButtons = 5 // more categories than this switch the panel to a dropdown
|
||||
maxCategories = 25
|
||||
autoArchiveWeek = 10080
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user