v3.3.1 BUG FIXES! (+ added Slovenian)
This commit is contained in:
@@ -59,6 +59,7 @@ Translators
|
||||
|Russian |Apexo#0723 |
|
||||
|Turkish |Hydrâelčhâvø#1575 |
|
||||
|Polish |MKevas#8311 |
|
||||
|Slovenian |n1kkec#5341 |
|
||||
|
||||
## links
|
||||
current version: _v3.3.0_
|
||||
|
||||
+7
-8
@@ -41,11 +41,10 @@ module.exports = () => {
|
||||
.setFooter({text:"claimed by: "+interaction.user.tag,iconURL:interaction.user.displayAvatarURL()})
|
||||
.setDescription(hdraw.description+bot.hiddenData.writeHiddenData(hiddendata.type,hiddendata.data))
|
||||
|
||||
if (!firstmsg.components[0].components[1].disabled){
|
||||
firstmsg.edit({components:[bot.buttons.firstmsg.firstmsgRowNormalNoClaim],embeds:[newEmbed]})
|
||||
|
||||
}else if (firstmsg.components[0].components[1].disabled){
|
||||
if (firstmsg.components[0].components[1] && firstmsg.components[0].components[1].disabled){
|
||||
firstmsg.edit({components:[bot.buttons.firstmsg.firstmsgRowDisabledNoClaim],embeds:[newEmbed]})
|
||||
}else{
|
||||
firstmsg.edit({components:[bot.buttons.firstmsg.firstmsgRowNormalNoClaim],embeds:[newEmbed]})
|
||||
}
|
||||
|
||||
msg.channel.send({embeds:[bot.embeds.commands.claimEmbed(claimingUser,msg.author)]})
|
||||
@@ -67,6 +66,7 @@ module.exports = () => {
|
||||
if (!interaction.guild) return
|
||||
if (!permsChecker.command(interaction.user.id,interaction.guild.id)){
|
||||
permsChecker.sendUserNoPerms(interaction.user)
|
||||
interaction.reply({content:":x: "+l.errors.noPermsTitle,ephemeral:true})
|
||||
return
|
||||
}
|
||||
|
||||
@@ -87,11 +87,10 @@ module.exports = () => {
|
||||
.setFooter({text:"claimed by: "+user.tag,iconURL:user.displayAvatarURL()})
|
||||
.setDescription(hdraw.description+bot.hiddenData.writeHiddenData(hiddendata.type,hiddendata.data))
|
||||
|
||||
if (!firstmsg.components[0].components[1].disabled){
|
||||
firstmsg.edit({components:[bot.buttons.firstmsg.firstmsgRowNormalNoClaim],embeds:[newEmbed]})
|
||||
|
||||
}else if (firstmsg.components[0].components[1].disabled){
|
||||
if (firstmsg.components[0].components[1] && firstmsg.components[0].components[1].disabled){
|
||||
firstmsg.edit({components:[bot.buttons.firstmsg.firstmsgRowDisabledNoClaim],embeds:[newEmbed]})
|
||||
}else{
|
||||
firstmsg.edit({components:[bot.buttons.firstmsg.firstmsgRowNormalNoClaim],embeds:[newEmbed]})
|
||||
}
|
||||
|
||||
interaction.editReply({embeds:[bot.embeds.commands.claimEmbed(user,interaction.user)]})
|
||||
|
||||
+7
-8
@@ -48,11 +48,10 @@ module.exports = () => {
|
||||
newEmbed.setFooter(null)
|
||||
}
|
||||
|
||||
if (!firstmsg.components[0].components[1].disabled){
|
||||
firstmsg.edit({components:[bot.buttons.firstmsg.firstmsgRowNormal],embeds:[newEmbed]})
|
||||
|
||||
}else if (firstmsg.components[0].components[1].disabled){
|
||||
if (firstmsg.components[0].components[1] && firstmsg.components[0].components[1].disabled){
|
||||
firstmsg.edit({components:[bot.buttons.firstmsg.firstmsgRowDisabled],embeds:[newEmbed]})
|
||||
}else{
|
||||
firstmsg.edit({components:[bot.buttons.firstmsg.firstmsgRowNormal],embeds:[newEmbed]})
|
||||
}
|
||||
|
||||
msg.channel.send({embeds:[bot.embeds.commands.unclaimEmbed(msg.author)]})
|
||||
@@ -73,6 +72,7 @@ module.exports = () => {
|
||||
if (!interaction.guild) return
|
||||
if (!permsChecker.command(interaction.user.id,interaction.guild.id)){
|
||||
permsChecker.sendUserNoPerms(interaction.user)
|
||||
interaction.reply({content:":x: "+l.errors.noPermsTitle,ephemeral:true})
|
||||
return
|
||||
}
|
||||
|
||||
@@ -104,11 +104,10 @@ module.exports = () => {
|
||||
newEmbed.setFooter(null)
|
||||
}
|
||||
|
||||
if (!firstmsg.components[0].components[1].disabled){
|
||||
firstmsg.edit({components:[bot.buttons.firstmsg.firstmsgRowNormal],embeds:[newEmbed]})
|
||||
|
||||
}else if (firstmsg.components[0].components[1].disabled){
|
||||
if (firstmsg.components[0].components[1] && firstmsg.components[0].components[1].disabled){
|
||||
firstmsg.edit({components:[bot.buttons.firstmsg.firstmsgRowDisabled],embeds:[newEmbed]})
|
||||
}else{
|
||||
firstmsg.edit({components:[bot.buttons.firstmsg.firstmsgRowNormal],embeds:[newEmbed]})
|
||||
}
|
||||
|
||||
interaction.editReply({embeds:[bot.embeds.commands.unclaimEmbed(interaction.user)]})
|
||||
|
||||
+1
-1
@@ -427,7 +427,7 @@ exports.checker = async () => {
|
||||
checkType(config.languageFile,"string","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")){
|
||||
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")){
|
||||
createError("'languagefile' | invalid language, more info in the wiki")
|
||||
}
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ const storage = bot.storage
|
||||
const hiddendata = bot.hiddenData
|
||||
const embed = discord.EmbedBuilder
|
||||
const mc = config.color
|
||||
const permsChecker = require("../../../utils/permisssionChecker")
|
||||
|
||||
const button = discord.ButtonBuilder
|
||||
const arb = discord.ActionRowBuilder
|
||||
@@ -22,9 +23,15 @@ module.exports = () => {
|
||||
if (interaction.customId != "OTclaimTicket") return
|
||||
|
||||
try {
|
||||
interaction.deferUpdate()
|
||||
await interaction.deferUpdate()
|
||||
}catch{}
|
||||
|
||||
if (!interaction.guild) return
|
||||
if (!permsChecker.command(interaction.user.id,interaction.guild.id)){
|
||||
permsChecker.sendUserNoPerms(interaction.user)
|
||||
return
|
||||
}
|
||||
|
||||
interaction.channel.messages.fetchPinned().then(msglist => {
|
||||
/**@type {discord.Message} */
|
||||
var firstmsg = msglist.last()
|
||||
@@ -40,11 +47,10 @@ module.exports = () => {
|
||||
.setFooter({text:"claimed by: "+interaction.user.tag,iconURL:interaction.user.displayAvatarURL()})
|
||||
.setDescription(hdraw.description+bot.hiddenData.writeHiddenData(hiddendata.type,hiddendata.data))
|
||||
|
||||
if (!firstmsg.components[0].components[1].disabled){
|
||||
firstmsg.edit({components:[bot.buttons.firstmsg.firstmsgRowNormalNoClaim],embeds:[newEmbed]})
|
||||
|
||||
}else if (firstmsg.components[0].components[1].disabled){
|
||||
if (firstmsg.components[0].components[1] && firstmsg.components[0].components[1].disabled){
|
||||
firstmsg.edit({components:[bot.buttons.firstmsg.firstmsgRowDisabledNoClaim],embeds:[newEmbed]})
|
||||
}else{
|
||||
firstmsg.edit({components:[bot.buttons.firstmsg.firstmsgRowNormalNoClaim],embeds:[newEmbed]})
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
@@ -64,12 +64,12 @@ exports.compile = (guild,channel,user,messagesInv,data) => {
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
const memberColor = msg.member ? msg.member.displayHexColor : "#ffffff"
|
||||
messagesArray.push({
|
||||
author:{
|
||||
name:msg.author.tag,
|
||||
id:Number(msg.author.id),
|
||||
color:msg.member.displayHexColor || "#ffffff",
|
||||
color:memberColor,
|
||||
pfp:msg.author.displayAvatarURL()
|
||||
},
|
||||
content:msg.content || "",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
/**@typedef {{type:String,data:[{key:String,value:String}]}} hiddenData */
|
||||
/**@typedef {{type:String,data:[{key:String,value:String}],status:Boolean}} hiddenData */
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
exports.readHiddenData = (messageContent) => {
|
||||
//ticketdata//type:123|userid:456)
|
||||
if (!messageContent.includes("[ ](OTDATA|")) return {type:"",data:[],status:false}
|
||||
const rawhidden = messageContent.split("[ ](OTDATA|")[1]
|
||||
const rawhidden2 = rawhidden.split("//")
|
||||
|
||||
@@ -29,7 +30,7 @@ exports.readHiddenData = (messageContent) => {
|
||||
resultData.push({key:dataresult[0],value:dataresult[1]})
|
||||
})
|
||||
|
||||
return {type:datatype,data:resultData}
|
||||
return {type:datatype,data:resultData,status:true}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -57,8 +58,9 @@ exports.writeHiddenData = (type,data) => {
|
||||
* @returns {{description:String,hiddenData:hiddenData}}
|
||||
*/
|
||||
exports.removeHiddenData = (description) => {
|
||||
const hiddenData = this.readHiddenData(description)
|
||||
if (!description.includes("[ ](OTDATA|")) return {description:description,hiddenData:[]}
|
||||
|
||||
const hiddenData = this.readHiddenData(description)
|
||||
const splitted = description.split("[ ](OTDATA")
|
||||
const original = splitted[0]
|
||||
|
||||
|
||||
+19
-8
@@ -24,10 +24,17 @@
|
||||
"closeTitle": "Zaprl ta ticket!",
|
||||
"deleteTitle": "Brisanje ticketa...",
|
||||
"reopenTitle": "Ponovno odprl ta ticket!",
|
||||
"claimTitle": "Ta ticket je zdaj claimana za {0}",
|
||||
"unclaimTitle": "Ta ticket ni več zahtevan!",
|
||||
"changeTitle": "Vrsta ticketa je spremenjena na {0}!",
|
||||
|
||||
"claimTitle":"Ticket je claimal {0}",
|
||||
"unclaimTitle":"Ticket ni več claiman!",
|
||||
"changeTitle":"Changed ticket type to {0}!",
|
||||
|
||||
"statsTitle":"Statistike za {0}!",
|
||||
"autocloseTitle":"Ticket so avtomatsko zapru po {0}!",
|
||||
"autocloseRejectTitle":"Ticket se nebo avtomatsko zapru!",
|
||||
"autocloseWarn":"To ima efekt samo na inactive ticketih!",
|
||||
|
||||
"goToTicket":"pojdi v ticket",
|
||||
"ticketWarning": "Opozorilo je v spodnjem sporočilu!",
|
||||
"maxTicketWarning": "**Opozorilo:** _Naenkrat lahko ustvarite le {0} ticketov!_"
|
||||
},
|
||||
@@ -42,7 +49,12 @@
|
||||
"deleteCmd": "Izbriši ticket.",
|
||||
"addCmd": "Dodaj uporabnika v ticket.",
|
||||
"removeCmd": "Odstrani uporabnika z ticket-a.",
|
||||
"reopenCmd": "Ponovno odprite ticket, ko je bila zaprta."
|
||||
"reopenCmd": "Ponovno odprite ticket, ko je bila zaprta.",
|
||||
"changeCmd":"Spremeni tip ticketa.",
|
||||
"claimCmd":"Claimaj ticket.",
|
||||
"unclaimCmd":"Unclaimaj ticket.",
|
||||
"statCmds":"Statistike ticketa.",
|
||||
"autocloseCmd":"Nastavi timer da avtomatsko zapre ticket"
|
||||
},
|
||||
"buttons":{
|
||||
"close":"Zapri Ticket",
|
||||
@@ -51,9 +63,6 @@
|
||||
"closeWithReason":"Zapri z razlogom"
|
||||
},
|
||||
"messages":{
|
||||
"reopenTitle": "Ponovno odprl ta ticket!",
|
||||
"reopenDescription": "Feel free to talk again!",
|
||||
"closedTitle": "Zaprli ta ticket!",
|
||||
"closedDescription": "V tem ticket-u lahko zdaj govorijo samo administratorji!\n\n*Kliknite na spodnji gumb za brisanje ali ponovno odprtje te ticket!*",
|
||||
"createdTitle": "Ticket ustvarjen!",
|
||||
"createdDescription": "Vaš ticket je ustvarjen, lahko jo odkrijete s pingom!",
|
||||
@@ -71,9 +80,11 @@
|
||||
|
||||
"none": "ni",
|
||||
"reason": "razlog",
|
||||
|
||||
"createdat":"ustvarjeno ob",
|
||||
"openedby":"odprto od",
|
||||
"deletedby": "izbrisano s",
|
||||
"closedby": "zaprl",
|
||||
|
||||
"modalreason": "Kakšen je razlog za zaprtje tega ticket?",
|
||||
"chooseATicket": "Izberi ticket"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user