v3.5.4 push 2

This commit is contained in:
DJj123dj
2024-04-04 14:06:48 +02:00
parent 5dfbce1856
commit e80ce1a64a
19 changed files with 299 additions and 146 deletions
+21 -3
View File
@@ -88,13 +88,13 @@ module.exports = async (messages,guild,channel,user,reason) => {
},
bot:{
name:client.user.username,
name:client.user.displayName,
id:client.user.id,
pfp:client.user.displayAvatarURL(),
},
ticket:{
creatorid:ticketopener.id,
creatorname:ticketopener.username,
creatorname:ticketopener.displayName,
creatorpfp:ticketopener.displayAvatarURL(),
openedtime:opentime.getTime(),
@@ -123,7 +123,25 @@ module.exports = async (messages,guild,channel,user,reason) => {
}
const TSdata = await require("./communication/index").upload(JSONDATA)
if (!TSdata) return false
if (!TSdata){
const attachment = await require("./oldTranscript").createTranscript(messages,channel)
const errembed = tsembeds.tserror(chName,chId,user,"`HTML Transcript API: reached ratelimit`")
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]})
}
if (tsconfig.sendTranscripts.enableDM && user){
const embed = tsembeds.tsready(chName,null,user,ticketopener)
try {
ticketopener.send({embeds:[embed],files:[attachment]})
}catch{}
}
return false
}
if (TSdata.status == "success"){
//MAKE THIS COMPATIBLE WITH PREMIUM "customTranscriptUrl" IN FUTURE VERSIONS!!