Updated german & fixed async forEach errors
This commit is contained in:
@@ -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)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user