v3.5.4 push 2
This commit is contained in:
@@ -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!!
|
||||
|
||||
Reference in New Issue
Block a user