mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-11-05 04:13:08 +02:00
fix: inactivity warning spam
This commit is contained in:
parent
c3620309bd
commit
f69bc9a185
@ -1159,6 +1159,7 @@ module.exports = class TicketManager {
|
||||
closedBy = null,
|
||||
reason = null,
|
||||
}) {
|
||||
if (this.$stale.has(ticketId)) this.$stale.delete(ticketId);
|
||||
let ticket = await this.getTicket(ticketId);
|
||||
const getMessage = this.client.i18n.getLocale(ticket.guild.locale);
|
||||
this.$count.categories[ticket.categoryId].total -= 1;
|
||||
|
@ -186,7 +186,7 @@ module.exports = class extends Listener {
|
||||
// set inactive tickets as stale
|
||||
for (const guild of guilds) {
|
||||
for (const ticket of guild.tickets) {
|
||||
// if (ticket.lastMessageAt && ticket.lastMessageAt < Date.now() - guild.staleAfter)
|
||||
if (client.tickets.$stale.has(ticket.id)) continue;
|
||||
if (ticket.lastMessageAt && Date.now() - ticket.lastMessageAt > guild.staleAfter) {
|
||||
/** @type {import("discord.js").TextChannel} */
|
||||
const channel = client.channels.cache.get(ticket.id);
|
||||
|
Loading…
Reference in New Issue
Block a user