Added extra comments in some places
This commit is contained in:
@@ -484,7 +484,7 @@ const loadAutoCode = () => {
|
|||||||
})
|
})
|
||||||
}))
|
}))
|
||||||
|
|
||||||
//TICKET ANTI BUSY
|
//TICKET ANTI BUSY (+ sync version of tickets with latest OT version in database)
|
||||||
opendiscord.code.add(new api.ODCode("opendiscord:ticket-anti-busy",-1,() => {
|
opendiscord.code.add(new api.ODCode("opendiscord:ticket-anti-busy",-1,() => {
|
||||||
for (const ticket of opendiscord.tickets.getAll()){
|
for (const ticket of opendiscord.tickets.getAll()){
|
||||||
//free tickets from corruption due to opendiscord:busy variable
|
//free tickets from corruption due to opendiscord:busy variable
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ export const loadTicket = async (ticket:api.ODTicketJson) => {
|
|||||||
//check if option is of type "ticket"
|
//check if option is of type "ticket"
|
||||||
if (configOption && !(configOption instanceof api.ODTicketOption)) throw new api.ODSystemError("Unable to load ticket because option is not of 'ticket' type!")
|
if (configOption && !(configOption instanceof api.ODTicketOption)) throw new api.ODSystemError("Unable to load ticket because option is not of 'ticket' type!")
|
||||||
|
|
||||||
//manage backup option
|
//manage backup option (+ sync version of options with latest OT version in database)
|
||||||
if (configOption) await optionDatabase.set("opendiscord:used-option",configOption.id.value,configOption.toJson(opendiscord.versions.get("opendiscord:version")))
|
if (configOption) await optionDatabase.set("opendiscord:used-option",configOption.id.value,configOption.toJson(opendiscord.versions.get("opendiscord:version")))
|
||||||
else if (backupOption) opendiscord.options.add(backupOption)
|
else if (backupOption) opendiscord.options.add(backupOption)
|
||||||
else throw new api.ODSystemError("Unable to use backup option! Normal option not found in config!")
|
else throw new api.ODSystemError("Unable to use backup option! Normal option not found in config!")
|
||||||
|
|||||||
Reference in New Issue
Block a user