v3.4.0 push 2 (html transcripts v2)
This commit is contained in:
@@ -60,6 +60,7 @@ Translators
|
|||||||
|Turkish |Hydrâelčhâvø#1575 |
|
|Turkish |Hydrâelčhâvø#1575 |
|
||||||
|Polish |MKevas#8311 |
|
|Polish |MKevas#8311 |
|
||||||
|Slovenian |n1kkec#5341 |
|
|Slovenian |n1kkec#5341 |
|
||||||
|
|Thai |Mods HD#0661 |
|
||||||
|
|
||||||
## links
|
## links
|
||||||
current version: _v3.4.0_
|
current version: _v3.4.0_
|
||||||
|
|||||||
+1
-1
@@ -427,7 +427,7 @@ exports.checker = async () => {
|
|||||||
checkType(config.languageFile,"string","languagefile")
|
checkType(config.languageFile,"string","languagefile")
|
||||||
const lf = config.languageFile
|
const lf = config.languageFile
|
||||||
|
|
||||||
if (!lf.startsWith("custom") && !lf.startsWith("english") && !lf.startsWith("dutch") && !lf.startsWith("romanian") && !lf.startsWith("german") && !lf.startsWith("arabic") && !lf.startsWith("spanish") && !lf.startsWith("portuguese") && !lf.startsWith("french") && !lf.startsWith("italian") && !lf.startsWith("czech") && !lf.startsWith("danish") && !lf.startsWith("russian") && !lf.startsWith("turkish") && !lf.startsWith("polish") && !lf.startsWith("slovenian")){
|
if (!lf.startsWith("custom") && !lf.startsWith("english") && !lf.startsWith("dutch") && !lf.startsWith("romanian") && !lf.startsWith("german") && !lf.startsWith("arabic") && !lf.startsWith("spanish") && !lf.startsWith("portuguese") && !lf.startsWith("french") && !lf.startsWith("italian") && !lf.startsWith("czech") && !lf.startsWith("danish") && !lf.startsWith("russian") && !lf.startsWith("turkish") && !lf.startsWith("polish") && !lf.startsWith("slovenian") && !lf.startsWith("thai")){
|
||||||
createError("'languagefile' | invalid language, more info in the wiki")
|
createError("'languagefile' | invalid language, more info in the wiki")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,394 @@
|
|||||||
|
const discord = require('discord.js')
|
||||||
|
|
||||||
|
const bot = require("../../../index")
|
||||||
|
const tsconfig = bot.tsconfig
|
||||||
|
const tsembeds = require("../embeds")
|
||||||
|
const tsdb = require("../tsdb")
|
||||||
|
|
||||||
|
const otversion = require("../../../package.json").version
|
||||||
|
const version = require("../info.json").version
|
||||||
|
|
||||||
|
const mentions = require("./mentions").replacementions
|
||||||
|
|
||||||
|
/**@typedef {{background:{enableCustomBackground:Boolean, backgroundModus:"color"|"image", backgroundData:String}, header:{enableCustomHeader:Boolean, decoColor:String, backgroundColor:String, textColor:String}, stats:{enableCustomStats:Boolean, backgroundColor:String, keyTextColor:String, valueTextColor:String, hideBackgroundColor:String, hideTextColor:String}} OTTranscriptStyle} */
|
||||||
|
/**@typedef {{name:String, id:String, pfp:String}} OTTranscriptBot */
|
||||||
|
/**@typedef {{name:String, id:String, guildname:String, guildid:String, guildinvite:String|false, creatorname:String, creatorid:String, closedbyname:String, closedbyid:String, claimedname:String, claimedid:String, creatorpfp:String, closedbypfp:String, claimedpfp:String, closedtime:Number, openedtime:Number, components:{messages:1, files:1, embeds:1, reactions:1, interactions:{dropdowns:1, buttons:1, total:1}, attachments:{invites:1, images:1, gifs:1, stickers:1}}, roleColors:[{id:String,color:String}] }} OTTranscriptTicket */
|
||||||
|
/**@typedef {{author:{name:String, id:String, color:String, pfp:String, bot:Boolean, verifiedBot:Boolean, system:Boolean}, content:String|false, timestamp:Number, type:"normal", important:Boolean, edited:Boolean, embeds:[{title:String|false, description:String|false, authorimg:String|false, authortext:String|false, footerimg:String|false, footertext:String|false, color:String, image:String|false, thumbnail:String|false, url:String|false, fields:[{name:String,value:String,inline:Boolean}]}], attachments:[{type:"FILE", name:String, fileType:String, size:String, url:String}, {type:"FILE:image", name:String, fileType:String, size:String, url:String}, {type:"URL:invite", guildId:String, guildName:String, guildSize:Number, guildOnline:Number, image:String, url:String}, {type:"URL:gif", url:String}, {type:"BUILDIN:sticker", name:String, url:String}], components:[{type:"buttons", buttons:[{type:"interaction"|"url", label:String|false, icon:String|false, color:"gray"|"green"|"red"|"blue", id:String|false, url:String|false, disabled:Boolean}]}, {type:"dropdown", placeholder:String|false, options:[{label:String|false, icon:String|false, description:String|false, id:String|false}]}, {type:"reactions", reactions:[{amount:1, emoji:String, type:"svg"|"image"|"gif"}]}], reply:{type:"reply"|"command"|false, user:{name:String, id:String, color:String, pfp:String, bot:Boolean, verifiedBot:Boolean, system:Boolean}, replyOptions:{content:String, messageId:String, channelId:String, guildId:String}, commandOptions:{interactionName:String, interactionId:String}}}} OTTranscriptMessage */
|
||||||
|
/**@typedef {{enabled:Boolean,premiumToken:String, customCredits:{enable:Boolean, replaceText:String, replaceURL:String, enableReportBug:Boolean},customHeaderUrl:{enabled:Boolean, url:String, text:String}, customTranscriptUrl:{enabled:Boolean, name:String}, customFavicon:{enabled:Boolean, image:String},additionalFlags:String[]}} OTTranscriptPremium */
|
||||||
|
|
||||||
|
/**@typedef {{version:"2", otversion:String, language:String, style:OTTranscriptStyle, bot:OTTranscriptBot, ticket:OTTranscriptTicket, messages:OTTranscriptMessage[], premium:OTTranscriptPremium}} OTTranscriptCompileInput */
|
||||||
|
|
||||||
|
/**@typedef {{style:OTTranscriptStyle,bot:OTTranscriptBot,ticket:OTTranscriptTicket,premium:OTTranscriptPremium}} OTHTMLDataOption */
|
||||||
|
|
||||||
|
|
||||||
|
/**@param {discord.ButtonStyle} buttonstyle */
|
||||||
|
const buttonStyleToColor = (buttonstyle) => {
|
||||||
|
if (buttonstyle == discord.ButtonStyle.Primary){
|
||||||
|
return "blue"
|
||||||
|
}else if (buttonstyle == discord.ButtonStyle.Secondary){
|
||||||
|
return "gray"
|
||||||
|
}else if (buttonstyle == discord.ButtonStyle.Danger){
|
||||||
|
return "red"
|
||||||
|
}else if (buttonstyle == discord.ButtonStyle.Success){
|
||||||
|
return "green"
|
||||||
|
}else{
|
||||||
|
return "gray"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {discord.Guild} guild
|
||||||
|
* @param {discord.Channel} channel
|
||||||
|
* @param {discord.User} user
|
||||||
|
* @param {discord.Message[]} messagesInv
|
||||||
|
* @param {OTHTMLDataOption} data
|
||||||
|
*/
|
||||||
|
exports.compile = (guild,channel,user,messagesInv,data) => {
|
||||||
|
const messages = messagesInv.reverse()
|
||||||
|
var invisibleMessages = 0
|
||||||
|
|
||||||
|
//MESSAGE STATS COUNTS
|
||||||
|
var messageAmount = messages.length
|
||||||
|
var fileAmount = 0
|
||||||
|
var embedAmount = 0
|
||||||
|
var reactionsAmount = 0
|
||||||
|
var interactionAmount = 0
|
||||||
|
messages.forEach((msg) => {
|
||||||
|
fileAmount = fileAmount + Array.from(msg.attachments).length
|
||||||
|
embedAmount = embedAmount + msg.embeds.length
|
||||||
|
|
||||||
|
msg.reactions.cache.forEach(reaction => {
|
||||||
|
reactionsAmount = reactionsAmount + reaction.count
|
||||||
|
})
|
||||||
|
if (msg.components && msg.components.length > 0){
|
||||||
|
msg.components.forEach((component) => {
|
||||||
|
if (component.components.length > 0){
|
||||||
|
interactionAmount = interactionAmount + component.components.length
|
||||||
|
}else{
|
||||||
|
interactionAmount = interactionAmount+1
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
/**@type {OTTranscriptMessage[]} */
|
||||||
|
const messagesArray = []
|
||||||
|
messages.forEach((msg) => {
|
||||||
|
if (msg.content || msg.embeds.length > 0 || msg.attachments.toJSON().length > 0 || msg.components.length > 0 || msg.reactions.cache.size > 0){
|
||||||
|
|
||||||
|
const embedArray = []
|
||||||
|
const attachmentArray = []
|
||||||
|
const componentsArray = []
|
||||||
|
|
||||||
|
msg.attachments.forEach((file) => {
|
||||||
|
attachmentArray.push({
|
||||||
|
type:"FILE",
|
||||||
|
name:file.name,
|
||||||
|
fileType:file.contentType,
|
||||||
|
size:Math.round(file.size/1000)+" kb",
|
||||||
|
url:file.url
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
msg.embeds.forEach((embed) => {
|
||||||
|
embedArray.push({
|
||||||
|
title:embed.title || false,
|
||||||
|
description:embed.description ? mentions(embed.description,guild) : false,
|
||||||
|
authorimg:((embed.author && embed.author.iconURL) ? embed.author.iconURL : false),
|
||||||
|
authortext:(embed.author ? embed.author.name : false),
|
||||||
|
footerimg:((embed.footer && embed.footer.iconURL) ? embed.footer.iconURL : false),
|
||||||
|
footertext:(embed.footer ? embed.footer.text : false),
|
||||||
|
color:embed.hexColor,
|
||||||
|
image:((embed.image && embed.image.url) ? embed.image.url : false),
|
||||||
|
thumbnail:((embed.thumbnail && embed.thumbnail.url) ? embed.thumbnail.url : false),
|
||||||
|
url:(embed.url ? embed.url : false),
|
||||||
|
fields:embed.fields
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
const tempreactions = []
|
||||||
|
msg.reactions.cache.forEach((reaction) => {
|
||||||
|
const count = reaction.count
|
||||||
|
const emoji = reaction.emoji
|
||||||
|
|
||||||
|
if (emoji instanceof discord.GuildEmoji){
|
||||||
|
//custom emoji
|
||||||
|
tempreactions.push({
|
||||||
|
amount:count,
|
||||||
|
emoji:(emoji.url) ? emoji.url : "",
|
||||||
|
type:(emoji.animated) ? "gif" : "image"
|
||||||
|
})
|
||||||
|
}else if (emoji instanceof discord.ReactionEmoji){
|
||||||
|
//build-in emoji
|
||||||
|
tempreactions.push({
|
||||||
|
amount:count,
|
||||||
|
emoji:emoji.name,
|
||||||
|
type:"svg"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
componentsArray.push({
|
||||||
|
type: "reactions",
|
||||||
|
reactions:tempreactions
|
||||||
|
})
|
||||||
|
|
||||||
|
msg.components.forEach((actionrow) => {
|
||||||
|
var isdropdown = false
|
||||||
|
var actioncomponents = []
|
||||||
|
actionrow.components.forEach((comp) => {
|
||||||
|
if (comp.type == discord.ComponentType.ActionRow || comp.type == discord.ComponentType.TextInput) return
|
||||||
|
|
||||||
|
/**
|
||||||
|
* type: "buttons";
|
||||||
|
buttons: [{
|
||||||
|
type: "interaction" | "url";
|
||||||
|
label: string | false;
|
||||||
|
icon: string | false;
|
||||||
|
color: "gray" | "green" | "red" | "blue";
|
||||||
|
id: string | false;
|
||||||
|
url: string | false;
|
||||||
|
disabled: boolean;
|
||||||
|
}];
|
||||||
|
}, {
|
||||||
|
type: "dropdown";
|
||||||
|
placeholder: string | false;
|
||||||
|
options: [{
|
||||||
|
label: string | false;
|
||||||
|
icon: string | false;
|
||||||
|
description: string | false;
|
||||||
|
id: string | false;
|
||||||
|
}];
|
||||||
|
},
|
||||||
|
*/
|
||||||
|
if (comp.type == discord.ComponentType.Button){
|
||||||
|
actioncomponents.push({
|
||||||
|
type: (comp.style == discord.ButtonStyle.Link) ? "url" : "interaction",
|
||||||
|
label: (comp.label) ? comp.label : false,
|
||||||
|
icon: (comp.emoji) ? comp.emoji.name : false,
|
||||||
|
color: buttonStyleToColor(comp.style),
|
||||||
|
id: comp.customId ? comp.customId : false,
|
||||||
|
url: (comp.url) ? comp.url : false,
|
||||||
|
disabled: false
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
isdropdown = true
|
||||||
|
var drpdwnoptions = []
|
||||||
|
/**@type {discord.APISelectMenuOption[]} */
|
||||||
|
const dropdownoptions = comp.options
|
||||||
|
dropdownoptions.forEach((opt) => {
|
||||||
|
drpdwnoptions.push({
|
||||||
|
label: opt.label,
|
||||||
|
icon: (opt.emoji) ? opt.emoji : false,
|
||||||
|
description: (opt.description) ? opt.description : false,
|
||||||
|
id: "hello world :)"
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
componentsArray.push({
|
||||||
|
type:"dropdown",
|
||||||
|
placeholder:false,
|
||||||
|
options:drpdwnoptions
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
if (!isdropdown){
|
||||||
|
componentsArray.push({
|
||||||
|
type:"buttons",
|
||||||
|
buttons:actioncomponents
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
const important = msg.guild ? (msg.content.includes("<@"+msg.guild.id+">") || msg.content.includes("<@everyone") || msg.content.includes("@here")): false
|
||||||
|
|
||||||
|
const replytype = (msg.interaction) ? "command" : ((msg.reference) ? "reply" : false)
|
||||||
|
if (replytype == "command"){
|
||||||
|
const replycolorRAW = msg.guild.members.cache.find((m) => m.id == msg.interaction.user.id)
|
||||||
|
const replycolor = (replycolorRAW) ? replycolorRAW.displayHexColor.replace("#000000","#ffffff") : "#ffffff"
|
||||||
|
var reply = {
|
||||||
|
type:replytype,
|
||||||
|
commandOptions:{
|
||||||
|
interactionId:msg.interaction.id,
|
||||||
|
interactionName:msg.interaction.commandName
|
||||||
|
},
|
||||||
|
user:{
|
||||||
|
name:msg.interaction.user.username,
|
||||||
|
id:msg.interaction.user.id,
|
||||||
|
color:replycolor,
|
||||||
|
pfp:msg.interaction.user.displayAvatarURL(),
|
||||||
|
bot:msg.interaction.user.bot,
|
||||||
|
system:msg.interaction.user.system,
|
||||||
|
verifiedBot:msg.interaction.user.flags.has(discord.UserFlags.VerifiedBot)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}else if (replytype == "reply"){
|
||||||
|
|
||||||
|
var replycontentRAW = messages.find((msg2) => msg2.id == msg.reference.messageId)
|
||||||
|
var replycontent = (replycontentRAW && replycontentRAW.content) ? replycontentRAW.content.slice(0,(60-replycontentRAW.author.username.length)) : "deleted this message"
|
||||||
|
const replycolorRAW = (replycontentRAW) ? msg.guild.members.cache.find((m) => m.id == replycontentRAW.author.id) : false
|
||||||
|
const replycolor = (replycolorRAW) ? replycolorRAW.displayHexColor.replace("#000000","#ffffff") : "#ffffff"
|
||||||
|
|
||||||
|
var user = (replycontentRAW && replycontentRAW.content) ? {
|
||||||
|
name:(replycontentRAW) ? replycontentRAW.author.username : "undefined",
|
||||||
|
id:(replycontentRAW) ? replycontentRAW.author.id : "undefined",
|
||||||
|
color:replycolor,
|
||||||
|
pfp:(replycontentRAW) ? replycontentRAW.author.username : "",
|
||||||
|
bot:(replycontentRAW) ? replycontentRAW.author.bot : false,
|
||||||
|
system:(replycontentRAW) ? replycontentRAW.author.system : false,
|
||||||
|
verifiedBot:(replycontentRAW) ? replycontentRAW.author.flags.has(discord.UserFlags.VerifiedBot) : false,
|
||||||
|
} : {
|
||||||
|
name:"someone",
|
||||||
|
id:"undefined",
|
||||||
|
color:"#ffffff",
|
||||||
|
pfp:"https://raw.githubusercontent.com/twitter/twemoji/master/assets/72x72/1f5d1.png",
|
||||||
|
bot:false,
|
||||||
|
system:false,
|
||||||
|
verifiedBot:false,
|
||||||
|
}
|
||||||
|
|
||||||
|
var reply = {
|
||||||
|
type:replytype,
|
||||||
|
replyOptions:{
|
||||||
|
content:replycontent,
|
||||||
|
messageId: msg.reference.messageId,
|
||||||
|
channelId: msg.reference.channelId,
|
||||||
|
guildId: msg.reference.guildId
|
||||||
|
},
|
||||||
|
user:user
|
||||||
|
}
|
||||||
|
}else{var reply = {type:replytype}}
|
||||||
|
|
||||||
|
const authorColor = msg.member ? msg.member.displayHexColor.replace("#000000","#ffffff") : "#ffffff"
|
||||||
|
messagesArray.push({
|
||||||
|
author:{
|
||||||
|
name:msg.author.tag,
|
||||||
|
id:msg.author.id,
|
||||||
|
color:authorColor,
|
||||||
|
pfp:msg.author.displayAvatarURL(),
|
||||||
|
bot:msg.author.bot,
|
||||||
|
system:msg.author.system,
|
||||||
|
verifiedBot:msg.author.flags.has(discord.UserFlags.VerifiedBot)
|
||||||
|
},
|
||||||
|
content:mentions(msg.content,guild) || "",
|
||||||
|
timestamp:msg.createdTimestamp,
|
||||||
|
embeds:embedArray,
|
||||||
|
attachments:attachmentArray,
|
||||||
|
edited: (typeof msg.editedTimestamp == "number"),
|
||||||
|
type:"normal",
|
||||||
|
important:important,
|
||||||
|
reply:reply,
|
||||||
|
components:componentsArray
|
||||||
|
})
|
||||||
|
}else {invisibleMessages++}
|
||||||
|
})
|
||||||
|
|
||||||
|
const dsb = data.style.background
|
||||||
|
const dsh = data.style.header
|
||||||
|
const dss = data.style.stats
|
||||||
|
|
||||||
|
/**@type {OTTranscriptCompileInput} */
|
||||||
|
const result = {
|
||||||
|
version,otversion,
|
||||||
|
language:bot.config.languageFile,
|
||||||
|
style:{
|
||||||
|
background:{
|
||||||
|
backgroundData:dsb.backgroundData || "",
|
||||||
|
backgroundModus:dsb.backgroundModus || "",
|
||||||
|
enableCustomBackground:dsb.enableCustomBackground || false,
|
||||||
|
},
|
||||||
|
header:{
|
||||||
|
backgroundColor:dsh.backgroundColor || "#202225",
|
||||||
|
decoColor:dsh.decoColor || "#F8BA00",
|
||||||
|
textColor:dsh.textColor || "#ffffff",
|
||||||
|
enableCustomHeader:dsh.enableCustomHeader || false
|
||||||
|
},
|
||||||
|
stats:{
|
||||||
|
backgroundColor:dss.backgroundColor || "#202225",
|
||||||
|
keyTextColor:dss.keyTextColor || "#737373",
|
||||||
|
valueTextColor:dss.valueTextColor || "#ffffff",
|
||||||
|
hideBackgroundColor:dss.hideBackgroundColor || "#40444a",
|
||||||
|
hideTextColor:dss.hideTextColor || "#ffffff",
|
||||||
|
enableCustomStats:dss.enableCustomStats || false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
bot:{
|
||||||
|
name:data.bot.name || "Open Ticket",
|
||||||
|
id:data.bot.id || 0,
|
||||||
|
pfp:data.bot.pfp || "dj-dj.be/wp-content/uploads/2022/07/profielfoto-blauw-wit.png?size=128"
|
||||||
|
},
|
||||||
|
ticket:{
|
||||||
|
name:channel.name,
|
||||||
|
id:channel.id,
|
||||||
|
|
||||||
|
guildname:guild.name,
|
||||||
|
guildid:guild.id,
|
||||||
|
guildinvite:"",
|
||||||
|
|
||||||
|
creatorname:data.ticket.creatorname,
|
||||||
|
creatorid:data.ticket.creatorid,
|
||||||
|
creatorpfp:data.ticket.creatorpfp,
|
||||||
|
|
||||||
|
closedbyname:user.tag,
|
||||||
|
closedbyid:user.id,
|
||||||
|
closedbypfp:user.displayAvatarURL(),
|
||||||
|
|
||||||
|
claimedid:"",
|
||||||
|
claimedname:"",
|
||||||
|
claimedpfp:"",
|
||||||
|
|
||||||
|
closedtime:data.ticket.closedtime,
|
||||||
|
openedtime:data.ticket.openedtime,
|
||||||
|
|
||||||
|
roleColors:[],
|
||||||
|
components:{
|
||||||
|
messages:messageAmount,
|
||||||
|
embeds:embedAmount,
|
||||||
|
files:fileAmount,
|
||||||
|
interactions:{
|
||||||
|
buttons:0,
|
||||||
|
dropdowns:0,
|
||||||
|
total:interactionAmount
|
||||||
|
},
|
||||||
|
reactions:reactionsAmount,
|
||||||
|
attachments:{
|
||||||
|
gifs:0,
|
||||||
|
images:0,
|
||||||
|
stickers:0,
|
||||||
|
invites:0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
messages:messagesArray,
|
||||||
|
premium:{
|
||||||
|
enabled:false,
|
||||||
|
premiumToken:"",
|
||||||
|
|
||||||
|
customCredits:{
|
||||||
|
enable:false,
|
||||||
|
replaceText:"Powered By Open Ticket!",
|
||||||
|
replaceURL:"https://openticket.dj-dj.be",
|
||||||
|
enableReportBug:true
|
||||||
|
},
|
||||||
|
customHeaderUrl:{
|
||||||
|
enabled:false,
|
||||||
|
url:"https://openticket.dj-dj.be",
|
||||||
|
text:"Hello!"
|
||||||
|
},
|
||||||
|
customTranscriptUrl:{
|
||||||
|
enabled:false,
|
||||||
|
name:"test-server"
|
||||||
|
},
|
||||||
|
customFavicon:{
|
||||||
|
enabled:false,
|
||||||
|
image:"https://openticket.dj-dj.be"
|
||||||
|
},
|
||||||
|
additionalFlags:[]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return result
|
||||||
|
}
|
||||||
@@ -6,7 +6,7 @@ const tsconfig = bot.tsconfig
|
|||||||
const tsembeds = require("../embeds")
|
const tsembeds = require("../embeds")
|
||||||
const tsdb = require("../tsdb")
|
const tsdb = require("../tsdb")
|
||||||
|
|
||||||
/**@typedef {{status:"success"|"error", id:String, time:Number, estimated:{lastdump: Number, processtime:Number}, transcriptstatus:{value:2, data:{fetchedmsgs:true, uploaded:true, inqueue:true, processed:false, waiting:false, available:false}}}} OTuploadResponse */
|
/**@typedef {{status:"success"|"error", id:String, time:Number, estimated:{lastdump: Number, processtime:Number,waittime:Number}, transcriptstatus:{value:2, data:{fetchedmsgs:true, uploaded:true, inqueue:true, processed:false, waiting:false, available:false}}}} OTuploadResponse */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {Object} json
|
* @param {Object} json
|
||||||
@@ -17,12 +17,13 @@ exports.upload = async (json) => {
|
|||||||
const data = encodeURIComponent(JSON.stringify(json))
|
const data = encodeURIComponent(JSON.stringify(json))
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const res = await axios.get("https://api.transcripts.dj-dj.be/upload?auth=openticketTRANSCRIPT1234&version=1.0.0&data="+data)
|
const res = await axios.post("https://transcripts.dj-dj.be/api/upload?auth=openticketTRANSCRIPT1234&version=2",JSON.stringify(json))
|
||||||
|
//const res = await axios.get("https://transcripts.dj-dj.be/api/upload?auth=openticketTRANSCRIPT1234&version=2&data="+data)
|
||||||
if (res.status != 200) resolve(false)
|
if (res.status != 200) resolve(false)
|
||||||
|
|
||||||
resolve(res.data)
|
resolve(res.data)
|
||||||
}catch{
|
}catch(err){
|
||||||
console.log("failed transcript upload!")
|
console.log("failed transcript upload!",err.response)
|
||||||
resolve(false)
|
resolve(false)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -0,0 +1,63 @@
|
|||||||
|
const discord = require('discord.js')
|
||||||
|
|
||||||
|
const bot = require("../../../index")
|
||||||
|
const tsconfig = bot.tsconfig
|
||||||
|
const tsembeds = require("../embeds")
|
||||||
|
const tsdb = require("../tsdb")
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {String} text
|
||||||
|
* @param {discord.Guild} guild
|
||||||
|
*/
|
||||||
|
exports.replacementions = (text,guild) => {
|
||||||
|
const userregex = /<@([0-9]+)>(\s)?/g
|
||||||
|
const usertext = text.replace(userregex,(x) => {
|
||||||
|
var res = userregex.exec(x)
|
||||||
|
userregex.lastIndex = 0
|
||||||
|
|
||||||
|
var member = guild.members.cache.find((m) => m.id == res[1])
|
||||||
|
var text = member ? member.user.username.replace(/\s/g," ") : res[1]
|
||||||
|
return "<@"+text+"> "
|
||||||
|
})
|
||||||
|
|
||||||
|
const channelregex = /<#([0-9]+)>(\s)?/g
|
||||||
|
const channeltext = usertext.replace(channelregex,(x) => {
|
||||||
|
var res = channelregex.exec(x)
|
||||||
|
channelregex.lastIndex = 0
|
||||||
|
|
||||||
|
var channel = guild.channels.cache.find((c) => c.id == res[1])
|
||||||
|
var text = channel ? channel.name.replace(/\s/g," ") : res[1]
|
||||||
|
return "<#"+text+"> "
|
||||||
|
})
|
||||||
|
|
||||||
|
const roleregex = /<@&([0-9]+)>(\s)?/g
|
||||||
|
const roletext = channeltext.replace(roleregex,(x) => {
|
||||||
|
var res = roleregex.exec(x)
|
||||||
|
roleregex.lastIndex = 0
|
||||||
|
|
||||||
|
var role = guild.roles.cache.find((r) => r.id == res[1])
|
||||||
|
var text = role ? role.name.replace(/\s/g," ") : res[1]
|
||||||
|
|
||||||
|
var color = role ? ((role.hexColor == "#000000") ? "regular" : role.hexColor) : "regular"
|
||||||
|
|
||||||
|
return "<@&"+text+"::"+color+"> "
|
||||||
|
})
|
||||||
|
|
||||||
|
const defaultroleregex = /@(everyone|here)(\s)?/g
|
||||||
|
const defaultroletext = roletext.replace(defaultroleregex,(x) => {
|
||||||
|
var res = defaultroleregex.exec(x)
|
||||||
|
defaultroleregex.lastIndex = 0
|
||||||
|
|
||||||
|
var text = res[1]
|
||||||
|
return "<@&"+text+"::regular> "
|
||||||
|
})
|
||||||
|
/**TODO!!!!!!!
|
||||||
|
* - remove console.log :)
|
||||||
|
* - set role colors in ENTIRE TRANSCRIPT (users,replies,mentions,...) to #ffffff if #000000
|
||||||
|
* because black => default color
|
||||||
|
* - see compileJsonV2
|
||||||
|
*/
|
||||||
|
|
||||||
|
return defaultroletext
|
||||||
|
}
|
||||||
@@ -1,67 +0,0 @@
|
|||||||
{
|
|
||||||
"version":"1.0.0",
|
|
||||||
"otversion":"3.4.0",
|
|
||||||
"style":{
|
|
||||||
"enableCustomBackground":false,
|
|
||||||
"backgroundModus":"color OR image",
|
|
||||||
"backgroundData":"#ffffff OR https://www.example.com/image.png",
|
|
||||||
"titleColor":"#ffffff"
|
|
||||||
},
|
|
||||||
"bot":{
|
|
||||||
"name":"DJdj Support Bot",
|
|
||||||
"id":12345678910,
|
|
||||||
"pfp":"https://www.example.com/image.png"
|
|
||||||
},
|
|
||||||
"ticket":{
|
|
||||||
"name":"support-DJj123dj",
|
|
||||||
"id":12345678910,
|
|
||||||
|
|
||||||
"guildname":"DJdj Development",
|
|
||||||
"guildid":12345678910,
|
|
||||||
|
|
||||||
"creatorname":"DJj123dj#1706",
|
|
||||||
"creatorid":12345678910,
|
|
||||||
"closedbyname":"DJj123dj#1706",
|
|
||||||
"closedbyid":12345678910,
|
|
||||||
|
|
||||||
"closedtime":12345678910,
|
|
||||||
"openedtime":12345678910,
|
|
||||||
|
|
||||||
"messages":1,
|
|
||||||
"files":1
|
|
||||||
},
|
|
||||||
"messages":[
|
|
||||||
{
|
|
||||||
"author":{
|
|
||||||
"name":"DJj123dj#1706",
|
|
||||||
"id":12345678910,
|
|
||||||
"color":"#ffffff",
|
|
||||||
"pfp":"https://www.example.com/image.png"
|
|
||||||
},
|
|
||||||
"content":"string or FALSE",
|
|
||||||
"timestamp":12345678910,
|
|
||||||
"embeds":[
|
|
||||||
{
|
|
||||||
"title":"string or FALSE",
|
|
||||||
"description":"string or FALSE",
|
|
||||||
"authorimg":"https://www.example.com/image.png or FALSE",
|
|
||||||
"authortext":"string or FALSE",
|
|
||||||
"footerimg":"https://www.example.com/image.png or FALSE",
|
|
||||||
"footertext":"string or FALSE",
|
|
||||||
"color":"#ffffff",
|
|
||||||
"image":"https://www.example.com/image.png or FALSE",
|
|
||||||
"thumbnail":"https://www.example.com/image.png or FALSE",
|
|
||||||
"url":"https://www.example.com/image.png or FALSE"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"files":[
|
|
||||||
{
|
|
||||||
"name":"image.png",
|
|
||||||
"type":"PNG",
|
|
||||||
"size":"1MB",
|
|
||||||
"url":"https://www.example.com/image.png"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
"version":"1.0.0"
|
"version":"2"
|
||||||
}
|
}
|
||||||
@@ -14,11 +14,15 @@ const tsdb = require("./tsdb")
|
|||||||
const checkAvailability = async () => {
|
const checkAvailability = async () => {
|
||||||
if (process.argv.some((v) => v == "--tsoffline")) return true
|
if (process.argv.some((v) => v == "--tsoffline")) return true
|
||||||
const axios = require("axios").default
|
const axios = require("axios").default
|
||||||
const res = await axios.get("https://transcripts.dj-dj.be/status.txt")
|
try{
|
||||||
|
const res = await axios.get("https://transcripts.dj-dj.be/api/status.json")
|
||||||
if (!res || !(res.status == 200) || !res.data) return false
|
if (!res || !(res.status == 200) || !res.data) return false
|
||||||
|
|
||||||
if ((res.data == "online") || (res.data == "1") || (res.data == "true")) return true
|
if (res.data && res.data["v2"] == "online") return true
|
||||||
else return false
|
else return false
|
||||||
|
}catch{
|
||||||
|
return false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -48,21 +52,42 @@ module.exports = async (messages,guild,channel,user,reason) => {
|
|||||||
const ticketopener = client.users.cache.find(u => u.id == id)
|
const ticketopener = client.users.cache.find(u => u.id == id)
|
||||||
|
|
||||||
if (tsconfig.sendTranscripts.useHTMLtranscripts){
|
if (tsconfig.sendTranscripts.useHTMLtranscripts){
|
||||||
const JSONDATA = require("./communication/compileJson").compile(guild,channel,user,messages,{
|
const tsb = tsconfig.style.background
|
||||||
|
const tsh = tsconfig.style.header
|
||||||
|
const tss = tsconfig.style.stats
|
||||||
|
const JSONDATA = require("./communication/compileJsonV2").compile(guild,channel,user,messages,{
|
||||||
style:{
|
style:{
|
||||||
titleColor:tsconfig.style.titleColor,
|
background:{
|
||||||
enableCustomBackground:tsconfig.style.background.enableCustomBackground,
|
enableCustomBackground:tsb.enableCustomBackground,
|
||||||
backgroundModus:tsconfig.style.background.backgroundModus,
|
backgroundModus:tsb.backgroundModus,
|
||||||
backgroundData:tsconfig.style.background.backgroundData
|
backgroundData:tsb.backgroundData
|
||||||
|
},
|
||||||
|
header:{
|
||||||
|
enableCustomHeader:tsh.enableCustomHeader,
|
||||||
|
backgroundColor:tsh.backgroundColor,
|
||||||
|
decoColor:tsh.decoColor,
|
||||||
|
textColor:tsh.textColor
|
||||||
|
},
|
||||||
|
stats:{
|
||||||
|
enableCustomStats:tss.enableCustomStats,
|
||||||
|
backgroundColor:tss.backgroundColor,
|
||||||
|
keyTextColor:tss.keyTextColor,
|
||||||
|
valueTextColor:tss.valueTextColor,
|
||||||
|
hideBackgroundColor:tss.hideBackgroundColor,
|
||||||
|
hideTextColor:tss.hideTextColor
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
bot:{
|
bot:{
|
||||||
name:client.user.username,
|
name:client.user.username,
|
||||||
id:client.user.id,
|
id:client.user.id,
|
||||||
pfp:client.user.displayAvatarURL()
|
pfp:client.user.displayAvatarURL(),
|
||||||
},
|
},
|
||||||
ticket:{
|
ticket:{
|
||||||
creatorid:ticketopener.id,
|
creatorid:ticketopener.id,
|
||||||
creatorname:ticketopener.tag,
|
creatorname:ticketopener.tag,
|
||||||
|
creatorpfp:ticketopener.displayAvatarURL(),
|
||||||
|
|
||||||
openedtime:opentime.getTime(),
|
openedtime:opentime.getTime(),
|
||||||
closedtime:new Date().getTime()
|
closedtime:new Date().getTime()
|
||||||
}
|
}
|
||||||
@@ -86,16 +111,17 @@ module.exports = async (messages,guild,channel,user,reason) => {
|
|||||||
if (!TSdata) return false
|
if (!TSdata) return false
|
||||||
|
|
||||||
if (TSdata.status == "success"){
|
if (TSdata.status == "success"){
|
||||||
const url = "https://transcripts.dj-dj.be/t/"+TSdata.time+"_"+TSdata.id+".html"
|
//MAKE THIS COMPATIBLE WITH PREMIUM "customTranscriptUrl" IN FUTURE VERSIONS!!
|
||||||
|
const url = "https://transcripts.dj-dj.be/v2/"+TSdata.time+"_"+TSdata.id+".html"
|
||||||
|
|
||||||
//calculate estimated time
|
//calculate estimated time
|
||||||
const lastDumpTime = (new Date(TSdata.estimated.lastdump).getTime())
|
//const lastDumpTime = (new Date(TSdata.estimated.lastdump).getTime())
|
||||||
const dumpLoopTime = 15000
|
//const dumpLoopTime = 15000
|
||||||
const nextDump = new Date(lastDumpTime+dumpLoopTime)
|
//const nextDump = new Date(lastDumpTime+dumpLoopTime)
|
||||||
const processtime = TSdata.estimated.processtime+6000 //6sec extra time for overflow
|
//const processtime = TSdata.estimated.processtime+6000 //6sec extra time for overflow
|
||||||
|
|
||||||
const finaltime = new Date(nextDump.getTime()+processtime)
|
const duration = TSdata.estimated.waittime
|
||||||
const duration = finaltime.getTime()-new Date().getTime()
|
const finaltime = new Date(new Date().getTime()+duration)
|
||||||
|
|
||||||
//waiting
|
//waiting
|
||||||
if (tsconfig.sendTranscripts.enableChannel){
|
if (tsconfig.sendTranscripts.enableChannel){
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
"es-ES":"spanish",
|
"es-ES":"spanish",
|
||||||
"it":"italian",
|
"it":"italian",
|
||||||
"ru":"russian",
|
"ru":"russian",
|
||||||
|
"tr": "Türkçe",
|
||||||
|
|
||||||
"MISSING":"arabic,portuguese",
|
"MISSING":"arabic,portuguese",
|
||||||
"NOTAVAILABLE":"arabic,portuguese,czech"
|
"NOTAVAILABLE":"arabic,portuguese,czech"
|
||||||
@@ -25,7 +26,8 @@
|
|||||||
"fr":"Une liste des commandes.",
|
"fr":"Une liste des commandes.",
|
||||||
"es-ES":"Una lista de los comandos disponibles.",
|
"es-ES":"Una lista de los comandos disponibles.",
|
||||||
"it":"Una lista di tutti i comandi disponibili.",
|
"it":"Una lista di tutti i comandi disponibili.",
|
||||||
"ru":"Список доступных команд"
|
"ru":"Список доступных команд",
|
||||||
|
"tr": "Kullanılabilir komutların listesi."
|
||||||
},
|
},
|
||||||
"message":{
|
"message":{
|
||||||
"en-GB":"Spawn an embed with buttons.",
|
"en-GB":"Spawn an embed with buttons.",
|
||||||
@@ -37,7 +39,8 @@
|
|||||||
"fr":"Créer un embed avec des boutons.",
|
"fr":"Créer un embed avec des boutons.",
|
||||||
"es-ES":"Genera un embed con botones.",
|
"es-ES":"Genera un embed con botones.",
|
||||||
"it":"Genera un embed con un pulsante.",
|
"it":"Genera un embed con un pulsante.",
|
||||||
"ru":"Создать embed с кнопками"
|
"ru":"Создать embed с кнопками",
|
||||||
|
"tr": "Butonlar ile bir yerleştirme oluşturun."
|
||||||
},
|
},
|
||||||
"close":{
|
"close":{
|
||||||
"en-GB":"Close a ticket.",
|
"en-GB":"Close a ticket.",
|
||||||
@@ -49,7 +52,8 @@
|
|||||||
"fr":"Fermer un ticket.",
|
"fr":"Fermer un ticket.",
|
||||||
"es-ES":"Cierra un ticket.",
|
"es-ES":"Cierra un ticket.",
|
||||||
"it":"Chiudi un ticket.",
|
"it":"Chiudi un ticket.",
|
||||||
"ru":"Закрыть тикет"
|
"ru":"Закрыть тикет",
|
||||||
|
"tr": "Bileti kapat."
|
||||||
},
|
},
|
||||||
"delete":{
|
"delete":{
|
||||||
"en-GB":"Delete a ticket.",
|
"en-GB":"Delete a ticket.",
|
||||||
@@ -61,7 +65,8 @@
|
|||||||
"fr":"Supprimer un ticket.",
|
"fr":"Supprimer un ticket.",
|
||||||
"es-ES":"Elimina un ticket.",
|
"es-ES":"Elimina un ticket.",
|
||||||
"it":"Elimina un ticket.",
|
"it":"Elimina un ticket.",
|
||||||
"ru":"Удалить тикет"
|
"ru":"Удалить тикет",
|
||||||
|
"tr": "Bileti sil."
|
||||||
},
|
},
|
||||||
"reopen":{
|
"reopen":{
|
||||||
"en-GB":"Re-Open a ticket.",
|
"en-GB":"Re-Open a ticket.",
|
||||||
@@ -73,7 +78,8 @@
|
|||||||
"fr":"Re-ouvrir un ticket.",
|
"fr":"Re-ouvrir un ticket.",
|
||||||
"es-ES":"Re-abre un ticket.",
|
"es-ES":"Re-abre un ticket.",
|
||||||
"it":"Ri-Apri un ticket.",
|
"it":"Ri-Apri un ticket.",
|
||||||
"ru":"Открыть заново тикет"
|
"ru":"Открыть заново тикет",
|
||||||
|
"tr": "Bileti yeniden aç."
|
||||||
},
|
},
|
||||||
"add":{
|
"add":{
|
||||||
"en-GB":"Add another user to a ticket.",
|
"en-GB":"Add another user to a ticket.",
|
||||||
@@ -85,7 +91,8 @@
|
|||||||
"fr":"Ajouter un utilisateur au ticket.",
|
"fr":"Ajouter un utilisateur au ticket.",
|
||||||
"es-ES":"Agrega otro usuario al ticket.",
|
"es-ES":"Agrega otro usuario al ticket.",
|
||||||
"it":"Aggiungi un membro al ticket",
|
"it":"Aggiungi un membro al ticket",
|
||||||
"ru":"Добавить другого пользователя в тикет"
|
"ru":"Добавить другого пользователя в тикет",
|
||||||
|
"tr": "Bilete başka bir kullanıcı ekle."
|
||||||
},
|
},
|
||||||
"remove":{
|
"remove":{
|
||||||
"en-GB":"Remove a user from a ticket.",
|
"en-GB":"Remove a user from a ticket.",
|
||||||
@@ -97,7 +104,8 @@
|
|||||||
"fr":"Enlever quelqu’un du ticket.",
|
"fr":"Enlever quelqu’un du ticket.",
|
||||||
"es-ES":"Elimina otro usuario del ticket.",
|
"es-ES":"Elimina otro usuario del ticket.",
|
||||||
"it":"Rimuovi un membro dal ticket",
|
"it":"Rimuovi un membro dal ticket",
|
||||||
"ru":"Удалить пользователя из тикета"
|
"ru":"Удалить пользователя из тикета",
|
||||||
|
"tr": "Kullanıcıyı bir biletten kaldır."
|
||||||
},
|
},
|
||||||
"newticket":{
|
"newticket":{
|
||||||
"en-GB":"Create a ticket",
|
"en-GB":"Create a ticket",
|
||||||
@@ -109,7 +117,8 @@
|
|||||||
"fr":"Créer un ticket",
|
"fr":"Créer un ticket",
|
||||||
"es-ES":"Crear un ticket.",
|
"es-ES":"Crear un ticket.",
|
||||||
"it":"Crea un ticket",
|
"it":"Crea un ticket",
|
||||||
"ru":"Создать тикет"
|
"ru":"Создать тикет",
|
||||||
|
"tr": "Bilet oluştur"
|
||||||
},
|
},
|
||||||
"rename":{
|
"rename":{
|
||||||
"en-GB":"Rename a ticket channel.",
|
"en-GB":"Rename a ticket channel.",
|
||||||
@@ -121,7 +130,8 @@
|
|||||||
"fr":"Renommer un ticket.",
|
"fr":"Renommer un ticket.",
|
||||||
"es-ES":"Renombrar un canal de ticket.",
|
"es-ES":"Renombrar un canal de ticket.",
|
||||||
"it":"Rinomina il canale di un ticket.",
|
"it":"Rinomina il canale di un ticket.",
|
||||||
"ru":"Переименовать канал тикета"
|
"ru":"Переименовать канал тикета",
|
||||||
|
"tr": "Bilet kanalını yeniden adlandır."
|
||||||
},
|
},
|
||||||
"claim":{
|
"claim":{
|
||||||
"en-GB":"Claim a ticket.",
|
"en-GB":"Claim a ticket.",
|
||||||
@@ -133,7 +143,8 @@
|
|||||||
"fr":" ",
|
"fr":" ",
|
||||||
"es-ES":" ",
|
"es-ES":" ",
|
||||||
"it":" ",
|
"it":" ",
|
||||||
"ru":"Взять тикет"
|
"ru":"Взять тикет",
|
||||||
|
"tr":"Bilet talep et."
|
||||||
},
|
},
|
||||||
"unclaim":{
|
"unclaim":{
|
||||||
"en-GB":"Un-claim a ticket.",
|
"en-GB":"Un-claim a ticket.",
|
||||||
@@ -145,7 +156,8 @@
|
|||||||
"fr":" ",
|
"fr":" ",
|
||||||
"es-ES":" ",
|
"es-ES":" ",
|
||||||
"it":" ",
|
"it":" ",
|
||||||
"ru":"Снять тикет"
|
"ru":"Снять тикет",
|
||||||
|
"tr":"Bileti iptal et."
|
||||||
},
|
},
|
||||||
"category":{
|
"category":{
|
||||||
"en-GB":"Change ticket type.",
|
"en-GB":"Change ticket type.",
|
||||||
@@ -157,7 +169,8 @@
|
|||||||
"fr":" ",
|
"fr":" ",
|
||||||
"es-ES":" ",
|
"es-ES":" ",
|
||||||
"it":" ",
|
"it":" ",
|
||||||
"ru":"Изменить тип тикета"
|
"ru":"Изменить тип тикета",
|
||||||
|
"tr":"Bilet türünü değiştir."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,98 @@
|
|||||||
|
{
|
||||||
|
"errors":{
|
||||||
|
"missingArgsTitle":"อาร์กิวเมนต์ไม่ถูกต้อง!",
|
||||||
|
"missingArgsDescription":"อาร์กิวเมนต์ไม่ครบ",
|
||||||
|
"noPermsTitle":"ไม่มีสิทธิ์!",
|
||||||
|
"noPermsDescription":"คุณต้องมีสิทธิ์ ADMINISTRATOR หรืออยู่ในรายชื่อบทบาทที่อนุญาต!",
|
||||||
|
"noPermsDelete":"เฉพาะผู้ดูแลระบบเท่านั้นที่สามารถลบตั๋วได้!",
|
||||||
|
"chooseFromListTitle":"ID ไม่ถูกต้อง",
|
||||||
|
"chooseFromListDescription":"เลือกหนึ่งใน ID ด้านล่าง:",
|
||||||
|
"boterror":"ข้อผิดพลาดของบอท!",
|
||||||
|
"notInTicketTitle":"คุณไม่ได้อยู่ในตั๋ว!",
|
||||||
|
"notInTicketDescription":"คำสั่งนี้ไม่สามารถทำงานนอกตั๋วได้!",
|
||||||
|
"ticketDoesntExist":"ตั๋วนี้ไม่มีอยู่แล้ว!",
|
||||||
|
"roleDoesntExist":"บทบาทนี้ไม่มีอยู่แล้ว!",
|
||||||
|
"anotherOption":"ตัวเลือกนี้ไม่ใช่ตั๋วแต่เป็นประเภทอื่น!",
|
||||||
|
"maxAmountTitle":"จำนวนสูงสุดแล้ว!",
|
||||||
|
"maxAmountDescription":"คุณได้สร้างตั๋วครบจำนวนที่เราให้สร้างไว้แล้ว\nดังนั้นคุณไม่สามารถสร้างตั๋วใหม่ได้!",
|
||||||
|
"somethingWentWrong":"เกิดข้อผิดพลาดบางอย่าง!\nโปรดลองอีกครั้งในครั้งถัดไป!"
|
||||||
|
},
|
||||||
|
"commands":{
|
||||||
|
"userAddedTitle":"เพิ่ม {0} เข้าสู่ตั๋วนี้แล้ว!",
|
||||||
|
"userRemovedTitle":"นำ {0} ออกจากตั๋วนี้แล้ว!",
|
||||||
|
"renameTitle":"เปลี่ยนชื่อเป็น {0}!",
|
||||||
|
"closeTitle":"ปิดตั๋วนี้!",
|
||||||
|
"deleteTitle":"กำลังลบตั๋วนี้...",
|
||||||
|
"reopenTitle":"เปิดตั๋วนี้ใหม่!",
|
||||||
|
|
||||||
|
"claimTitle":"ตั๋วนี้ถูกเรียกเก็บโดย {0}",
|
||||||
|
"unclaimTitle":"ไม่มีการเรียกเก็บตั๋วนี้อีกต่อไป!",
|
||||||
|
"changeTitle":"เปลี่ยนประเภทตั๋วเป็น {0}!",
|
||||||
|
|
||||||
|
"statsTitle":"นี่คือสถิติสำหรับ {0}!",
|
||||||
|
"autocloseTitle":"ตั๋วนี้จะถูกปิดอัตโนมัติหลังจาก {0}!",
|
||||||
|
"autocloseRejectTitle":"ตั๋วนี้จะไม่ถูกปิดอัตโนมัติอีกต่อไป!",
|
||||||
|
"autocloseWarn":"สิ่งนี้มีผลต่อตั๋วที่ไม่มีการเคลื่อนไหว!",
|
||||||
|
|
||||||
|
"goToTicket":"ไปยังตั๋ว",
|
||||||
|
"ticketWarning":"Embed อยู่ในข้อความข้างล่าง",
|
||||||
|
"maxTicketWarning":"**คำเตือน:** _คุณสามารถสร้างตั๋วได้สูงสุด {0} ตั๋วต่อครั้ง!_"
|
||||||
|
},
|
||||||
|
"helpMenu":{
|
||||||
|
"title":"คำสั่งที่มีอยู่:",
|
||||||
|
"header1":"**ไปที่ {0} เพื่อสร้างตั๋ว!**\n\n",
|
||||||
|
"header2":"**ใช้คำสั่ง `/new` หรือ `/ticket` เพื่อสร้างตั๋ว!**\n\n",
|
||||||
|
|
||||||
|
"msgCmd":"แสดง Embed พร้อมปุ่ม (สำหรับแอดมินเท่านั้น)",
|
||||||
|
"renameCmd":"เปลี่ยนชื่อตั๋ว (ห้ามมีช่องว่าง)",
|
||||||
|
"closeCmd":"ปิดตั๋ว",
|
||||||
|
"deleteCmd":"ลบตั๋ว",
|
||||||
|
"addCmd":"เพิ่มผู้ใช้เข้าสู่ตั๋ว",
|
||||||
|
"removeCmd":"นำผู้ใช้ออกจากตั๋ว",
|
||||||
|
"reopenCmd":"เปิดตั๋วใหม่หลังจากถูกปิด",
|
||||||
|
"changeCmd":"เปลี่ยนประเภทตั๋ว",
|
||||||
|
"claimCmd":"เรียกเก็บตั๋ว",
|
||||||
|
"unclaimCmd":"ยกเลิกการเรียกเก็บตั๋ว",
|
||||||
|
"statsCmd":"ดูสถิติของตั๋ว",
|
||||||
|
"autocloseCmd":"ตั้งเวลาปิดตั๋วโดยอัตโนมัติ"
|
||||||
|
},
|
||||||
|
"buttons":{
|
||||||
|
"close":"ปิดตั๋ว",
|
||||||
|
"delete":"ลบตั๋ว",
|
||||||
|
"reopen":"เปิดตั๋วใหม่",
|
||||||
|
"closeWithReason":"ปิดตั๋วพร้อมเหตุผล"
|
||||||
|
},
|
||||||
|
"messages":{
|
||||||
|
"closedDescription":"ตอนนี้เฉพาะผู้ดูแลเท่านั้นที่สามารถพูดได้ในตั๋วนี้!\n\n*คลิกที่ปุ่มด้านล่างเพื่อลบหรือเปิดตั๋วใหม่!*",
|
||||||
|
"createdTitle":"สร้างตั๋วแล้ว!",
|
||||||
|
"createdDescription":"ตั๋วของคุณถูกสร้างเรียบร้อยแล้ว คุณจะได้รับการแจ้งเตือนด้วยการพิมพ์ข้อความด้วย @ ตามตั๋วของคุณ!",
|
||||||
|
|
||||||
|
"newTicketDmTitle":"ตั๋วใหม่!",
|
||||||
|
"closedTicketDmTitle":"ตั๋วถูกปิด!",
|
||||||
|
"deletedTicketDmTitle":"ตั๋วถูกลบ!",
|
||||||
|
"closedTicketDmDescription":"ตั๋วของคุณถูกปิด!",
|
||||||
|
"deletedTicketDmDescription":"ตั๋วของคุณถูกลบ!",
|
||||||
|
"reopenTicketDmTitle":"ตั๋วถูกเปิดใหม่!",
|
||||||
|
"reopenTicketDmDescription":"ตั๋วของคุณถูกเปิดใหม่!",
|
||||||
|
|
||||||
|
"chooseCategory":"เลือกหมวดหมู่:",
|
||||||
|
"gettingdeleted":"กำลังลบตั๋ว...",
|
||||||
|
|
||||||
|
"none":"ไม่มี",
|
||||||
|
"reason":"เหตุผล",
|
||||||
|
"createdat":"สร้างเมื่อ",
|
||||||
|
"openedby":"เปิดโดย",
|
||||||
|
"deletedby":"ลบโดย",
|
||||||
|
"closedby":"ปิดโดย",
|
||||||
|
|
||||||
|
"modalreason":"เหตุผลที่ต้องการปิดตั๋ว?",
|
||||||
|
"chooseATicket": "เลือกตั๋ว"
|
||||||
|
},
|
||||||
|
"transcripts":{
|
||||||
|
"title":"บันทึกข้อความ",
|
||||||
|
"processed":"กำลังประมวลผลบันทึกข้อความ",
|
||||||
|
"wait":"โปรดรอสักครู่!",
|
||||||
|
"estimated":"เวลาโดยประมาณ",
|
||||||
|
"available":"บันทึกข้อความพร้อมใช้งานที่นี่"
|
||||||
|
}
|
||||||
|
}
|
||||||
+17
-3
@@ -7,12 +7,26 @@
|
|||||||
"useHTMLtranscripts":true
|
"useHTMLtranscripts":true
|
||||||
},
|
},
|
||||||
"style":{
|
"style":{
|
||||||
"titleColor":"#F8BA00",
|
|
||||||
"background":{
|
"background":{
|
||||||
"enableCustomBackground":false,
|
"enableCustomBackground":false,
|
||||||
"backgroundModus":"color OR image",
|
"backgroundModus":"image OR color",
|
||||||
"backgroundData":"#abc123 OR https://www.example.com/image.png"
|
"backgroundData":"image url OR hex color (#ffffff)"
|
||||||
|
|
||||||
|
},
|
||||||
|
"header":{
|
||||||
|
"enableCustomHeader":false,
|
||||||
|
"backgroundColor":"#202225",
|
||||||
|
"decoColor":"#F8BA00",
|
||||||
|
"textColor":"#ffffff"
|
||||||
|
|
||||||
|
},
|
||||||
|
"stats":{
|
||||||
|
"enableCustomStats":false,
|
||||||
|
"backgroundColor":"#202225",
|
||||||
|
"keyTextColor":"#737373",
|
||||||
|
"valueTextColor":"#ffffff",
|
||||||
|
"hideBackgroundColor":"#40444a",
|
||||||
|
"hideTextColor":"#ffffff"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user