Updated german & fixed async forEach errors
This commit is contained in:
+12
-12
@@ -2,7 +2,7 @@
|
||||
"_TRANSLATION":{
|
||||
"otversion":"v4.0.0",
|
||||
"translators":["benzorich"],
|
||||
"lastedited":"22/08/2024",
|
||||
"lastedited":"06/10/2024",
|
||||
"language":"German",
|
||||
"automated":false
|
||||
},
|
||||
@@ -10,7 +10,7 @@
|
||||
"system":{
|
||||
"typeError":"[ERROR]",
|
||||
"headerOpenTicket":"OPEN TICKET",
|
||||
"typeWarning":"[WARNING]",
|
||||
"typeWarning":"[WARNUNG]",
|
||||
"typeInfo":"[INFO]",
|
||||
"headerConfigChecker":"CONFIG CHECKER",
|
||||
"headerDescription":"Prüfen Sie auf Fehler in Ihrer Konfigurationsdateien!",
|
||||
@@ -99,9 +99,9 @@
|
||||
"delete":"Ticket löschen",
|
||||
"reopen":"Ticket wieder öffnen",
|
||||
"claim":"Ticket beanspruchen",
|
||||
"unclaim":"Ticket nicht mehr beansprucht",
|
||||
"pin":"Pin Ticket",
|
||||
"unpin":"Unpin Ticket",
|
||||
"unclaim":"Ticket nicht mehr beanspruchen",
|
||||
"pin":"Ticket anpinnen",
|
||||
"unpin":"Ticket abpinnen",
|
||||
"clear":"Tickets löschen",
|
||||
"helpSwitchSlash":"Slash-Befehle anzeigen",
|
||||
"helpSwitchText":"Textbefehle anzeigen",
|
||||
@@ -135,10 +135,10 @@
|
||||
"roles":"Aktualisierte Rollen",
|
||||
|
||||
"autoclose":"Ticket automatisch geschlossen",
|
||||
"autocloseEnabled":"Autoclose Aktiviert",
|
||||
"autocloseDisabled":"Autoclose Deaktiviert",
|
||||
"autodelete":"Automatisch gelöschtes Ticket",
|
||||
"autodeleteEnabled":"Autolöschen Aktiviert",
|
||||
"autocloseEnabled":"Automatisches schließen Aktiviert",
|
||||
"autocloseDisabled":"Automatisches schließen Deaktiviert",
|
||||
"autodelete":"Ticket automatisch gelöscht",
|
||||
"autodeleteEnabled":"Automatisches Löschen Aktiviert",
|
||||
"autodeleteDisabled":"Automatisches Löschen Deaktiviert"
|
||||
},
|
||||
"descriptions":{
|
||||
@@ -270,7 +270,7 @@
|
||||
"noPermissions":"Sie sind nicht berechtigt, {0} zu verwenden!",
|
||||
"noPermissionsList":"Erforderliche Berechtigungen: (eine von diesen)",
|
||||
"noPermissionsCooldown":"Du bist nicht berechtigt, {0} zu benutzen, weil du eine Abklingzeit hast!",
|
||||
"noPermissionsBlacklist":"Sie sind nicht berechtigt, {0} zu benutzen, da Sie auf der Blacklist stehen!",
|
||||
"noPermissionsBlacklist":"Sie sind nicht berechtigt, den {0} zu benutzen, da Sie auf der Blacklist stehen!",
|
||||
"noPermissionsLimitGlobal":"Sie können kein Ticket erstellen, da der Server die maximale Ticketanzahl erreicht hat!",
|
||||
"noPermissionsLimitGlobalUser":"Sie können kein Ticket erstellen, weil Sie die maximale Anzahl an Tickets erreicht haben!",
|
||||
"noPermissionsLimitOption":"Sie können kein Ticket erstellen, da der Server die maximale Ticketanzahl für diese Option erreicht hat!",
|
||||
@@ -382,8 +382,8 @@
|
||||
"claim":"Ein Ticket beanspruchen.",
|
||||
"claimUser":"Beanspruchen Sie dieses Ticket für jemand anderen statt für sich selbst.",
|
||||
"unclaim":"Beanspruchen Sie ein Ticket zurück.",
|
||||
"pin":"Ein Ticket anpinnen..",
|
||||
"unpin":"Löse die Anpinnung eines Tickets.",
|
||||
"pin":"Pinne ein Ticket an.",
|
||||
"unpin":"Pinne ein Ticket ab.",
|
||||
"move":"Verschieben Sie ein Ticket.",
|
||||
"moveId":"Die Kennung der Option.",
|
||||
"rename":"Ein Ticket umbenennen.",
|
||||
|
||||
@@ -882,7 +882,7 @@ const blacklistEmbeds = () => {
|
||||
const {user} = params
|
||||
|
||||
const renderedUsers: string[] = []
|
||||
openticket.blacklist.loopAll((blacklist,id) => {renderedUsers.push(discord.userMention(id.value)+" - "+(blacklist.reason ? blacklist.reason : "/"))})
|
||||
await openticket.blacklist.loopAll((blacklist,id) => {renderedUsers.push(discord.userMention(id.value)+" - "+(blacklist.reason ? blacklist.reason : "/"))})
|
||||
|
||||
instance.setAuthor(user.displayName,user.displayAvatarURL())
|
||||
instance.setColor(generalConfig.data.mainColor)
|
||||
|
||||
@@ -65,7 +65,7 @@ export class ODCheckerManager extends ODManager<ODChecker> {
|
||||
if (!res.valid) isValid = false
|
||||
})
|
||||
|
||||
this.functions.loopAll((func) => {
|
||||
this.functions.getAll().forEach((func) => {
|
||||
const res = func.func(this,this.functions)
|
||||
final.push(...res.messages)
|
||||
|
||||
|
||||
@@ -496,7 +496,7 @@ export class ODSlashCommandManager extends ODManager<ODSlashCommand> {
|
||||
const existing: {cmd:ODSlashCommand, requiresUpdate:boolean}[] = []
|
||||
const nonExisting: ODSlashCommand[] = []
|
||||
|
||||
this.loopAll((cmd) => {
|
||||
await this.loopAll((cmd) => {
|
||||
if (guildId && cmd.guildId != guildId) return
|
||||
const result = cmds.find((cmddata) => cmddata.name == cmd.name)
|
||||
if (result){
|
||||
@@ -977,7 +977,7 @@ export class ODTextCommandManager extends ODManager<ODTextCommand> {
|
||||
|
||||
//filter commands for correct prefix
|
||||
const validPrefixCommands: {cmd:ODTextCommand,newContent:string}[] = []
|
||||
this.loopAll((cmd) => {
|
||||
await this.loopAll((cmd) => {
|
||||
if (msg.content.startsWith(cmd.builder.prefix)) validPrefixCommands.push({
|
||||
cmd:cmd,
|
||||
newContent:msg.content.substring(cmd.builder.prefix.length)
|
||||
@@ -1403,7 +1403,7 @@ export class ODTextCommandManager extends ODManager<ODTextCommand> {
|
||||
}
|
||||
}
|
||||
}else if (option.required){
|
||||
//REQUIRED => ERROR IF NOD EXISTING
|
||||
//REQUIRED => ERROR IF NOT EXISTING
|
||||
const invalidRegex = /^[^ ]+/
|
||||
const invalidRes = invalidRegex.exec(tempContent)
|
||||
if (invalidRes) optionError("invalid_option",option,location,invalidRes[0],"mentionable_not_found")
|
||||
|
||||
@@ -138,8 +138,8 @@ export class ODCounterCooldown extends ODCooldown<{value:number}> {
|
||||
}
|
||||
async init(){
|
||||
if (this.ready) return
|
||||
setInterval(() => {
|
||||
this.data.loopAll((cooldown) => {
|
||||
setInterval(async () => {
|
||||
await this.data.loopAll((cooldown) => {
|
||||
cooldown.data.value = cooldown.data.value - this.decrement
|
||||
if (cooldown.data.value <= this.cancelLimit){
|
||||
cooldown.active = false
|
||||
@@ -216,8 +216,8 @@ export class ODIncrementalCounterCooldown extends ODCooldown<{value:number}> {
|
||||
}
|
||||
async init(){
|
||||
if (this.ready) return
|
||||
setInterval(() => {
|
||||
this.data.loopAll((cooldown) => {
|
||||
setInterval(async () => {
|
||||
await this.data.loopAll((cooldown) => {
|
||||
cooldown.data.value = cooldown.data.value - this.decrement
|
||||
if (cooldown.data.value <= this.cancelLimit){
|
||||
cooldown.active = false
|
||||
|
||||
@@ -65,8 +65,8 @@ export class ODFlagManager extends ODManager<ODFlag> {
|
||||
}
|
||||
|
||||
/**Set all flags to their `process.argv` value. */
|
||||
init(){
|
||||
this.loopAll((flag) => {
|
||||
async init(){
|
||||
await this.loopAll((flag) => {
|
||||
flag.detectProcessParams(false)
|
||||
})
|
||||
}
|
||||
|
||||
@@ -42,9 +42,9 @@ const preloadMigrationContext = async () => {
|
||||
|
||||
const unloadMigrationContext = async () => {
|
||||
openticket.debug.visible = false
|
||||
openticket.databases.loopAll((database,id) => {openticket.databases.remove(id)})
|
||||
openticket.configs.loopAll((config,id) => {openticket.configs.remove(id)})
|
||||
openticket.flags.loopAll((flag,id) => {openticket.flags.remove(id)})
|
||||
await openticket.databases.loopAll((database,id) => {openticket.databases.remove(id)})
|
||||
await openticket.configs.loopAll((config,id) => {openticket.configs.remove(id)})
|
||||
await openticket.flags.loopAll((flag,id) => {openticket.flags.remove(id)})
|
||||
openticket.debug.debug("-- MIGRATION CONTEXT END --")
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ const loadAllVersionMigrations = async (lastVersion:api.ODVersion) => {
|
||||
const saveAllVersionsToDatabase = async () => {
|
||||
const globalDatabase = openticket.databases.get("openticket:global")
|
||||
|
||||
openticket.versions.loopAll((version,id) => {
|
||||
await openticket.versions.loopAll((version,id) => {
|
||||
globalDatabase.set("openticket:last-version",id.value,version.toString())
|
||||
})
|
||||
}
|
||||
@@ -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,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)
|
||||
})
|
||||
|
||||
@@ -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,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))
|
||||
}
|
||||
|
||||
+1
-1
@@ -103,7 +103,7 @@ const main = async () => {
|
||||
//initiate flags
|
||||
await openticket.events.get("onFlagInit").emit([openticket.flags])
|
||||
if (openticket.defaults.getDefault("flagInitiating")){
|
||||
openticket.flags.init()
|
||||
await openticket.flags.init()
|
||||
openticket.debugfile.writeText("\n[ENABLED FLAGS]:\n"+openticket.flags.getFiltered((flag) => (flag.value == true)).map((flag) => flag.id.value).join("\n")+"\n")
|
||||
await openticket.events.get("afterFlagsInitiated").emit([openticket.flags])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user