Updated german & fixed async forEach errors

This commit is contained in:
DJj123dj
2024-10-07 22:24:02 +02:00
parent 4e10cba203
commit 330ea47ab9
12 changed files with 37 additions and 37 deletions
+6 -6
View File
@@ -135,9 +135,9 @@ export const loadDatabaseCleanersCode = async () => {
//OPTION DATABASE CLEANER
openticket.code.add(new api.ODCode("openticket:option-database-cleaner",10,() => {
//delete all unused options
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)
openticket.options.getAll().forEach((option) => {
if (optionDatabase.exists("openticket:used-option",option.id.value) && !openticket.tickets.getAll().some((ticket) => ticket.option.id.value == option.id.value)){
optionDatabase.delete("openticket:used-option",option.id.value)
}
})
}))
@@ -331,9 +331,9 @@ export const loadDatabaseSaversCode = async () => {
}
//delete all unused options on ticket move
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)
openticket.options.getAll().forEach((option) => {
if (optionDatabase.exists("openticket:used-option",option.id.value) && !openticket.tickets.getAll().some((ticket) => ticket.option.id.value == option.id.value)){
optionDatabase.delete("openticket:used-option",option.id.value)
}
})
})
+1 -1
View File
@@ -1,7 +1,7 @@
import {openticket, api, utilities} from "../../index"
export const loadAllCooldowns = async () => {
openticket.options.loopAll((option) => {
await 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.loopAll(async (ticket) => {
await openticket.tickets.loopAll(async (ticket) => {
try {
const channel = await openticket.client.fetchGuildTextChannel(mainServer,ticket.id.value)
if (!channel) return
+1 -1
View File
@@ -1,7 +1,7 @@
import {openticket, api, utilities} from "../../index"
export const loadAllRoles = async () => {
openticket.options.loopAll((opt) => {
await openticket.options.loopAll((opt) => {
if (opt instanceof api.ODRoleOption){
openticket.roles.add(loadRole(opt))
}