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
@@ -496,7 +496,7 @@ export class ODSlashCommandManager extends ODManager<ODSlashCommand> {
const existing: {cmd:ODSlashCommand, requiresUpdate:boolean}[] = []
const nonExisting: ODSlashCommand[] = []
this.forEach((cmd) => {
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.forEach((cmd) => {
this.loopAll((cmd) => {
if (msg.content.startsWith(cmd.builder.prefix)) validPrefixCommands.push({
cmd:cmd,
newContent:msg.content.substring(cmd.builder.prefix.length)