v3.2 last push

This commit is contained in:
DJj123dj
2023-01-18 21:44:56 +01:00
parent b698c89a89
commit 1b8468330e
16 changed files with 306 additions and 62 deletions
+13 -1
View File
@@ -70,7 +70,7 @@ module.exports = async (messages,guild,channel,user,reason) => {
})
if (!await checkAvailability()){
const attachment = await require("./oldTranscript").createTranscript(messages,ch)
const attachment = await require("./oldTranscript").createTranscript(messages,channel)
const errembed = tsembeds.tserror(chName,chId,user)
if (tsconfig.sendTranscripts.enableChannel){
@@ -85,6 +85,7 @@ module.exports = async (messages,guild,channel,user,reason) => {
const TSdata = await require("./communication/index").upload(JSONDATA)
if (!TSdata) return false
if (TSdata.status == "success"){
const url = "https://transcripts.dj-dj.be/t/"+TSdata.time+"_"+TSdata.id+".html"
@@ -121,6 +122,17 @@ module.exports = async (messages,guild,channel,user,reason) => {
}catch{}
}
},duration)
}else{
const attachment = await require("./oldTranscript").createTranscript(messages,channel)
const errembed = tsembeds.tserror(chName,chId,user,"`error type: transcript API error`")
if (tsconfig.sendTranscripts.enableChannel){
/**@type {discord.TextChannel|undefined} */
const tc = guild.channels.cache.find((c) => c.id == tsconfig.sendTranscripts.channel)
if (!tc) return
tc.send({embeds:[errembed],files:[attachment]})
}
}
}
asyncmanager(msglist)