Fixed typos in comments

This commit is contained in:
DJj123dj
2025-02-18 18:18:10 +01:00
parent b12556120c
commit e6c413cdf5
3 changed files with 12 additions and 12 deletions
+1 -1
View File
@@ -459,7 +459,7 @@ const errorMessages = () => {
}) })
) )
//ERROR NOD IN GUILD //ERROR NOT IN GUILD
messages.add(new api.ODMessage("opendiscord:error-not-in-guild")) messages.add(new api.ODMessage("opendiscord:error-not-in-guild"))
messages.get("opendiscord:error-not-in-guild").workers.add( messages.get("opendiscord:error-not-in-guild").workers.add(
new api.ODWorker("opendiscord:error-not-in-guild",0,async (instance,params,source) => { new api.ODWorker("opendiscord:error-not-in-guild",0,async (instance,params,source) => {
+9 -9
View File
@@ -68,7 +68,7 @@ export class ODClientManager {
/**The main server of the bot. Provided by serverId in the config */ /**The main server of the bot. Provided by serverId in the config */
mainServer: discord.Guild|null = null mainServer: discord.Guild|null = null
/**(❌ DO NOD OVERWRITE ❌) Internal Open Ticket function to continue the startup when the client is ready! */ /**(❌ DO NOT OVERWRITE ❌) Internal Open Ticket function to continue the startup when the client is ready! */
readyListener: (() => Promise<void>)|null = null readyListener: (() => Promise<void>)|null = null
/**The status manager is responsible for setting the bot status. */ /**The status manager is responsible for setting the bot status. */
activity: ODClientActivityManager activity: ODClientActivityManager
@@ -1417,7 +1417,7 @@ export class ODTextCommandManager extends ODManager<ODTextCommand> {
tempContent = tempContent.substring(trueValue.length+1) tempContent = tempContent.substring(trueValue.length+1)
}else if (option.required){ }else if (option.required){
//REQUIRED => ERROR IF NOD EXISTING //REQUIRED => ERROR IF NOT EXISTING
const invalidregex = /^[^ ]+/ const invalidregex = /^[^ ]+/
const invalidRes = invalidregex.exec(tempContent) const invalidRes = invalidregex.exec(tempContent)
if (invalidRes) optionError("invalid_option",option,location,invalidRes[0],"boolean") if (invalidRes) optionError("invalid_option",option,location,invalidRes[0],"boolean")
@@ -1463,7 +1463,7 @@ export class ODTextCommandManager extends ODManager<ODTextCommand> {
}) })
} }
}else if (option.required){ }else if (option.required){
//REQUIRED => ERROR IF NOD EXISTING //REQUIRED => ERROR IF NOT EXISTING
const invalidRegex = /^[^ ]+/ const invalidRegex = /^[^ ]+/
const invalidRes = invalidRegex.exec(tempContent) const invalidRes = invalidRegex.exec(tempContent)
if (invalidRes) optionError("invalid_option",option,location,invalidRes[0],"number_invalid") if (invalidRes) optionError("invalid_option",option,location,invalidRes[0],"number_invalid")
@@ -1489,7 +1489,7 @@ export class ODTextCommandManager extends ODManager<ODTextCommand> {
optionError("invalid_option",option,location,value,"string_choice") optionError("invalid_option",option,location,value,"string_choice")
}else if (option.required && value === ""){ }else if (option.required && value === ""){
//REQUIRED => ERROR IF NOD EXISTING //REQUIRED => ERROR IF NOT EXISTING
optionError("missing_option",option,location) optionError("missing_option",option,location)
}else{ }else{
@@ -1529,7 +1529,7 @@ export class ODTextCommandManager extends ODManager<ODTextCommand> {
}) })
} }
}else if (option.required){ }else if (option.required){
//REQUIRED => ERROR IF NOD EXISTING //REQUIRED => ERROR IF NOT EXISTING
optionError("missing_option",option,location) optionError("missing_option",option,location)
} }
} }
@@ -1566,7 +1566,7 @@ export class ODTextCommandManager extends ODManager<ODTextCommand> {
} }
} }
}else if (option.required){ }else if (option.required){
//REQUIRED => ERROR IF NOD EXISTING //REQUIRED => ERROR IF NOT EXISTING
const invalidRegex = /^[^ ]+/ const invalidRegex = /^[^ ]+/
const invalidRes = invalidRegex.exec(tempContent) const invalidRes = invalidRegex.exec(tempContent)
if (invalidRes) optionError("invalid_option",option,location,invalidRes[0],"channel_not_found") if (invalidRes) optionError("invalid_option",option,location,invalidRes[0],"channel_not_found")
@@ -1601,7 +1601,7 @@ export class ODTextCommandManager extends ODManager<ODTextCommand> {
} }
} }
}else if (option.required){ }else if (option.required){
//REQUIRED => ERROR IF NOD EXISTING //REQUIRED => ERROR IF NOT EXISTING
const invalidRegex = /^[^ ]+/ const invalidRegex = /^[^ ]+/
const invalidRes = invalidRegex.exec(tempContent) const invalidRes = invalidRegex.exec(tempContent)
if (invalidRes) optionError("invalid_option",option,location,invalidRes[0],"role_not_found") if (invalidRes) optionError("invalid_option",option,location,invalidRes[0],"role_not_found")
@@ -1636,7 +1636,7 @@ export class ODTextCommandManager extends ODManager<ODTextCommand> {
} }
} }
}else if (option.required){ }else if (option.required){
//REQUIRED => ERROR IF NOD EXISTING //REQUIRED => ERROR IF NOT EXISTING
const invalidRegex = /^[^ ]+/ const invalidRegex = /^[^ ]+/
const invalidRes = invalidRegex.exec(tempContent) const invalidRes = invalidRegex.exec(tempContent)
if (invalidRes) optionError("invalid_option",option,location,invalidRes[0],"member_not_found") if (invalidRes) optionError("invalid_option",option,location,invalidRes[0],"member_not_found")
@@ -1667,7 +1667,7 @@ export class ODTextCommandManager extends ODManager<ODTextCommand> {
optionError("invalid_option",option,location,value,"user_not_found") optionError("invalid_option",option,location,value,"user_not_found")
} }
}else if (option.required){ }else if (option.required){
//REQUIRED => ERROR IF NOD EXISTING //REQUIRED => ERROR IF NOT EXISTING
const invalidRegex = /^[^ ]+/ const invalidRegex = /^[^ ]+/
const invalidRes = invalidRegex.exec(tempContent) const invalidRes = invalidRegex.exec(tempContent)
if (invalidRes) optionError("invalid_option",option,location,invalidRes[0],"user_not_found") if (invalidRes) optionError("invalid_option",option,location,invalidRes[0],"user_not_found")
+2 -2
View File
@@ -133,7 +133,7 @@ export class ODVersionMigration {
this.#func = func this.#func = func
this.#afterInitFunc = afterInitFunc this.#afterInitFunc = afterInitFunc
} }
/**Run this version migration as a plugin. Returns `false` when someting goes wrong. */ /**Run this version migration as a plugin. Returns `false` when something goes wrong. */
async migrate(): Promise<boolean> { async migrate(): Promise<boolean> {
try{ try{
await this.#func() await this.#func()
@@ -142,7 +142,7 @@ export class ODVersionMigration {
return false return false
} }
} }
/**Run this version migration as a plugin. Returns `false` when someting goes wrong. */ /**Run this version migration as a plugin (after other plugins have loaded). Returns `false` when something goes wrong. */
async migrateAfterInit(): Promise<boolean> { async migrateAfterInit(): Promise<boolean> {
try{ try{
await this.#afterInitFunc() await this.#afterInitFunc()