Skip to content

Commit

Permalink
Open Ticket v3.5.5
Browse files Browse the repository at this point in the history
Open Ticket v3.5.5
  • Loading branch information
DJj123dj committed May 10, 2024
2 parents 805c6b8 + 01c1f31 commit 5bdb794
Show file tree
Hide file tree
Showing 37 changed files with 442 additions and 127 deletions.
8 changes: 4 additions & 4 deletions .github/SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ Below, you can find a list with the status of every open ticket version. This li

| Version | Supported | Until |
|-----------|-----------|-----------------------------|
| 3.5.4 || |
| 3.5.3 || May 2024 |
| 3.5.2 | 🟧 | Next Update |
| 3.5.5 || |
| 3.5.4 || June 2024 |
| 3.5.3 | 🟧 | Next Update |
| < 3.5.2 || |

## Reporting a Vulnerability
Expand All @@ -32,7 +32,7 @@ The `openticketdebug.txt` file would also be handy to upload!<br>
Visit [Contributing.md](/.github/CONTRIBUTING.md) for rules about translating & adding features!

<br>
SECURITY POLICY - Last updated: 14/12/2023<br>
SECURITY POLICY - Last updated: 4/5/2024<br>
© DJdj Development<br><br>
Website: https://www.dj-dj.be <br>
Discord: https://discord.dj-dj.be <br>
Expand Down
27 changes: 16 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ There will be massive improvements for more stability & features! But the best p

<img src="https://apis.dj-dj.be/cdn/openticket/logo.png" alt="Open Ticket" width="600px">

