modmail
modmail copied to clipboard
Server Discovery channel names
Describe the bug Servers who are in the Discovery queue cannot have channels with inappropriate names (swears, slurs, etc).
Expected behavior
In the event that a channel cannot be created, then the channel name should something generic like ticket
, and the server staff can rename the ticket if needed. It would be ~better~ to keep track of how many tickets have been created in a server and rename a ticket to ticket-001
, but this requires altering the database again and this issue isn't big enough for this kind of change.
Couldn't the Redis cache be used to track how many tickets have been created rather than writing it to Postgres (if that's what you meant)? and if it does need to be in postgres for if the bot goes offline then you could just run a task every hour or so to update Postgres on how many open tickets there are.
Redis is for caching data that's pulled from the database often. Even if implemented in Redis, it would still need some place to store the information for long term/persistent storage.
You could run a task on ticket creation to see how many existing tickets there are, and label the ticket accordingly. However you would have duplicate ticket names often. Ex: You have 5 tickets. A new ticket is created and labeled ticket-006
. You close a ticket and now have 5 tickets. A new ticket is created and labeled ticket-006
.
It's just easier to name the channel some generic name and let the server staff deal with renaming it, rather than altering the database.