(v4.2) Open Discord Framework Update (Part 1)
This commit is contained in:
@@ -231,12 +231,12 @@ export const defaultGeneralStructure = new api.ODCheckerObjectStructure("opendis
|
||||
const lt = checker.locationTraceDeref(locationTrace)
|
||||
|
||||
if (typeof value != "string") return false
|
||||
else if (!opendiscord.defaults.getDefault("languageList").includes(value)){
|
||||
else if (!opendiscord.sharedFuses.getFuse("languageList").includes(value)){
|
||||
checker.createMessage("opendiscord:invalid-language","error","This is an invalid language!",lt,null,[],locationId,locationDocs)
|
||||
return false
|
||||
}else return true
|
||||
},
|
||||
cliAutocompleteList:opendiscord.defaults.getDefault("languageList"),
|
||||
cliAutocompleteList:opendiscord.sharedFuses.getFuse("languageList"),
|
||||
cliDisplayName:"Language",
|
||||
cliDisplayDescription:"The language of the bot. Visit README.md for a list of available translations."
|
||||
})},
|
||||
|
||||
@@ -407,10 +407,10 @@ const loadAutoCode = () => {
|
||||
}
|
||||
}
|
||||
opendiscord.debug.debug("Finished autoclose timeout cycle!",[
|
||||
{key:"interval",value:opendiscord.defaults.getDefault("autocloseCheckInterval").toString()},
|
||||
{key:"interval",value:opendiscord.fuses.getFuse("autocloseCheckInterval").toString()},
|
||||
{key:"closed",value:count.toString()}
|
||||
])
|
||||
},opendiscord.defaults.getDefault("autocloseCheckInterval"))
|
||||
},opendiscord.fuses.getFuse("autocloseCheckInterval"))
|
||||
}))
|
||||
|
||||
//AUTOCLOSE LEAVE
|
||||
@@ -462,10 +462,10 @@ const loadAutoCode = () => {
|
||||
}
|
||||
}
|
||||
opendiscord.debug.debug("Finished autodelete timeout cycle!",[
|
||||
{key:"interval",value:opendiscord.defaults.getDefault("autodeleteCheckInterval").toString()},
|
||||
{key:"interval",value:opendiscord.fuses.getFuse("autodeleteCheckInterval").toString()},
|
||||
{key:"deleted",value:count.toString()}
|
||||
])
|
||||
},opendiscord.defaults.getDefault("autodeleteCheckInterval"))
|
||||
},opendiscord.fuses.getFuse("autodeleteCheckInterval"))
|
||||
}))
|
||||
|
||||
//AUTODELETE LEAVE
|
||||
|
||||
@@ -2,5 +2,5 @@ import {opendiscord, api, utilities} from "../../index"
|
||||
|
||||
export const loadAllLiveStatusSources = async () => {
|
||||
//DEFAULT DJDJ DEV
|
||||
opendiscord.livestatus.add(new api.ODLiveStatusUrlSource("opendiscord:default-djdj-dev","https://raw.githubusercontent.com/open-discord-bots/open-ticket/refs/heads/dev/src/livestatus.json"))
|
||||
opendiscord.livestatus.add(new api.ODLiveStatusUrlSource(opendiscord,"opendiscord:default-djdj-dev","https://raw.githubusercontent.com/open-discord-bots/open-ticket/refs/heads/dev/src/livestatus.json"))
|
||||
}
|
||||
@@ -49,7 +49,7 @@ function transcriptAuth(_A:{salt:number,secret:string}){
|
||||
export const loadAllTranscriptCompilers = async () => {
|
||||
class ODHTTPHtmlPostRequest extends api.ODHTTPPostRequest {
|
||||
constructor(transcriptAuth:string,htmlFinal:api.ODTranscriptHtmlV2Data){
|
||||
super("https://"+htmlDomain+"/api/v2/upload?auth="+htmlVersion+"&token="+transcriptAuth,true,{
|
||||
super(opendiscord,"https://"+htmlDomain+"/api/v2/upload?auth="+htmlVersion+"&token="+transcriptAuth,true,{
|
||||
body:JSON.stringify(htmlFinal),
|
||||
headers:{
|
||||
"Content-Type":"application/json"
|
||||
@@ -178,7 +178,7 @@ export const loadAllTranscriptCompilers = async () => {
|
||||
//HTML COMPILER
|
||||
opendiscord.transcripts.add(new api.ODTranscriptCompiler<{url:string,availableUntil:Date},{auth:string}|null>("opendiscord:html-compiler",async (ticket,channel,user) => {
|
||||
//INIT
|
||||
const req = new api.ODHTTPGetRequest(atob("aHR0cHM6Ly90LmRqLWRqLmJlL2FwaS92Mi9pbml0"),false)
|
||||
const req = new api.ODHTTPGetRequest(opendiscord,atob("aHR0cHM6Ly90LmRqLWRqLmJlL2FwaS92Mi9pbml0"),false)
|
||||
const res = await req.run()
|
||||
//PENDING MESSAGE (not required anymore) => await messages.getSafe("opendiscord:transcript-html-progress").build("channel",{guild:channel.guild,channel,user,ticket,compiler:opendiscord.transcripts.get("opendiscord:html-compiler"),remaining:16000})
|
||||
if (res.status == 200 && res.body){
|
||||
|
||||
Reference in New Issue
Block a user