Fix disabling ticket limit using 0

This commit is contained in:
Toastie 2024-12-26 17:57:58 +13:00
parent 7f13161853
commit 3a94de9f23
Signed by: toastie_t0ast
GPG key ID: 27F3B6855AFD40A4

View file

@ -161,7 +161,9 @@ public class NewCommand : ApplicationCommandModule
return (false, "You cannot use this command in a ticket channel.");
}
if (!Database.IsStaff(userID) && Database.TryGetOpenTickets(userID, out List<Database.Ticket> ownTickets) && ownTickets.Count >= Config.ticketLimit)
if (!Database.IsStaff(userID)
&& Database.TryGetOpenTickets(userID, out List<Database.Ticket> ownTickets)
&& (ownTickets.Count >= Config.ticketLimit && Config.ticketLimit != 0))
{
return (false, "You have reached the limit for maximum open tickets.");
}