[![discord](https://img.shields.io/badge/discord-join%20our%20server-5865F2.svg?style=flat-square&logo=discord)](https://discord.com/invite/26vT9wt3n3) [![version](https://img.shields.io/badge/version-3.5.4-brightgreen.svg?style=flat-square)](https://github.com/DJj123dj/open-ticket/releases/tag/v3.5.4) [![discord.js](https://img.shields.io/badge/discord.js-v14-CB3837.svg?style=flat-square&logo=npm)]() [![license](https://img.shields.io/badge/license-GPL%203.0-important.svg?style=flat-square)](https://github.com/DJj123dj/open-ticket/blob/main/LICENSE) [![stars](https://img.shields.io/github/stars/djj123dj/open-ticket?color=yellow&label=stars&logo=github&style=flat-square)](https://otdocs.dj-dj.be)
[![discord](https://img.shields.io/badge/discord-join%20our%20server-5865F2.svg?style=flat-square&logo=discord)](https://discord.com/invite/26vT9wt3n3) [![version](https://img.shields.io/badge/version-3.5.5-brightgreen.svg?style=flat-square)](https://github.com/DJj123dj/open-ticket/releases/tag/v3.5.5) [![discord.js](https://img.shields.io/badge/discord.js-v14-CB3837.svg?style=flat-square&logo=npm)]() [![license](https://img.shields.io/badge/license-GPL%203.0-important.svg?style=flat-square)](https://github.com/DJj123dj/open-ticket/blob/main/LICENSE) [![stars](https://img.shields.io/github/stars/djj123dj/open-ticket?color=yellow&label=stars&logo=github&style=flat-square)](https://otdocs.dj-dj.be)

### Open Ticket
Open Ticket is the most customisable discord ticket bot that you will ever find! There are more than 150 options to customise in the config! This includes html transcripts, unlimited tickets, custom embeds & more! Did you know that even the html transcripts are highly customisable? Don't wait and check it out! If you're having trouble setting the bot up, feel free to join our support server and we will help you further!

Take a look at all the features and discover the possibilities!
### [Visit the Documentation!](https://otdocs.dj-dj.be/)

## Features
## 📌 Features
- **🎉 advanced html transcripts!**
- 🔒 close, ❌ delete & ✅ re-open tickets
- 🇬🇧 translation in 22 different languages
- 🇬🇧 translation in 24 different languages
- 📄 very advanced customisation
- 🆗 buttons or 🔽 dropdowns!
- 🆒 custom plugins
Expand All @@ -28,22 +28,26 @@ Take a look at all the features and discover the possibilities!
- 🖥️ discord.js v14 & axios
- 🎛️ latest discord integration

## preview
## 📸 Preview
<img src="https://apis.dj-dj.be/cdn/openticket/message_buttons.png" alt="Message with buttons" width="350px">
<img src="https://apis.dj-dj.be/cdn/openticket/message_dropdown.png" alt="Message with dropdown" width="350px">
<br>
<img src="https://apis.dj-dj.be/cdn/openticket/firstmsg.png" alt="Ticket start message" width="350px">
<img src="https://apis.dj-dj.be/cdn/openticket/command_close.png" alt="Ticket start message" width="350px">

## 🩷 Sponsors
A big thanks to all our sponsors!
- <img src="https://github.com/SpyEye2.png" alt="Profile Picture" width="25px"></img> **[SpyeEye](https://github.com/SpyEye2)**
- <img src="https://github.com/DOSEV5.png" alt="Profile Picture" width="25px"></img> **[DOSEV5](https://github.com/DOSEV5)**
- <img src="https://github.com/mods-hd.png" alt="Profile Picture" width="25px"></img> **[Mods HD](https://github.com/mods-hd)**

## credits
### Developer Team
## 🛠️ Contributors
### Official Team
|Role |User (discord name)|
|-----------------|-------------------|
|Lead Developer |djj123dj |
|Developer |sankedev |
|Support Team |lover_catss |
|Designer |vuur_draak |
|Support Team |sankedev |
|Support Team |vuur_draak |

### Translators
|Language |Maintainer (discord name) |Status |
Expand Down Expand Up @@ -71,9 +75,10 @@ Take a look at all the features and discover the possibilities!
|Kurdish |raze.hama |🟢 Up To Date |
|Hungarian |Snowy |🔴 Outdated |
|Persian |sasanwm |🟢 Up To Date |
|Latvian |ronalds1398 |🟢 Up To Date |

## links
current version: _v3.5.4_
## Links
current version: _v3.5.5_
</br>changelog: [click here](https://otgithub.dj-dj.be/releases)
</br>documentation: [click here](https://otdocs.dj-dj.be/)

Expand Down
22 changes: 20 additions & 2 deletions commands/add.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,16 @@ module.exports = () => {
return
}

msg.channel.permissionOverwrites.create(user.id, { ViewChannel:true, AddReactions:true,AttachFiles:true, EmbedLinks:true, SendMessages:true})
/**@type {discord.PermissionOverwriteManager} */
const overwrites = msg.channel.permissionOverwrites
overwrites.create(user.id,{
ViewChannel:true,
AddReactions:true,
AttachFiles:true,
EmbedLinks:true,
SendMessages:true,
ReadMessageHistory:true
},{reason:"Added user to ticket."})
msg.channel.send({embeds:[bot.embeds.commands.addEmbed(user,msg.author)]})

var loguser = msg.mentions.users.first()
Expand Down Expand Up @@ -59,7 +68,16 @@ module.exports = () => {

await interaction.deferReply()

interaction.channel.permissionOverwrites.create(user.id, { ViewChannel:true, AddReactions:true,AttachFiles:true, EmbedLinks:true, SendMessages:true})
/**@type {discord.PermissionOverwriteManager} */
const overwrites = interaction.channel.permissionOverwrites
overwrites.create(user.id,{
ViewChannel:true,
AddReactions:true,
AttachFiles:true,
EmbedLinks:true,
SendMessages:true,
ReadMessageHistory:true
},{reason:"Added user to ticket."})
interaction.editReply({embeds:[bot.embeds.commands.addEmbed(user,interaction.user)]})

var loguser = user
Expand Down
8 changes: 6 additions & 2 deletions commands/remove.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ module.exports = () => {
return
}

msg.channel.permissionOverwrites.delete(user.id)
/**@type {discord.PermissionOverwriteManager} */
const overwrites = msg.channel.permissionOverwrites
overwrites.delete(user.id,"Removed user from ticket.")
msg.channel.send({embeds:[bot.embeds.commands.removeEmbed(user,msg.author)]})

var loguser = msg.mentions.users.first()
Expand Down Expand Up @@ -59,7 +61,9 @@ module.exports = () => {

await interaction.deferReply()

interaction.channel.permissionOverwrites.delete(user.id)
/**@type {discord.PermissionOverwriteManager} */
const overwrites = interaction.channel.permissionOverwrites
overwrites.delete(user.id,"Removed user from ticket.")
interaction.editReply({embeds:[bot.embeds.commands.removeEmbed(user,interaction.user)]})

var loguser = user
Expand Down
2 changes: 1 addition & 1 deletion config.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
"dropdown":false,

"enableFooter":false,
"footer":"Open Ticket v3.5.4 - I'm a footer!",
"footer":"Open Ticket v3.5.5 - I'm a footer!",

"enableFooterImage":false,
"footerImage":"https://www.example.com/catmemes/cat.png",
Expand Down
3 changes: 2 additions & 1 deletion core/checker.js
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,8 @@ exports.checker = async () => {
"hungarian",
"indonesian",
"kurdish",
"persian"
"persian",
"latvian"
]
if (!languageList.some((l) => config.languageFile.startsWith(l))){
createError("'languageFile' | invalid language, more info in the wiki")
Expand Down
4 changes: 4 additions & 0 deletions core/interactionHandlers/buttons/firstmsg.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ exports.firstmsgRowNormal = new arb()
.setDisabled(false)
.setStyle(bs.Success)
.setLabel("Claim Ticket")
.setEmoji("📌")
)
.addComponents(
new button()
Expand All @@ -46,6 +47,7 @@ exports.firstmsgRowDisabled = new arb()
.setDisabled(false)
.setStyle(bs.Success)
.setLabel("Claim Ticket")
.setEmoji("📌")
)
.addComponents(
new button()
Expand All @@ -71,6 +73,7 @@ exports.firstmsgRowNormalNoClaim = new arb()
.setDisabled(true)
.setStyle(bs.Secondary)
.setLabel("Claim Ticket")
.setEmoji("📌")
)
.addComponents(
new button()
Expand All @@ -96,6 +99,7 @@ exports.firstmsgRowDisabledNoClaim = new arb()
.setDisabled(true)
.setStyle(bs.Secondary)
.setLabel("Claim Ticket")
.setEmoji("📌")
)
.addComponents(
new button()
Expand Down
16 changes: 8 additions & 8 deletions core/ticketActions/ticketOpener.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,11 @@ module.exports = () => {
} catch{}
}

if (storage.get("amountOfUserTickets",interaction.member.id) == null || storage.get("amountOfUserTickets",interaction.member.id) == "false"|| Number(storage.get("amountOfUserTickets",interaction.member.id)) <= config.system.maxAmountOfTickets){
const currentUserTicketAmount = storage.get("amountOfUserTickets",interaction.member.id)
if (config.system.maxAmountOfTickets == 0 || !currentUserTicketAmount || currentUserTicketAmount == "false" || Number(currentUserTicketAmount) < config.system.maxAmountOfTickets){

//update storage
storage.set("amountOfUserTickets",interaction.member.id,Number(storage.get("amountOfUserTickets",interaction.member.id))+1)
storage.set("amountOfUserTickets",interaction.member.id,Number(currentUserTicketAmount)+1)
var ticketNumber = interaction.member.user.username

//set ticketName
Expand Down Expand Up @@ -96,7 +97,7 @@ module.exports = () => {
permissionsArray.push({
id:interaction.member.user,
type:"member",
allow:[pfb.AddReactions,pfb.AttachFiles,pfb.EmbedLinks,pfb.SendMessages,pfb.ViewChannel]
allow:[pfb.AddReactions,pfb.AttachFiles,pfb.EmbedLinks,pfb.SendMessages,pfb.ViewChannel,pfb.ReadMessageHistory]
})

//add main adminroles
Expand All @@ -108,7 +109,7 @@ module.exports = () => {
permissionsArray.push({
id:adminrole,
type:"role",
allow:[pfb.AddReactions,pfb.AttachFiles,pfb.EmbedLinks,pfb.SendMessages,pfb.ViewChannel]
allow:[pfb.AddReactions,pfb.AttachFiles,pfb.EmbedLinks,pfb.SendMessages,pfb.ViewChannel,pfb.ReadMessageHistory]
})
}catch{}
})
Expand All @@ -127,7 +128,7 @@ module.exports = () => {
permissionsArray.push({
id:adminrole,
type:"role",
allow:[pfb.AddReactions,pfb.AttachFiles,pfb.EmbedLinks,pfb.SendMessages,pfb.ViewChannel]
allow:[pfb.AddReactions,pfb.AttachFiles,pfb.EmbedLinks,pfb.SendMessages,pfb.ViewChannel,pfb.ReadMessageHistory]
})
}catch{}
}
Expand All @@ -144,7 +145,7 @@ module.exports = () => {
permissionsArray.push({
id:adminrole,
type:"role",
allow:[pfb.AddReactions,pfb.ViewChannel],
allow:[pfb.AddReactions,pfb.ViewChannel,pfb.ReadMessageHistory],
deny:[pfb.SendMessages,pfb.AttachFiles,pfb.EmbedLinks]
})
}catch{}
Expand Down Expand Up @@ -248,14 +249,13 @@ module.exports = () => {
}
catch{log("system","failed to send DM")}

if ((interaction.isButton() && config.system.answerInEphemeralOnOpen) || interaction.isChatInputCommand()){
if (((interaction.isButton() || interaction.isStringSelectMenu()) && config.system.answerInEphemeralOnOpen) || interaction.isChatInputCommand()){
if (interaction.deferred){
interaction.editReply({embeds:[bot.errorLog.success(l.messages.createdTitle,l.messages.createdDescription)],components:[channelbutton]})
}else{
interaction.reply({embeds:[bot.errorLog.success(l.messages.createdTitle,l.messages.createdDescription)],components:[channelbutton]})
}
}

})
}else{
interaction.editReply({embeds:[bot.errorLog.warning(l.errors.maxAmountTitle,l.errors.maxAmountDescription)]})
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
INFORMATION:
============
Open Ticket v3.5.4 - © DJdj Development
Open Ticket v3.5.5 - © DJdj Development
discord: https://discord.dj-dj.be
website: https://www.dj-dj.be
Expand Down
2 changes: 1 addition & 1 deletion language/arabic.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"_CREDITS":"deqressing",
"_INFO":"This file is a translation for open ticket 3.5.4",
"_INFO":"This file is a translation for open ticket 3.5.5",

"errors": {
"missingArgsTitle": "قيمة غير صالحة!",
Expand Down
Loading

0 comments on commit 5bdb794

Please sign in to comment.