Fixed loopAll() async errors

This commit is contained in:
DJj123dj
2024-10-03 20:46:01 +02:00
parent 7c76be8473
commit 56e1fb3939
14 changed files with 24 additions and 24 deletions
+2 -2
View File
@@ -135,7 +135,7 @@ export const loadDatabaseCleanersCode = async () => {
//OPTION DATABASE CLEANER
openticket.code.add(new api.ODCode("openticket:option-database-cleaner",10,() => {
//delete all unused options
openticket.options.forEach((option,id) => {
openticket.options.loopAll((option,id) => {
if (optionDatabase.exists("openticket:used-option",id.value) && !openticket.tickets.getAll().some((ticket) => ticket.id.value == id.value)){
optionDatabase.delete("openticket:used-option",id.value)
}
@@ -331,7 +331,7 @@ export const loadDatabaseSaversCode = async () => {
}
//delete all unused options on ticket move
openticket.options.forEach((option,id) => {
openticket.options.loopAll((option,id) => {
if (optionDatabase.exists("openticket:used-option",id.value) && !openticket.tickets.getAll().some((ticket) => ticket.id.value == id.value)){
optionDatabase.delete("openticket:used-option",id.value)
}
+1 -1
View File
@@ -1,7 +1,7 @@
import {openticket, api, utilities} from "../../index"
export const loadAllCooldowns = async () => {
openticket.options.forEach((option) => {
openticket.options.loopAll((option) => {
if (!(option instanceof api.ODTicketOption)) return
loadTicketOptionCooldown(option)
})
+1 -1
View File
@@ -30,7 +30,7 @@ export const loadAllPermissions = async () => {
})
//TICKET ADMINS
openticket.tickets.forEach(async (ticket) => {
openticket.tickets.loopAll(async (ticket) => {
try {
const channel = await openticket.client.fetchGuildTextChannel(mainServer,ticket.id.value)
if (!channel) return