feat: block timed out users (#612)

Don't let timed out users open tickets. Letting them
open tickets is useless as they won't be able to write anything inside.
This reduces potential spam from misbehaving users.
This commit is contained in:
erdnaxe
2025-04-20 16:00:45 +00:00
committed by GitHub
parent d56561c024
commit 6e51345e40

View File

@@ -226,6 +226,11 @@ module.exports = class TicketManager {
if (blocked) return await sendError('blocked');
}
// Don't let timed out users open tickets, they won't be able to write anything inside
if (member.isCommunicationDisabled()) {
return await sendError('blocked');
}
if (category.requiredRoles.length !== 0) {
const missing = category.requiredRoles.some(r => !member.roles.cache.has(r));
if (missing) return await sendError('missing_roles');