Open Ticket v3.5.0

Open Ticket v3.5.0
This commit is contained in:
Jasper
2023-12-17 14:13:30 +01:00
committed by GitHub
63 changed files with 1769 additions and 294 deletions
+6 -5
View File
@@ -9,14 +9,15 @@ If there is translation missing & you can write json, then go to the next step!
### Step 2: translating
**RULES:**
- Always upload to the [__`dev` branch!__](https://github.com/DJj123dj/open-ticket/tree/dev)
- Always upload or create a pull request to the [__`dev` branch!__](https://github.com/DJj123dj/open-ticket/tree/dev)
- Don't change anything else, except the translation you are adding!
- Translations are checked before uploading, so don't write things that aren't specified in the json file
- Always start translating from `english.json` or `custom.json`! Never from another language.
If you translate, you need to change 2 files! The first one is required, the other one is optional & will be added by us if you don't do it!
If you translate, you need to change 2 files! The first one is required, the other 2 are optional & will be added by us if you don't do it!
1. add `yourlanguage.json` to the `/language/` directory
2. (OPTIONAL) add your discord name & tag in the translator table in `README.md`
2. add your username to the `_CREDITS` part of `yourlanguage.json`!
3. add your discord username in the translator table in `README.md`
### Step 3: waiting
Translations will always be added in the **next version** of Open Ticket! They will never be added to the `main` branch directly without anything else! This means that it can take some time before your translation is in the official version!
@@ -28,10 +29,10 @@ But don't worry! You can already write some plugins!
**RULES:**
- Always specify the versions that the plugin is compatible with!
- If extra npm dependencies are needed, then they also need to be specified!
- If there are errors while you write a plugin/edit the code in some way. Then we can't help you with fixing the bug. We only fix bugs that are part of an unedited version of Open Ticket!
- If there are errors while you write a plugin/edit the code in some way. Then we can't help you with fixing the bug. We only fix bugs that are part of the original unedited version of Open Ticket!
## Other versions of contributing
If you want to contribute in another way, feel free to join [our discord server](https://discord.dj-dj.be) & talk about how you are going to do it. We will always help you!
If you want to contribute in another way, feel free to join [our discord server](https://discord.dj-dj.be) & talk about how you are going to do it. We will always help you further!
<br>
CONTRIBUTING GUIDELINES - Last updated: 23/3/2023<br>
+16 -15
View File
@@ -2,7 +2,7 @@
## Supported Versions
Support for Open Ticket is only available for the versions specified below!
We only support Open Ticket versions listed below! With support, we mean bugs, errors & helping you further!
✅ Supported
🟧 Partially Supported
@@ -10,30 +10,31 @@ Support for Open Ticket is only available for the versions specified below!
| Version | Supported |
|-----------|-------------------|
| 3.5.0 | ✅ |
| 3.4.4 | ✅ |
| 3.4.2 | ✅ |
| 3.4.1 | 🟧 |
| < 3.4.1 | ❌ |
| 3.4.3 | 🟧 |
| 3.4.2 | 🟧 |
| < 3.4.2 | ❌ |
## Reporting a Vulnerability
You can report Vulnerabilities, errors & bugs in the following ways:
You can report Vulnerabilities, Errors & Bugs using one of the methods below:
- Create an issue on github
- Create a ticket in our [discord server](https://discord.dj-dj.be)
- Report the bug in DM on discord (djj123dj)
- Email [support@dj-dj.be](mailto:support@dj-dj.be)
- Creating an issue on github
- Creating a ticket in our discord server
- Reporting the bug in DM on discord (DJj123dj#1706)
- Emailing support@dj-dj.be
If your report an error, be clear about what is going on.
Specify the version & language of the bot together with when the error happend. (for example: when I click the close button)
Send screenshots from the error if possible, and send openticketdebug.txt (or a screenshot of it) to us.
Don't just report the error and never reply again! It can be possible that we need you for more information!
While reporting your problem, please be clear about what the problem is.
We would like to know the issue in as much detail as possible.
If possible, try to provide screenshots!
The `openticketdebug.txt` file would also be handy to upload!<br>
**Always specify the version of open ticket that you are working with and if you have modified it or not!**
## Contributing
Visit [Contributing.md](/.github/CONTRIBUTING.md) for rules about translating & adding features!
<br>
SECURITY POLICY - Last updated: 9/11/2023<br>
SECURITY POLICY - Last updated: 14/12/2023<br>
© DJdj Development<br><br>
Website: https://www.dj-dj.be <br>
Discord: https://discord.dj-dj.be <br>
+1
View File
@@ -13,6 +13,7 @@ storage/dynamicDB/
storage/slashcmdEnabled.txt
storage/database.json
storage/tsdatabase.json
storage/stats.json
storage/.DS_Store
.vscode/
livestatus.json
+47 -41
View File
@@ -1,22 +1,20 @@
# Coming Soon: OPEN TICKET v4.0 🎉
Open Ticket v4 is open ticket, but writting from the ground up! For the first time ever!
There will be a massive improvement with the API that allows for plugins 30 times more advanced than the current ones! It will also be more stable and faster!
It is expected to have a public beta release somewhere around 30 September!
Open Ticket v4 will be the first fully rewritten version of Open Ticket!
There will be massive improvements for more stability & features! But the best part of all is that the API will be 50x more advanced than the current API! This way, you can write every plugin you ever imagined!
<hr>
<img src="https://www.dj-dj.be/wp-content/uploads/2023/02/open-ticket-cropped.png" alt="Open Ticket" width="600px">
<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.4.4-brightgreen.svg?style=flat-square)](https://github.com/DJj123dj/open-ticket/releases/tag/v3.4.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://docs.openticket.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.0-brightgreen.svg?style=flat-square)](https://github.com/DJj123dj/open-ticket/releases/tag/v3.5.0) [![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://docs.openticket.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 amount of 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!
### [Documentation](https://docs.openticket.dj-dj.be/quick-start)
### [Visit the Documentation!](https://docs.openticket.dj-dj.be/quick-start)
## Features
- **🎉 NEW! html transcripts V2!**
- **🎉 advanced html transcripts!**
- 🔒 close, ❌ delete & ✅ re-open tickets
- 🇬🇧 translation in 19 different languages
- 📄 very advanced customisation
@@ -24,55 +22,63 @@ Take a look at all the features and discover the possibilities!
- 🆒 plugins
- ∞ unlimited tickets & unlimited messages
- ➕➖ add/remove users from a ticket
- 📊 ticket, user & global staticstics
- /slash & text commands
<details>
<summary><b>Click here for even more features!</b></summary>
<summary><b>But wait, there are even more features! Click here to discover!</b></summary>
- very customisable
- fully customisable embeds & buttons
- close tickets with reason
- also includes reaction roles!
- reaction roles (or verification system)
- discord interaction buttons
- discord.js 14
- discord.js v14
</details>
## preview
Images coming soon<br>
You can already see some images at our [documentation!](https://docs.openticket.dj-dj.be)
<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">
## credits
DJdj Development Team
|Main Developer|Developer |Support Team|Designer|
|--------------|------------|-----------|---------|
|djj123dj |sankedev |DJ-Lite |vuur_draak|
### Developer Team
|Role |User (discord name)|
|-----------------|-------------------|
|Lead Developer |djj123dj |
|Developer |sankedev |
|Support Team |lover_catss |
|Designer |vuur_draak |
Translators
|Language |Translator |
|--------------|-------------------------|
|Dutch |djj123dj |
|Romanian |sankedev |
|French |sankedev |
|Spanish |redactado & josuens |
|German |david.3 |
|Italian |maurizio26 |
|Czech |t0miiis#3022 |
|Arabic |Sarcastic#9318 |
|Danish |.the_gamer |
|Portuguese |quiradon |
|Russian |apexo |
|Turkish |Hydra#0009 |
|Polish |mkevas |
|Slovenian |n1kkec |
|Thai |modshd |
|Norwegian |noonenook |
|Greek |stefanos#5739 |
|Ukrainian |anderskiy |
### Translators
|Language |Maintainer (discord name) |Status |
|-------------------|--------------------------|--------------------------------|
|English |djj123dj |🟢 Up To Date |
|Dutch |djj123dj |🟢 Up To Date |
|French |sankedev |🟠 Will be updated next version |
|Romanian |sankedev |🟢 Up To Date |
|Spanish |redactado & josuens |🟠 Will be updated next version |
|German |david.3 |🟢 Up To Date |
|Italian |maurizio26 |🟠 Will be updated next version |
|Czech |spyeye_ |🟢 Up To Date |
|Arabic |Sarcastic#9318 |🔴 Outdated |
|Danish |.the_gamer |🟢 Up To Date |
|Portuguese |quiradon |🟠 Will be updated next version |
|Russian |apexo & ander |🟢 Up To Date |
|Ukrainian |ander |🟢 Up To Date |
|Turkish |Hydra#0009 |🔴 Outdated |
|Polish |mkevas |🟠 Will be updated next version |
|Slovenian |n1kkec |🔴 Outdated |
|Thai |modshd |🟢 Up To Date |
|Norwegian |noonenook |🟠 Will be updated next version |
|Greek |stefanos__. |🔴 Outdated |
## links
current version: _v3.4.4_
</br>changelog: [click here](https://docs.openticket.dj-dj.be/other/changelog)
current version: _v3.5.0_
</br>changelog: [click here](https://otgithub.dj-dj.be/releases)
</br>documentation: [click here](https://docs.openticket.dj-dj.be/quick-start)
© 2023 - DJdj Development | [website](https://www.dj-dj.be) | [discord](https://discord.dj-dj.be) | [terms of service](https://www.dj-dj.be/terms)
+13 -11
View File
@@ -18,15 +18,16 @@ module.exports = () => {
if (!user) return msg.channel.send({embeds:[bot.errorLog.invalidArgsMessage(l.errors.missingArgsDescription+" `<user>`:\n`"+config.prefix+"add <user>`")]})
if (!msg.guild) return
if (!permsChecker.command(msg.author.id,msg.guild.id)){
permsChecker.sendUserNoPerms(msg.author)
return
}
const hiddendata = bot.hiddenData.readHiddenData(msg.channel.id)
if (hiddendata.length < 1) return msg.channel.send({embeds:[bot.errorLog.notInATicket]})
const ticketId = hiddendata.find(d => d.key == "type").value
if (!permsChecker.ticket(msg.author.id,msg.guild.id,ticketId)){
permsChecker.sendUserNoPerms(msg.author)
return
}
msg.channel.permissionOverwrites.create(user.id, { ViewChannel:true, AddReactions:true,AttachFiles:true, EmbedLinks:true, SendMessages:true})
msg.channel.send({embeds:[bot.embeds.commands.addEmbed(user,msg.author)]})
@@ -37,7 +38,7 @@ module.exports = () => {
const ticketData = require("../core/utils/configParser").getTicketById(ticketId,true)
APIEvents.onTicketAdd(msg.author,loguser,msg.channel,msg.guild,new Date(),{status:"open",name:msg.channel.name,ticketOptions:ticketData})
APIEvents.onCommand("add",permsChecker.command(msg.author.id,msg.guild.id),msg.author,msg.channel,msg.guild,new Date())
APIEvents.onCommand("add",permsChecker.ticket(msg.author.id,msg.guild.id,ticketId),msg.author,msg.channel,msg.guild,new Date())
})
if (!DISABLE.commands.slash.add) client.on("interactionCreate",async (interaction) => {
@@ -46,17 +47,18 @@ module.exports = () => {
const user = interaction.options.getUser("user")
if (!interaction.guild) return
if (!permsChecker.command(interaction.user.id,interaction.guild.id)){
const hiddendata = bot.hiddenData.readHiddenData(interaction.channel.id)
if (hiddendata.length < 1) return interaction.editReply({embeds:[bot.errorLog.notInATicket]})
const ticketId = hiddendata.find(d => d.key == "type").value
if (!permsChecker.ticket(interaction.user.id,interaction.guild.id,ticketId)){
permsChecker.sendUserNoPerms(interaction.user)
return
}
await interaction.deferReply()
const hiddendata = bot.hiddenData.readHiddenData(interaction.channel.id)
if (hiddendata.length < 1) return interaction.editReply({embeds:[bot.errorLog.notInATicket]})
const ticketId = hiddendata.find(d => d.key == "type").value
interaction.channel.permissionOverwrites.create(user.id, { ViewChannel:true, AddReactions:true,AttachFiles:true, EmbedLinks:true, SendMessages:true})
interaction.editReply({embeds:[bot.embeds.commands.addEmbed(user,interaction.user)]})
@@ -66,7 +68,7 @@ module.exports = () => {
const ticketData = require("../core/utils/configParser").getTicketById(ticketId,true)
APIEvents.onTicketAdd(interaction.user,loguser,interaction.channel,interaction.guild,new Date(),{status:"open",name:interaction.channel.name,ticketOptions:ticketData})
APIEvents.onCommand("add",permsChecker.command(interaction.user.id,interaction.guild.id),interaction.user,interaction.channel,interaction.guild,new Date())
APIEvents.onCommand("add",permsChecker.ticket(interaction.user.id,interaction.guild.id,ticketId),interaction.user,interaction.channel,interaction.guild,new Date())
})
}
+13 -10
View File
@@ -17,15 +17,16 @@ module.exports = () => {
if (!msg.channel.isTextBased()) return
if (!msg.guild) return
if (!permsChecker.command(msg.author.id,msg.guild.id)){
permsChecker.sendUserNoPerms(msg.author)
return
}
const hiddendata = bot.hiddenData.readHiddenData(msg.channel.id)
if (hiddendata.length < 1) return msg.channel.send({embeds:[bot.errorLog.notInATicket]})
const ticketId = hiddendata.find(d => d.key == "type").value
if (!permsChecker.ticket(msg.author.id,msg.guild.id,ticketId)){
permsChecker.sendUserNoPerms(msg.author)
return
}
const list = []
config.options.forEach((o) => {
if (o.type == "ticket") list.push(o.id)
@@ -67,7 +68,7 @@ module.exports = () => {
log("command","someone used the 'change' command",[{key:"user",value:msg.author.username}])
log("system","ticket type changed",[{key:"user",value:msg.author.username},{key:"ticket",value:name},{key:"newtype",value:newtype}])
APIEvents.onCommand("change",permsChecker.command(msg.author.id,msg.guild.id),msg.author,msg.channel,msg.guild,new Date())
APIEvents.onCommand("change",permsChecker.ticket(msg.author.id,msg.guild.id,ticketId),msg.author,msg.channel,msg.guild,new Date())
})
if (!DISABLE.commands.slash.change) client.on("interactionCreate",async (interaction) => {
@@ -76,15 +77,17 @@ module.exports = () => {
if (!interaction.channel.isTextBased()) return
if (!interaction.guild) return
if (!permsChecker.command(interaction.user.id,interaction.guild.id)){
const hiddendata = bot.hiddenData.readHiddenData(interaction.channel.id)
if (hiddendata.length < 1) return interaction.editReply({embeds:[bot.errorLog.notInATicket]})
const ticketId = hiddendata.find(d => d.key == "type").value
if (!permsChecker.ticket(interaction.user.id,interaction.guild.id,ticketId)){
permsChecker.sendUserNoPerms(interaction.user)
return
}
await interaction.deferReply()
const hiddendata = bot.hiddenData.readHiddenData(interaction.channel.id)
if (hiddendata.length < 1) return interaction.editReply({embeds:[bot.errorLog.notInATicket]})
const ticketId = hiddendata.find(d => d.key == "type").value
const list = []
config.options.forEach((o) => {
@@ -126,6 +129,6 @@ module.exports = () => {
log("command","someone used the 'change' command",[{key:"user",value:interaction.user.username}])
log("system","ticket type changed",[{key:"user",value:interaction.user.username},{key:"ticket",value:name},{key:"newtype",value:newtype}])
APIEvents.onCommand("change",permsChecker.command(interaction.user.id,interaction.guild.id),interaction.user,interaction.channel,interaction.guild,new Date())
APIEvents.onCommand("change",permsChecker.ticket(interaction.user.id,interaction.guild.id,ticketId),interaction.user,interaction.channel,interaction.guild,new Date())
})
}
+13 -11
View File
@@ -21,15 +21,16 @@ module.exports = () => {
const claimingUser = user ? user : msg.author
if (!msg.guild) return
if (!permsChecker.command(msg.author.id,msg.guild.id)){
permsChecker.sendUserNoPerms(msg.author)
return
}
const hiddendata = bot.hiddenData.readHiddenData(msg.channel.id)
if (hiddendata.length < 1) return msg.channel.send({embeds:[bot.errorLog.notInATicket]})
const ticketId = hiddendata.find(d => d.key == "type").value
if (!permsChecker.ticket(msg.author.id,msg.guild.id,ticketId)){
permsChecker.sendUserNoPerms(msg.author)
return
}
hiddendata.push({key:"claimedby",value:claimingUser.id})
bot.hiddenData.writeHiddenData(msg.channel.id,hiddendata)
storage.set("claimData",msg.channel.id,claimingUser.id)
@@ -55,7 +56,7 @@ module.exports = () => {
const ticketData = require("../core/utils/configParser").getTicketById(ticketId,true)
APIEvents.onTicketClaim(msg.author,loguser,msg.channel,msg.guild,new Date(),{status:"open",name:msg.channel.name,ticketOptions:ticketData})
APIEvents.onCommand("claim",permsChecker.command(msg.author.id,msg.guild.id),msg.author,msg.channel,msg.guild,new Date())
APIEvents.onCommand("claim",permsChecker.ticket(msg.author.id,msg.guild.id,ticketId),msg.author,msg.channel,msg.guild,new Date())
})
if (!DISABLE.commands.slash.claim) client.on("interactionCreate",async (interaction) => {
@@ -64,17 +65,18 @@ module.exports = () => {
const user = interaction.options.getUser("user",false) ? interaction.options.getUser("user",true) : interaction.user
if (!interaction.guild) return
if (!permsChecker.command(interaction.user.id,interaction.guild.id)){
const hiddendata = bot.hiddenData.readHiddenData(interaction.channel.id)
if (hiddendata.length < 1) return interaction.editReply({embeds:[bot.errorLog.notInATicket]})
const ticketId = hiddendata.find(d => d.key == "type").value
if (!permsChecker.ticket(interaction.user.id,interaction.guild.id,ticketId)){
permsChecker.sendUserNoPerms(interaction.user)
return interaction.reply({content:":x: "+l.errors.noPermsTitle,ephemeral:true})
}
await interaction.deferReply()
const hiddendata = bot.hiddenData.readHiddenData(interaction.channel.id)
if (hiddendata.length < 1) return interaction.editReply({embeds:[bot.errorLog.notInATicket]})
const ticketId = hiddendata.find(d => d.key == "type").value
hiddendata.push({key:"claimedby",value:user.id})
bot.hiddenData.writeHiddenData(interaction.channel.id,hiddendata)
storage.set("claimData",interaction.channel.id,user.id)
@@ -100,6 +102,6 @@ module.exports = () => {
const ticketData = require("../core/utils/configParser").getTicketById(ticketId,true)
APIEvents.onTicketClaim(interaction.user,user,interaction.channel,interaction.guild,new Date(),{status:"open",name:interaction.channel.name,ticketOptions:ticketData})
APIEvents.onCommand("claim",permsChecker.command(interaction.user.id,interaction.guild.id),interaction.user,interaction.channel,interaction.guild,new Date())
APIEvents.onCommand("claim",permsChecker.ticket(interaction.user.id,interaction.guild.id,ticketId),interaction.user,interaction.channel,interaction.guild,new Date())
})
}
+13 -11
View File
@@ -16,15 +16,16 @@ module.exports = () => {
if (!msg.content.startsWith(config.prefix+"delete")) return
if (!msg.guild) return
if (!permsChecker.command(msg.author.id,msg.guild.id)){
permsChecker.sendUserNoPerms(msg.author)
return
}
const hiddendata = bot.hiddenData.readHiddenData(msg.channel.id)
if (hiddendata.length < 1) return msg.channel.send({embeds:[bot.errorLog.notInATicket]})
const ticketId = hiddendata.find(d => d.key == "type").value
if (!permsChecker.ticket(msg.author.id,msg.guild.id,ticketId)){
permsChecker.sendUserNoPerms(msg.author)
return
}
msg.channel.send({embeds:[bot.embeds.commands.deleteEmbed(msg.author)]})
var name = msg.channel.name
@@ -39,7 +40,7 @@ module.exports = () => {
require("../core/ticketActions/ticketCloser").closeManager(msg.member,msg.channel,prefix,"delete",false,true)
log("command","someone used the 'delete' command",[{key:"user",value:msg.author.username}])
APIEvents.onCommand("delete",permsChecker.command(msg.author.id,msg.guild.id),msg.author,msg.channel,msg.guild,new Date())
APIEvents.onCommand("delete",permsChecker.ticket(msg.author.id,msg.guild.id,ticketId),msg.author,msg.channel,msg.guild,new Date())
})
@@ -48,17 +49,18 @@ module.exports = () => {
if (interaction.commandName != "delete") return
if (!interaction.guild) return
if (!permsChecker.command(interaction.user.id,interaction.guild.id)){
const hiddendata = bot.hiddenData.readHiddenData(interaction.channel.id)
if (hiddendata.length < 1) return interaction.editReply({embeds:[bot.errorLog.notInATicket]})
const ticketId = hiddendata.find(d => d.key == "type").value
if (!permsChecker.ticket(interaction.user.id,interaction.guild.id,ticketId)){
permsChecker.sendUserNoPerms(interaction.user)
return interaction.reply({embeds:[bot.errorLog.noPermsDelete(interaction.user)]})
}
await interaction.deferReply()
const hiddendata = bot.hiddenData.readHiddenData(interaction.channel.id)
if (hiddendata.length < 1) return interaction.editReply({embeds:[bot.errorLog.notInATicket]})
const ticketId = hiddendata.find(d => d.key == "type").value
interaction.editReply({embeds:[bot.embeds.commands.deleteEmbed(interaction.user)]})
var name = interaction.channel.name
@@ -73,6 +75,6 @@ module.exports = () => {
require("../core/ticketActions/ticketCloser").closeManager(interaction.member,interaction.channel,prefix,"delete",false,true)
log("command","someone used the 'delete' command",[{key:"user",value:interaction.user.username}])
APIEvents.onCommand("delete",permsChecker.command(interaction.user.id,interaction.guild.id),interaction.user,interaction.channel,interaction.guild,new Date())
APIEvents.onCommand("delete",permsChecker.ticket(interaction.user.id,interaction.guild.id,ticketId),interaction.user,interaction.channel,interaction.guild,new Date())
})
}
+3 -2
View File
@@ -21,7 +21,8 @@ module.exports = () => {
const header = l.helpMenu.header2
helpEmbed.setDescription(header+"`"+prefix+msgName+" <id>` ➜ _"+l.helpMenu.msgCmd+"_\n\n`"+prefix+"rename <name>` ➜ _"+l.helpMenu.renameCmd+"_\n`"+prefix+"close [reason]` ➜ _"+l.helpMenu.closeCmd+"_\n`"+prefix+"delete` ➜ _"+l.helpMenu.deleteCmd+"_\n`"+prefix+"reopen` ➜ _"+l.helpMenu.reopenCmd+"_\n\n`"+prefix+"add <user>` ➜ _"+l.helpMenu.addCmd+"_\n`"+prefix+"remove <user>` ➜ _"+l.helpMenu.removeCmd+"_\n\n`"+prefix+"change <newtype>` ➜ _"+l.helpMenu.changeCmd+"_\n`"+prefix+"claim [user]` ➜ _"+l.helpMenu.claimCmd+"_\n`"+prefix+"unclaim` ➜ _"+l.helpMenu.unclaimCmd+"_")
helpEmbed.addFields([
{name:"Autoclose",value:l.helpMenu.autocloseCmd+"\n`"+prefix+"autoclose enable <inactive time>`\n`"+prefix+"autoclose disable`"}
{name:"Autoclose",value:l.helpMenu.autocloseCmd+"\n`"+prefix+"autoclose enable <inactive time>`\n`"+prefix+"autoclose disable`"},
{name:"Stats",value:"Get statistics from the bot"+"\n`"+prefix+"stats global`\n`"+prefix+"stats ticket`\n`"+prefix+"stats user [user]`"}
])
var otherprefix = prefix.endsWith(" ") ? prefix.substring(0,prefix.length-1) : prefix
@@ -38,7 +39,7 @@ module.exports = () => {
}
if (args[1]){
if (!args[1].startsWith("close") && !args[1].startsWith("delete") && !args[1].startsWith("remove") && !args[1].startsWith("add") && !args[1].startsWith("msg") && !args[1].startsWith("remove") && !args[1].startsWith("rename") && !args[1].startsWith("reopen") && !args[1].startsWith("change") && !args[1].startsWith("claim") && !args[1].startsWith("unclaim")){
if (!args[1].startsWith("close") && !args[1].startsWith("delete") && !args[1].startsWith("remove") && !args[1].startsWith("add") && !args[1].startsWith("msg") && !args[1].startsWith("remove") && !args[1].startsWith("rename") && !args[1].startsWith("reopen") && !args[1].startsWith("change") && !args[1].startsWith("claim") && !args[1].startsWith("unclaim") && !args[1].startsWith("stats")){
msg.channel.send({embeds:[helpEmbed]})
log("command","someone used the 'help' command",[{key:"user",value:msg.author.username}])
APIEvents.onCommand("help",true,msg.author,msg.channel,msg.guild,new Date())
+13 -11
View File
@@ -18,15 +18,16 @@ module.exports = () => {
if (!user) return msg.channel.send({embeds:[bot.errorLog.invalidArgsMessage(l.errors.missingArgsDescription+" `<user>`:\n`"+config.prefix+"remove <user>`")]})
if (!msg.guild) return
if (!permsChecker.command(msg.author.id,msg.guild.id)){
permsChecker.sendUserNoPerms(msg.author)
return
}
const hiddendata = bot.hiddenData.readHiddenData(msg.channel.id)
if (hiddendata.length < 1) return msg.channel.send({embeds:[bot.errorLog.notInATicket]})
const ticketId = hiddendata.find(d => d.key == "type").value
if (!permsChecker.ticket(msg.author.id,msg.guild.id,ticketId)){
permsChecker.sendUserNoPerms(msg.author)
return
}
msg.channel.permissionOverwrites.delete(user.id)
msg.channel.send({embeds:[bot.embeds.commands.removeEmbed(user,msg.author)]})
@@ -37,7 +38,7 @@ module.exports = () => {
const ticketData = require("../core/utils/configParser").getTicketById(ticketId,true)
APIEvents.onTicketRemove(msg.author,loguser,msg.channel,msg.guild,new Date(),{status:"open",name:msg.channel.name,ticketOptions:ticketData})
APIEvents.onCommand("remove",permsChecker.command(msg.author.id,msg.guild.id),msg.author,msg.channel,msg.guild,new Date())
APIEvents.onCommand("remove",permsChecker.ticket(msg.author.id,msg.guild.id,ticketId),msg.author,msg.channel,msg.guild,new Date())
})
if (!DISABLE.commands.slash.remove) client.on("interactionCreate",async (interaction) => {
@@ -46,17 +47,18 @@ module.exports = () => {
const user = interaction.options.getUser("user")
if (!interaction.guild) return
if (!permsChecker.command(interaction.user.id,interaction.guild.id)){
const hiddendata = bot.hiddenData.readHiddenData(interaction.channel.id)
if (hiddendata.length < 1) return interaction.editReply({embeds:[bot.errorLog.notInATicket]})
const ticketId = hiddendata.find(d => d.key == "type").value
if (!permsChecker.ticket(interaction.user.id,interaction.guild.id,ticketId)){
permsChecker.sendUserNoPerms(interaction.user)
return
}
await interaction.deferReply()
const hiddendata = bot.hiddenData.readHiddenData(interaction.channel.id)
if (hiddendata.length < 1) return interaction.editReply({embeds:[bot.errorLog.notInATicket]})
const ticketId = hiddendata.find(d => d.key == "type").value
interaction.channel.permissionOverwrites.delete(user.id)
interaction.editReply({embeds:[bot.embeds.commands.removeEmbed(user,interaction.user)]})
@@ -67,6 +69,6 @@ module.exports = () => {
const ticketData = require("../core/utils/configParser").getTicketById(ticketId,true)
APIEvents.onTicketRemove(interaction.user,loguser,interaction.channel,interaction.guild,new Date(),{status:"open",name:interaction.channel.name,ticketOptions:ticketData})
APIEvents.onCommand("remove",permsChecker.command(interaction.user.id,interaction.guild.id),interaction.user,interaction.channel,interaction.guild,new Date())
APIEvents.onCommand("remove",permsChecker.ticket(interaction.user.id,interaction.guild.id,ticketId),interaction.user,interaction.channel,interaction.guild,new Date())
})
}
+13 -11
View File
@@ -16,15 +16,16 @@ module.exports = () => {
if (!msg.content.startsWith(config.prefix+"rename")) return
if (!msg.guild) return
if (!permsChecker.command(msg.author.id,msg.guild.id)){
permsChecker.sendUserNoPerms(msg.author)
return
}
const hiddendata = bot.hiddenData.readHiddenData(msg.channel.id)
if (hiddendata.length < 1) return msg.channel.send({embeds:[bot.errorLog.notInATicket]})
const ticketId = hiddendata.find(d => d.key == "type").value
if (!permsChecker.ticket(msg.author.id,msg.guild.id,ticketId)){
permsChecker.sendUserNoPerms(msg.author)
return
}
var newname = msg.content.split(config.prefix+"rename")[1].substring(1)
if (!newname) return msg.channel.send({embeds:[bot.errorLog.invalidArgsMessage(l.errors.missingArgsDescription+" `<name>`:\n`"+config.prefix+"rename <name>`")]})
@@ -44,7 +45,7 @@ module.exports = () => {
log("command","someone used the 'rename' command",[{key:"user",value:msg.author.username}])
log("system","ticket renamed",[{key:"user",value:msg.author.username},{key:"ticket",value:name},{key:"newname",value:newname}])
APIEvents.onCommand("rename",permsChecker.command(msg.author.id,msg.guild.id),msg.author,msg.channel,msg.guild,new Date())
APIEvents.onCommand("rename",permsChecker.ticket(msg.author.id,msg.guild.id,ticketId),msg.author,msg.channel,msg.guild,new Date())
})
if (!DISABLE.commands.slash.rename) client.on("interactionCreate",async (interaction) => {
@@ -52,17 +53,18 @@ module.exports = () => {
if (interaction.commandName != "rename") return
if (!interaction.guild) return
if (!permsChecker.command(interaction.user.id,interaction.guild.id)){
const hiddendata = bot.hiddenData.readHiddenData(interaction.channel.id)
if (hiddendata.length < 1) return interaction.editReply({embeds:[bot.errorLog.notInATicket]})
const ticketId = hiddendata.find(d => d.key == "type").value
if (!permsChecker.ticket(interaction.user.id,interaction.guild.id,ticketId)){
permsChecker.sendUserNoPerms(interaction.user)
return
}
await interaction.deferReply()
const hiddendata = bot.hiddenData.readHiddenData(interaction.channel.id)
if (hiddendata.length < 1) return interaction.editReply({embeds:[bot.errorLog.notInATicket]})
const ticketId = hiddendata.find(d => d.key == "type").value
var newname = interaction.options.getString("name")
var name = interaction.channel.name
var prefix = ""
@@ -81,6 +83,6 @@ module.exports = () => {
log("command","someone used the 'rename' command",[{key:"user",value:interaction.user.username}])
log("system","ticket renamed",[{key:"user",value:interaction.user.username},{key:"ticket",value:name},{key:"newname",value:newname}])
APIEvents.onCommand("rename",permsChecker.command(interaction.user.id,interaction.guild.id),interaction.user,interaction.channel,interaction.guild,new Date())
APIEvents.onCommand("rename",permsChecker.ticket(interaction.user.id,interaction.guild.id,ticketId),interaction.user,interaction.channel,interaction.guild,new Date())
})
}
+103
View File
@@ -0,0 +1,103 @@
const discord = require('discord.js')
const bot = require('../index')
const client = bot.client
const config = bot.config
const log = bot.errorLog.log
const l = bot.language
const permsChecker = require("../core/utils/permisssionChecker")
const APIEvents = require("../core/api/modules/events")
const DISABLE = require("../core/api/api.json").disable
module.exports = () => {
bot.errorLog.log("debug","COMMANDS: loaded stats.js")
if (!DISABLE.commands.text.stats) client.on("messageCreate",async (msg) => {
if (!msg.content.startsWith(config.prefix+"stats global") && !msg.content.startsWith(config.prefix+"stats ticket") && !msg.content.startsWith(config.prefix+"stats user")) return
if (!msg.guild) return
/**@type {"global"|"ticket"|"user"} */
const mode = msg.content.split(config.prefix+"stats ")[1]
if (mode == "global"){
//send global stats
msg.channel.send({embeds:[await bot.statsManager.createGlobalStatsEmbed()]})
}else if (mode == "user"){
//send user stats
const mention = msg.mentions.users.first()
if (mention){
//get user from mention
if (!bot.statsManager.existStats("user","TICKETS_CREATED",mention.id)){
msg.channel.send({embeds:[bot.errorLog.serverError(l.stats.errorUserNotFound)]})
return
}
msg.channel.send({embeds:[await bot.statsManager.createUserStatsEmbed(msg.guild,mention,msg.channel.id)]})
}else{
//use author as user
if (!bot.statsManager.existStats("user","TICKETS_CREATED",msg.author.id)){
msg.channel.send({embeds:[bot.errorLog.serverError(l.stats.errorUserNotFound)]})
return
}
msg.channel.send({embeds:[await bot.statsManager.createUserStatsEmbed(msg.guild,msg.author,msg.channel.id)]})
}
}else if (mode == "ticket"){
//send ticket stats
if (!bot.statsManager.existStats("ticket","STATUS",msg.channel.id)){
msg.channel.send({embeds:[bot.errorLog.notInATicket]})
return
}
msg.channel.send({embeds:[await bot.statsManager.createTicketStatsEmbed(msg.guild,msg.channel.id)]})
}
log("command","someone used the 'stats' command",[{key:"user",value:msg.author.username},{key:"mode",value:mode}])
APIEvents.onCommand("stats",true,msg.author,msg.channel,msg.guild,new Date())
})
if (!DISABLE.commands.slash.stats) client.on("interactionCreate",async (interaction) => {
if (!interaction.isChatInputCommand()) return
if (interaction.commandName != "stats") return
if (!interaction.guild) return
/**@type {"global"|"ticket"|"user"} */
const mode = interaction.options.getSubcommand(true)
await interaction.deferReply()
if (mode == "global"){
//send global stats
interaction.editReply({embeds:[await bot.statsManager.createGlobalStatsEmbed()]})
}else if (mode == "user"){
//send user stats
const mention = interaction.options.getUser("user",false)
if (mention){
//get user from mention
if (!bot.statsManager.existStats("user","TICKETS_CREATED",mention.id)){
interaction.editReply({embeds:[bot.errorLog.serverError(l.stats.errorUserNotFound)]})
return
}
interaction.editReply({embeds:[await bot.statsManager.createUserStatsEmbed(interaction.guild,mention,interaction.channel.id)]})
}else{
//use author as user
if (!bot.statsManager.existStats("user","TICKETS_CREATED",interaction.user.id)){
interaction.editReply({embeds:[bot.errorLog.serverError(l.stats.errorUserNotFound)]})
return
}
interaction.editReply({embeds:[await bot.statsManager.createUserStatsEmbed(interaction.guild,interaction.user,interaction.channel.id)]})
}
}else if (mode == "ticket"){
//send ticket stats
if (!bot.statsManager.existStats("ticket","STATUS",interaction.channel.id)){
interaction.editReply({embeds:[bot.errorLog.notInATicket]})
return
}
interaction.editReply({embeds:[await bot.statsManager.createTicketStatsEmbed(interaction.guild,interaction.channel.id)]})
}
log("command","someone used the 'stats' command",[{key:"user",value:interaction.user.username},{key:"mode",value:mode}])
APIEvents.onCommand("stats",true,interaction.user,interaction.channel,interaction.guild,new Date())
})
}
+4 -4
View File
@@ -23,7 +23,7 @@ module.exports = () => {
if (msg.content.startsWith(config.prefix+"msg"||config.prefix+"message")){
if (!msg.guild) return
if (!permsChecker.command(msg.author.id,msg.guild.id)){
if (!permsChecker.global(msg.author.id,msg.guild.id)){
permsChecker.sendUserNoPerms(msg.author)
return
}
@@ -39,7 +39,7 @@ module.exports = () => {
msg.channel.send({embeds:[embed],components:componentRows})
log("command","someone used the 'message' command",[{key:"user",value:msg.author.username},{key:"id",value:id}])
APIEvents.onCommand("message",permsChecker.command(msg.author.id,msg.guild.id),msg.author,msg.channel,msg.guild,new Date())
APIEvents.onCommand("message",permsChecker.global(msg.author.id,msg.guild.id),msg.author,msg.channel,msg.guild,new Date())
}
})
@@ -48,7 +48,7 @@ module.exports = () => {
if (interaction.commandName != "message") return
if (!interaction.guild) return
if (!permsChecker.command(interaction.user.id,interaction.guild.id)){
if (!permsChecker.global(interaction.user.id,interaction.guild.id)){
permsChecker.sendUserNoPerms(interaction.user)
return
}
@@ -64,7 +64,7 @@ module.exports = () => {
log("command","someone used the 'message' command",[{key:"user",value:interaction.user.username},{key:"id",value:id}])
APIEvents.onCommand("message",permsChecker.command(interaction.user.id,interaction.guild.id),interaction.user,interaction.channel,interaction.guild,new Date())
APIEvents.onCommand("message",permsChecker.global(interaction.user.id,interaction.guild.id),interaction.user,interaction.channel,interaction.guild,new Date())
})
}
+14 -12
View File
@@ -18,7 +18,12 @@ module.exports = () => {
if (!msg.content.startsWith(config.prefix+"unclaim")) return
if (!msg.guild) return
if (!permsChecker.command(msg.author.id,msg.guild.id)){
const hiddendata = bot.hiddenData.readHiddenData(msg.channel.id)
if (hiddendata.length < 1) return msg.channel.send({embeds:[bot.errorLog.notInATicket]})
const ticketId = hiddendata.find(d => d.key == "type").value
if (!permsChecker.ticket(msg.author.id,msg.guild.id,ticketId)){
permsChecker.sendUserNoPerms(msg.author)
return
}
@@ -26,10 +31,6 @@ module.exports = () => {
const unclaimuser = storage.get("claimData",msg.channel.id)
if (!unclaimuser || unclaimuser == "false") return msg.channel.send({embeds:[bot.errorLog.serverError("This ticket isn't claimed yet!")]})
const hiddendata = bot.hiddenData.readHiddenData(msg.channel.id)
if (hiddendata.length < 1) return msg.channel.send({embeds:[bot.errorLog.notInATicket]})
const ticketId = hiddendata.find(d => d.key == "type").value
hiddendata.push({key:"claimedby",value:"false"})
bot.hiddenData.writeHiddenData(msg.channel.id,hiddendata)
storage.set("claimData",msg.channel.id,"false")
@@ -62,7 +63,7 @@ module.exports = () => {
APIEvents.onTicketUnclaim(msg.author,msg.channel,msg.guild,new Date(),{status:"open",name:msg.channel.name,ticketOptions:ticketData})
APIEvents.onCommand("unclaim",permsChecker.command(msg.author.id,msg.guild.id),msg.author,msg.channel,msg.guild,new Date())
APIEvents.onCommand("unclaim",permsChecker.ticket(msg.author.id,msg.guild.id,ticketId),msg.author,msg.channel,msg.guild,new Date())
})
})
@@ -71,7 +72,12 @@ module.exports = () => {
if (interaction.commandName != "unclaim") return
if (!interaction.guild) return
if (!permsChecker.command(interaction.user.id,interaction.guild.id)){
const hiddendata = bot.hiddenData.readHiddenData(interaction.channel.id)
if (hiddendata.length < 1) return interaction.editReply({embeds:[bot.errorLog.notInATicket]})
const ticketId = hiddendata.find(d => d.key == "type").value
if (!permsChecker.ticket(interaction.user.id,interaction.guild.id,ticketId)){
permsChecker.sendUserNoPerms(interaction.user)
interaction.reply({content:":x: "+l.errors.noPermsTitle,ephemeral:true})
return
@@ -82,10 +88,6 @@ module.exports = () => {
const unclaimuser = storage.get("claimData",interaction.channel.id)
if (!unclaimuser || unclaimuser == "false") return interaction.editReply({embeds:[bot.errorLog.serverError("This ticket isn't claimed yet!")]})
const hiddendata = bot.hiddenData.readHiddenData(interaction.channel.id)
if (hiddendata.length < 1) return interaction.editReply({embeds:[bot.errorLog.notInATicket]})
const ticketId = hiddendata.find(d => d.key == "type").value
hiddendata.push({key:"claimedby",value:"false"})
bot.hiddenData.writeHiddenData(interaction.channel.id,hiddendata)
storage.set("claimData",interaction.channel.id,"false")
@@ -117,7 +119,7 @@ module.exports = () => {
log("system","user unclaimed from ticket",[{key:"user",value:interaction.user.username},{key:"ticket",value:interaction.channel.name},{key:"unclaimed_user",value:unclaimuser}])
APIEvents.onTicketUnclaim(interaction.user,interaction.channel,interaction.guild,new Date(),{status:"open",name:interaction.channel.name,ticketOptions:ticketData})
APIEvents.onCommand("unclaim",permsChecker.command(interaction.user.id,interaction.guild.id),interaction.user,interaction.channel,interaction.guild,new Date())
APIEvents.onCommand("unclaim",permsChecker.ticket(interaction.user.id,interaction.guild.id,ticketId),interaction.user,interaction.channel,interaction.guild,new Date())
})
})
}
+1 -1
View File
@@ -111,7 +111,7 @@
"dropdown":false,
"enableFooter":false,
"footer":"Open Ticket v3.4.4 - I'm a footer!",
"footer":"Open Ticket v3.5.0 - I'm a footer!",
"enableFooterImage":false,
"footerImage":"https://www.example.com/catmemes/cat.png",
+4 -2
View File
@@ -30,7 +30,8 @@
"rename":false,
"claim":false,
"unclaim":false,
"change":false
"change":false,
"stats":false
},
"slash":{
"help":false,
@@ -44,7 +45,8 @@
"rename":false,
"claim":false,
"unclaim":false,
"change":false
"change":false,
"stats":false
}
},
"checkerjs":{
+1 -1
View File
@@ -229,7 +229,7 @@ exports.onTranscriptCreation = (messages,channel,guild,date) => {
}
/**@typedef {"help"|"message"|"close"|"delete"|"reopen"|"rename"|"add"|"remove"|"claim"|"unclaim"|"change"} OTCommandType */
/**@typedef {"help"|"message"|"close"|"delete"|"reopen"|"rename"|"add"|"remove"|"claim"|"unclaim"|"change"|"stats"} OTCommandType */
/**
*
+1 -1
View File
@@ -434,7 +434,7 @@ exports.checker = async () => {
//status:
checkType(config.status.enabled,"boolean","status/enabled")
if (config.status.enabled){
if (config.status.type != "PLAYING" && config.status.type != "LISTENING" && config.status.type != "WATCHING"){
if (config.status.type != "PLAYING" && config.status.type != "LISTENING" && config.status.type != "WATCHING" && config.status.type != "CUSTOM"){
createError("'status/type' | not a valid status type! (LISTENING,WATCHING,PLAYING)")
}
if (config.status.text.length < 1){
+87
View File
@@ -0,0 +1,87 @@
const fs = require("fs")
const location = "./storage/stats.json"
/**@returns {[{category:String, key:String, value:String}]}*/
function getData(){
if (fs.existsSync(location)){
return JSON.parse(fs.readFileSync(location).toString())
}else{
fs.writeFileSync(location,"[]")
return []
}
}
/**@param {[{category:String, key:String, value:String}]} data*/
function setData(data){
fs.writeFileSync(location,JSON.stringify(data,null,"\t"))
}
/**
* @param {String} category
* @param {String} key
* @param {String|Boolean|Number} value
* @returns {Boolean} exists?
*/
exports.set = (category,key,value) => {
const currentData = getData()
const exists = currentData.find((d) => (d.category == category) && (d.key == key)) ? true : false
var newData = []
if (exists){
currentData.forEach((d,i) => {
if (d.category == category && d.key == key){
newData.push({category,key,value})
}else{
newData.push(d)
}
})
}else{
currentData.push({category,key,value})
newData = currentData
}
setData(newData)
return exists
}
/**
* @param {String} category
* @param {String} key
* @returns {String|Boolean|Number|undefined}
*/
exports.get = (category,key) => {
const currentData = getData()
const result = currentData.find((d) => (d.category == category) && (d.key == key))
return (result) ? result.value : undefined
}
/**
* @param {String} category
* @returns {[{key:String,value:String|Boolean|Number}]|false}
*/
exports.getCategory = (category) => {
const currentData = getData()
const result = currentData.filter((v) => v.category == category)
return result
}
/**
* @param {String} category
* @param {String} key
* @returns {Boolean} exists?
*/
exports.delete = (category,key) => {
const currentData = getData()
const exists = currentData.find((d) => (d.category == category) && (d.key == key)) ? true : false
var newData = []
if (exists){
currentData.forEach((d,i) => {
if (!(d.category == category && d.key == key)){
newData.push(d)
}
})
}else{
newData = currentData
}
setData(newData)
return exists
}
@@ -1,43 +0,0 @@
const localstorage = require("node-localstorage")
const ls = new localstorage.LocalStorage("./storage/dynamicDB")
/**
*
* @param {String} category
* @param {String} id
* @param {String} value
* @returns {Boolean}
*/
exports.set = (category,id,value) => {
ls.setItem(category+"--"+id,value.toString())
return true
}
/**
*
* @param {String} category
* @param {String} id
* @returns {String|false}
*/
exports.get = (category,id) => {
const result = ls.getItem(category+"--"+id)
if (!result) return false
return result
}
/**
*
* @param {String} category
* @param {String} id
* @returns {Boolean}
*/
exports.delete = (category,id) => {
ls.removeItem(category+"--"+id)
return true
}
this.set("category","key","value")
this.get("category","key",)
this.delete("category","key")
+7 -3
View File
@@ -9,11 +9,15 @@ ALL DATABASE FILES NEED TO EXPORT THE FOLLOWING FUNCTIONS:
*/
try {
var db = require("./dynamicfiles/database")
var main = require("./databases/main")
var stats = require("./databases/stats")
}catch(err){
console.log(err)
console.log("I couldn't find the database file! (location: ./core/dynamicdatabase/storage.js:2)")
console.log("Unable to find the database handlers!")
process.exit(1)
}
module.exports = db
module.exports = {
main,
stats
}
+9 -9
View File
@@ -14,7 +14,7 @@ const c = discord.Colors
exports.noPermsMessage = (user) => {
return new embed()
.setColor(c.Red)
.setTitle(":x: "+l.errors.noPermsTitle)
.setTitle("❌ "+l.errors.noPermsTitle)
.setDescription(l.errors.noPermsDescription)
.setFooter({iconURL:user.displayAvatarURL(),text:user.username})
}
@@ -23,7 +23,7 @@ exports.noPermsMessage = (user) => {
exports.noPermsDelete = (user) => {
return new embed()
.setColor(c.Red)
.setTitle(":x: "+l.errors.noPermsTitle)
.setTitle("❌ "+l.errors.noPermsTitle)
.setDescription(l.errors.noPermsDelete)
.setFooter({iconURL:user.displayAvatarURL(),text:user.username})
}
@@ -32,7 +32,7 @@ exports.noPermsDelete = (user) => {
exports.invalidArgsMessage = (message) => {
var x = new embed()
.setColor(c.Red)
.setTitle(":x: "+l.errors.missingArgsTitle)
.setTitle("❌ "+l.errors.missingArgsTitle)
.setDescription(message)
return x
@@ -42,7 +42,7 @@ exports.invalidArgsMessage = (message) => {
exports.serverError = (message) => {
var x = new embed()
.setColor(c.Orange)
.setTitle(":warning: "+l.errors.boterror)
.setTitle("⚠️ "+l.errors.boterror)
.setDescription(message)
return x
@@ -53,19 +53,19 @@ exports.invalidIdChooseFromList = (list,message) => {
const beforemsg = message ? message+"\n\n" : ""
var x = new embed()
.setColor(c.Red)
.setTitle(":x: "+l.errors.chooseFromListTitle)
.setTitle("❌ "+l.errors.chooseFromListTitle)
.setDescription(beforemsg+l.errors.chooseFromListDescription+"\n`"+list.join("`\n`")+"`")
return x
}
exports.failedRenameChannel = new embed()
.setColor(c.Red)
.setTitle(":x: Failed to rename channel")
.setTitle("❌ Failed to rename channel")
.setDescription("Discord channels can only be renamed twice every 10 minutes! Open Ticket can't do anything about this error!")
exports.notInATicket = new embed()
.setColor(c.Red)
.setTitle(":x: "+l.errors.notInTicketTitle)
.setTitle("❌ "+l.errors.notInTicketTitle)
.setDescription(l.errors.notInTicketDescription)
@@ -73,7 +73,7 @@ exports.notInATicket = new embed()
exports.success = (title,message) => {
var x = new embed()
.setColor(config.color)
.setTitle(":white_check_mark: "+title)
.setTitle("✅ "+title)
.setDescription(message)
return x
@@ -83,7 +83,7 @@ exports.success = (title,message) => {
exports.warning = (title,message) => {
var x = new embed()
.setColor(c.Orange)
.setTitle(":warning: "+title)
.setTitle("⚠️ "+title)
.setDescription(message)
return x
@@ -26,15 +26,16 @@ module.exports = () => {
}catch{}
if (!interaction.guild) return
if (!permsChecker.command(interaction.user.id,interaction.guild.id)){
permsChecker.sendUserNoPerms(interaction.user)
return
}
const hiddendata = bot.hiddenData.readHiddenData(interaction.channel.id)
if (hiddendata.length < 1) return interaction.editReply({embeds:[bot.errorLog.notInATicket]})
const ticketId = hiddendata.find(d => d.key == "type").value
if (!permsChecker.ticket(interaction.user.id,interaction.guild.id,ticketId)){
permsChecker.sendUserNoPerms(interaction.user)
return
}
hiddendata.push({key:"claimedby",value:interaction.user.id})
bot.hiddenData.writeHiddenData(interaction.channel.id,hiddendata)
storage.set("claimData",interaction.channel.id,interaction.user.id)
@@ -31,8 +31,12 @@ module.exports = () => {
const firstcomponents = interaction.message.components
const hiddendata = bot.hiddenData.readHiddenData(interaction.channel.id)
if (hiddendata.length < 1) return interaction.channel.send({embeds:[bot.errorLog.notInATicket]})
const ticketId = hiddendata.find(d => d.key == "type").value
if (config.system.closeMode == "adminonly"){
if (!permissionChecker.command(interaction.user.id,interaction.guild.id)){
if (!permissionChecker.ticket(interaction.user.id,interaction.guild.id,ticketId)){
if (!permissionChecker.sendUserNoPerms(interaction.user)){
permissionChecker.sendChannelNoPerms(interaction.channel,interaction.user)
}
@@ -56,8 +56,12 @@ module.exports = () => {
const firstcomponents = interaction.message.components
const hiddendata = bot.hiddenData.readHiddenData(interaction.channel.id)
if (hiddendata.length < 1) return interaction.channel.send({embeds:[bot.errorLog.notInATicket]})
const ticketId = hiddendata.find(d => d.key == "type").value
if (config.system.closeMode == "adminonly"){
if (!permissionChecker.command(interaction.user.id,interaction.guild.id)){
if (!permissionChecker.ticket(interaction.user.id,interaction.guild.id,ticketId)){
if (!permissionChecker.sendUserNoPerms(interaction.user)){
permissionChecker.sendChannelNoPerms(interaction.channel,interaction.user)
}
@@ -29,7 +29,11 @@ module.exports = () => {
const firstcomponents = bot.buttons.close.openRowNormal
if (!permissionChecker.command(interaction.user.id,interaction.guild.id)){
const hiddendata = bot.hiddenData.readHiddenData(interaction.channel.id)
if (hiddendata.length < 1) return interaction.channel.send({embeds:[bot.errorLog.notInATicket]})
const ticketId = hiddendata.find(d => d.key == "type").value
if (!permissionChecker.ticket(interaction.user.id,interaction.guild.id,ticketId)){
if (!permissionChecker.sendUserNoDelete(interaction.user)){
permissionChecker.sendChannelNoDelete(interaction.channel,interaction.user)
}
@@ -69,7 +73,11 @@ module.exports = () => {
const firstcomponents = bot.buttons.close.closeCommandRow
if (!permissionChecker.command(interaction.user.id,interaction.guild.id)){
const hiddendata = bot.hiddenData.readHiddenData(interaction.channel.id)
if (hiddendata.length < 1) return interaction.channel.send({embeds:[bot.errorLog.notInATicket]})
const ticketId = hiddendata.find(d => d.key == "type").value
if (!permissionChecker.ticket(interaction.user.id,interaction.guild.id,ticketId)){
if (!permissionChecker.sendUserNoDelete(interaction.user)){
permissionChecker.sendChannelNoDelete(interaction.channel,interaction.user)
}
+36 -2
View File
@@ -34,8 +34,8 @@ module.exports = async (invisible) => {
if (!invisible){
setInterval(() => {
if (process.stdout && process.stdout.cursorTo) process.stdout.cursorTo(0)
process.stdout.write("[status] there are "+chalk.blue(readystats+" out of 13")+" commands ready! (this can take up to 40 seconds)")
if (readystats >= 13){
process.stdout.write("[status] there are "+chalk.blue(readystats+" out of 14")+" commands ready! (this can take up to 40 seconds)")
if (readystats >= 14){
console.log(chalk.green("\nready!"))
console.log(chalk.blue("you can now start the bot with "+chalk.bgBlue("'npm start'")+"!"))
process.exit(1)
@@ -268,4 +268,38 @@ module.exports = async (invisible) => {
readystats++
})
//stats
client.application.commands.create({
name:"stats",
description:"See bot statistics!",
defaultPermission:true,
type:act.ChatInput,
options:[
{
type:acot.Subcommand,
name:"global",
description:"See the global bot stats!"
},
{
type:acot.Subcommand,
name:"ticket",
description:"See the stats of a ticket (use inside of ticket)!"
},
{
type:acot.Subcommand,
name:"user",
description:"See the stats from a user or yourself!",
options:[
{
type:acot.User,
name:"user",
required:false,
description:"See the stats from a specific user!"
}
]
}
]
},sid).then(() => {
readystats++
})
}
+383
View File
@@ -0,0 +1,383 @@
const { EmbedBuilder, Guild, TextChannel, Message, User } = require('discord.js')
const bot = require('../index')
const client = bot.client
const config = bot.config
const log = bot.errorLog.log
const l = bot.language
const permissionChecker = require("./utils/permisssionChecker")
/**@typedef {"TICKETS_CREATED"|"TICKETS_CLOSED"|"TICKETS_DELETED"|"TICKETS_REOPENED"|"TICKETS_AUTOCLOSED"|"TRANSCRIPTS_CREATED"|"TIME_SINCE_UPDATE"|"LAST_VERSION"} OTGlobalStatsType */
/**@typedef {"CREATED_AT"|"CREATED_BY"|"STATUS"} OTTicketStatsType */
/**@typedef {"TICKETS_CREATED"|"TICKETS_CLOSED"|"TICKETS_DELETED"|"TICKETS_REOPENED"} OTUserStatsType */
/**
* @callback OTStatsCallback
* @param {Boolean|Number|String|undefined} current
* @returns {Boolean|Number|String|undefined}
*/
/**
* @param {OTGlobalStatsType} type
* @param {OTStatsCallback} callback
*/
const updateGlobalStats = (type,callback) => {
const currentstat = bot.statsStorage.get("global",type)
const newstat = callback(currentstat)
if (["string","number","boolean"].includes(typeof newstat)){
bot.statsStorage.set("global",type,newstat)
}
}
/**
* @param {OTTicketStatsType} type
* @param {String} id
* @param {OTStatsCallback} callback
*/
const updateTicketStats = (type,id,callback) => {
const currentstat = bot.statsStorage.get("ticket"+id,type)
const newstat = callback(currentstat)
if (["string","number","boolean"].includes(typeof newstat)){
bot.statsStorage.set("ticket"+id,type,newstat)
}
}
/**
* @param {OTUserStatsType} type
* @param {String} id
* @param {OTStatsCallback} callback
*/
const updateUserStats = (type,id,callback) => {
const currentstat = bot.statsStorage.get("user"+id,type)
const newstat = callback(currentstat)
if (["string","number","boolean"].includes(typeof newstat)){
bot.statsStorage.set("user"+id,type,newstat)
}
}
/**
*
* @param {"global"|"ticket"|"user"} scope
* @param {OTGlobalStatsType|OTTicketStatsType|OTUserStatsType} type
* @param {String} [id]
*/
const removeStats = (scope,type,id) => {
const newScope = (scope == "global") ? scope : scope+id
bot.statsStorage.delete(newScope,type)
}
/**
*
* @param {"global"|"ticket"|"user"} scope
* @param {OTGlobalStatsType|OTTicketStatsType|OTUserStatsType} type
* @param {String} [id]
*/
const existStats = (scope,type,id) => {
const newScope = (scope == "global") ? scope : scope+id
return (typeof bot.statsStorage.get(newScope,type) == "undefined") ? false : true
}
/**
*
* @param {"global"|"ticket"|"user"} scope
* @param {OTGlobalStatsType|OTTicketStatsType|OTUserStatsType} type
* @param {String} [id]
*/
const getStats = (scope,type,id) => {
const newScope = (scope == "global") ? scope : scope+id
return bot.statsStorage.get(newScope,type)
}
const startupStatsManager = () => {
//UPDATE LAST UPDATE DATE
if (!existStats("global","TIME_SINCE_UPDATE")){
updateGlobalStats("TIME_SINCE_UPDATE",(current) => {
return new Date().getTime()
})
updateGlobalStats("LAST_VERSION",(current) => {
return (require("../package.json")).version
})
}
if ((require("../package.json")).version != getStats("global","LAST_VERSION")){
updateGlobalStats("TIME_SINCE_UPDATE",(current) => {
return new Date().getTime()
})
updateGlobalStats("LAST_VERSION",(current) => {
return (require("../package.json")).version
})
}
//UPDATE THE OTHER STATS
if (!existStats("global","TICKETS_CREATED")){
updateGlobalStats("TICKETS_CREATED",(current) => {
return 0
})
}
if (!existStats("global","TICKETS_CLOSED")){
updateGlobalStats("TICKETS_CLOSED",(current) => {
return 0
})
}
if (!existStats("global","TICKETS_DELETED")){
updateGlobalStats("TICKETS_DELETED",(current) => {
return 0
})
}
if (!existStats("global","TICKETS_AUTOCLOSED")){
updateGlobalStats("TICKETS_AUTOCLOSED",(current) => {
return 0
})
}
if (!existStats("global","TICKETS_REOPENED")){
updateGlobalStats("TICKETS_REOPENED",(current) => {
return 0
})
}if (!existStats("global","TRANSCRIPTS_CREATED")){
updateGlobalStats("TRANSCRIPTS_CREATED",(current) => {
return 0
})
}
//HANDLE MEMBER LEAVE (clear the database)
client.on("guildMemberRemove",(member) => {
if (existStats("user","TICKETS_CREATED",member.id)){
removeStats("user","TICKETS_CREATED",member.id)
}
if (existStats("user","TICKETS_CLOSED",member.id)){
removeStats("user","TICKETS_CLOSED",member.id)
}
if (existStats("user","TICKETS_DELETED",member.id)){
removeStats("user","TICKETS_DELETED",member.id)
}
if (existStats("user","TICKETS_REOPENED",member.id)){
removeStats("user","TICKETS_REOPENED",member.id)
}
})
}
/**
* @returns {Promise<{startDate:Number, updateDate:Number, version:String, ticketsCreated:Number, ticketsClosed:Number, ticketsDeleted:Number, ticketsReopened:Number, ticketsAutoclosed:Number, transcriptsCreated:Number}>}
*/
const getGlobalStats = async () => {
//live data
const startDate = new Date().getTime() - client.uptime
const version = (require("../package.json")).version
//saved data
const ticketsCreated = getStats("global","TICKETS_CREATED")
const ticketsClosed = getStats("global","TICKETS_CLOSED")
const ticketsDeleted = getStats("global","TICKETS_DELETED")
const ticketsReopened = getStats("global","TICKETS_REOPENED")
const ticketsAutoclosed = getStats("global","TICKETS_AUTOCLOSED")
const transcriptsCreated = getStats("global","TRANSCRIPTS_CREATED")
const timeSinceUpdate = getStats("global","TIME_SINCE_UPDATE")
return {
startDate,
updateDate: (typeof timeSinceUpdate == "undefined") ? new Date().getTime() : timeSinceUpdate,
version,
ticketsCreated: (typeof ticketsCreated == "undefined") ? 0 : ticketsCreated,
ticketsClosed: (typeof ticketsClosed == "undefined") ? 0 : ticketsClosed,
ticketsDeleted: (typeof ticketsDeleted == "undefined") ? 0 : ticketsDeleted,
ticketsReopened: (typeof ticketsReopened == "undefined") ? 0 : ticketsReopened,
ticketsAutoclosed: (typeof ticketsAutoclosed == "undefined") ? 0 : ticketsAutoclosed,
transcriptsCreated: (typeof transcriptsCreated == "undefined") ? 0 : transcriptsCreated,
}
}
/**
*
* @param {discord.TextChannel} channel
* @param {Number} limit
* @returns {Promise<Message[]>}
*/
const getmessages = async (channel,limit) => {
const final = []
var lastId = ""
while (true) {
const options = {limit:100}
if (lastId) options.before = lastId
const messages = await channel.messages.fetch(options)
messages.forEach(msg => {final.push(msg)})
lastId = messages.last().id
if (messages.size != 100 || final >= limit) {
break
}
}
return final
}
/**
* @param {Guild} guild
* @param {String} channelid
* @returns {Promise<{createdAt:Number, createdBy:String, messageAmount:Number, participants:String[], ticketName:String, status:"open"|"closed"|"reopened"|"autoclosed"}>}
*/
const getTicketStats = async (guild,channelid) => {
//live data
/**@type {TextChannel|undefined} */
const channel = guild.channels.cache.find((c) => c.id == channelid)
const messageAmount = (channel) ? (await getmessages(channel,5000)).length : 0
const participants = (channel) ? channel.members.map((m) => m.user.username) : []
//saved data
const createdAt = getStats("ticket","CREATED_AT",channelid)
const status = getStats("ticket","STATUS",channelid)
const TEMPcreatedBy = getStats("ticket","CREATED_BY",channelid)
const TEMPcreatedByUser = (TEMPcreatedBy) ? guild.members.cache.find((m) => m.id == TEMPcreatedBy) : undefined
const createdBy = (TEMPcreatedByUser) ? TEMPcreatedByUser.user.username : "an unknown person 😄"
return {
createdAt: (typeof createdAt == "undefined") ? new Date().getTime() : createdAt,
createdBy: (typeof createdBy == "undefined") ? 0 : createdBy,
messageAmount,
participants:participants.slice(0,50),
ticketName:channel.name,
status: (typeof status == "undefined") ? "open" : status
}
}
/**
* @param {Guild} guild
* @param {User} user
* @param {String} [channelid]
* @returns {Promise<{ticketsCreated:Number, ticketsClosed:Number, ticketsDeleted:Number, ticketsReopened:Number, role:"globaladmin"|"ticketadmin"|"member", userName:String}>}
*/
const getUserStats = async (guild,user,channelid) => {
//live data
const hiddendata = bot.hiddenData.readHiddenData(channelid)
const ticketId = (hiddendata.length < 1) ? false : hiddendata.find(d => d.key == "type").value
const isGlobalAdmin = permissionChecker.global(user.id,guild.id)
const isTicketAdmin = (ticketId) ? permissionChecker.ticket(user.id,guild.id,ticketId) : false
const role = (isGlobalAdmin) ? "globaladmin" : ((isTicketAdmin) ? "ticketadmin" : "member")
//saved data
const ticketsCreated = getStats("user","TICKETS_CREATED",user.id)
const ticketsClosed = getStats("user","TICKETS_CLOSED",user.id)
const ticketsDeleted = getStats("user","TICKETS_DELETED",user.id)
const ticketsReopened = getStats("user","TICKETS_REOPENED",user.id)
return {
ticketsCreated: (typeof ticketsCreated == "undefined") ? 0 : ticketsCreated,
ticketsClosed: (typeof ticketsClosed == "undefined") ? 0 : ticketsClosed,
ticketsDeleted: (typeof ticketsDeleted == "undefined") ? 0 : ticketsDeleted,
ticketsReopened: (typeof ticketsReopened == "undefined") ? 0 : ticketsReopened,
role,
userName:user.username
}
}
const createGlobalStatsEmbed = async () => {
const stats = await getGlobalStats()
const sentences = [
`${l.stats.ticketsCreated}: \`${stats.ticketsCreated}\``,
`${l.stats.ticketsClosed}: \`${stats.ticketsClosed}\``,
`${l.stats.ticketsDeleted}: \`${stats.ticketsDeleted}\``,
`${l.stats.ticketsReopened}: \`${stats.ticketsReopened}\``,
`${l.stats.ticketsAutoclosed}: \`${stats.ticketsAutoclosed}\``,
`${l.stats.startupDate}: <t:${Math.round(stats.startDate/1000)}:f>`,
`${l.stats.latestUpdate}: <t:${Math.round(stats.updateDate/1000)}:D>`
]
const embed = new EmbedBuilder()
.setColor(config.color)
.setTitle(`📊 ${l.stats.globalTitle}!`)
.setDescription(sentences.slice(0,5).join("\n"))
.addFields({
name:`${l.stats.systemTitle}:`,
value:sentences.slice(5,7).join("\n")
})
.setFooter({text:`${l.stats.versionTitle}: v${stats.version}`})
return embed
}
/**
* @param {Guild} guild
* @param {String} channelid
*/
const createTicketStatsEmbed = async (guild,channelid) => {
const stats = await getTicketStats(guild,channelid)
if (stats.status == "open"){
var newStatus = `🟢 \`${l.stats.switches.open}\``
}else if (stats.status == "reopened"){
var newStatus = `🟢 \`${l.stats.switches.reopened}\``
}else if (stats.status == "closed"){
var newStatus = `🔴 \`${l.stats.switches.closed}\``
}else if (stats.status == "autoclosed"){
var newStatus = `🔴 \`${l.stats.switches.autoclosed}\``
}
const sentences = [
`${l.stats.ticketCreatedOn}: <t:${Math.round(stats.createdAt/1000)}:f>`,
`${l.stats.ticketCreatedBy}: \`${stats.createdBy}\``,
`${l.stats.messagesSent}: \`${stats.messageAmount}\``,
`${l.stats.status}: ${newStatus}`
]
const embed = new EmbedBuilder()
.setColor(config.color)
.setTitle(`📊 ${l.stats.ticketTitle}`.replace("{0}",`#${stats.ticketName}!`))
.setDescription(sentences.join("\n"))
.addFields({
name:`${l.stats.participants}:`,
value:stats.participants.join("\n")
})
return embed
}
/**
* @param {Guild} guild
* @param {User} user
* @param {String} channelid
*/
const createUserStatsEmbed = async (guild,user,channelid) => {
const stats = await getUserStats(guild,user,channelid)
if (stats.role == "globaladmin"){
var newRole = `🟢 \`${l.stats.switches.globalAdmin}\``
}else if (stats.role == "ticketadmin"){
var newRole = `🟡 \`${l.stats.switches.ticketAdmin}\``
}else if (stats.role == "member"){
var newRole = `🔴 \`${l.stats.switches.member}\``
}
const sentences = [
`${l.stats.role}: ${newRole}`,
`${l.stats.ticketsCreated}: \`${stats.ticketsCreated}\``,
`${l.stats.ticketsClosed}: \`${stats.ticketsClosed}\``,
`${l.stats.ticketsDeleted}: \`${stats.ticketsDeleted}\``,
`${l.stats.ticketsReopened}: \`${stats.ticketsReopened}\``
]
const embed = new EmbedBuilder()
.setColor(config.color)
.setTitle(`📊 ${l.stats.userTitle}`.replace("{0}",`${stats.userName}!`))
.setDescription(sentences.join("\n"))
return embed
}
module.exports = {
updateGlobalStats,
updateTicketStats,
updateUserStats,
removeStats,
existStats,
getStats,
startupStatsManager,
getGlobalStats,
getTicketStats,
getUserStats,
createGlobalStatsEmbed,
createTicketStatsEmbed,
createUserStatsEmbed
}
+9
View File
@@ -43,6 +43,15 @@ module.exports = () => {
require("./ticketCloser").closeManager(clientMember,channel,prefix,"close","OTautoclose",true)
storage.delete("autocloseTickets",channel.id)
//STATS
bot.statsManager.updateGlobalStats("TICKETS_AUTOCLOSED",(current) => {
if (typeof current != "undefined") return current+1
return 1
})
bot.statsManager.updateTicketStats("STATUS",channel.id,(current) => {
return "autoclosed"
})
channel.send({embeds:[bot.embeds.commands.autocloseSignalEmbed(client.user,t.value)],components:[bot.buttons.close.closeCommandRow]})
}
+39 -20
View File
@@ -51,9 +51,14 @@ exports.closeManager = async (member,channel,prefix,mode,reason,nomessage) => {
if (mode == "delete" || mode == "deletenotranscript"){
//delete
const hiddendata = bot.hiddenData.readHiddenData(channel.id)
if (hiddendata.length < 1) return channel.send({embeds:[bot.errorLog.notInATicket]})
const ticketId = hiddendata.find(d => d.key == "type").value
const ticketData = require("../utils/configParser").getTicketById(ticketId,true)
//check perms
if (!guild) return
if (!permsChecker.command(user.id,guild.id)){
if (!permsChecker.ticket(user.id,guild.id,ticketId)){
permsChecker.sendUserNoPerms(user)
return
}
@@ -72,24 +77,35 @@ exports.closeManager = async (member,channel,prefix,mode,reason,nomessage) => {
storage.delete("autocloseTickets",channel.id)
if (Number(storage.get("amountOfUserTickets",getuserID)) < 0) storage.set("amountOfUserTickets",getuserID,0)
//getID & send DM & send api event
const hiddendata = bot.hiddenData.readHiddenData(channel.id)
if (hiddendata.length < 1) return channel.send({embeds:[bot.errorLog.notInATicket]})
const ticketId = hiddendata.find(d => d.key == "type").value
const ticketData = require("../utils/configParser").getTicketById(ticketId,true)
require("../api/modules/events").onTicketDelete(user,channel,guild,new Date(),{name:channel.name,status:"deleted",ticketOptions:ticketData})
//STATS
bot.statsManager.updateGlobalStats("TICKETS_DELETED",(current) => {
if (typeof current != "undefined") return current+1
return 1
})
bot.statsManager.updateUserStats("TICKETS_DELETED",user.id,(current) => {
if (typeof current != "undefined") return current+1
return 1
})
bot.statsManager.removeStats("ticket","CREATED_BY",channel.id)
bot.statsManager.removeStats("ticket","CREATED_AT",channel.id)
bot.statsManager.removeStats("ticket","STATUS",channel.id)
hiddendata.push({key:"pendingdelete",value:"true"})
bot.hiddenData.writeHiddenData(channel.id,hiddendata)
}else if (mode == "close"){
//close
const hiddendata = bot.hiddenData.readHiddenData(channel.id)
if (hiddendata.length < 1) return channel.send({embeds:[bot.errorLog.notInATicket]})
const ticketId = hiddendata.find(d => d.key == "type").value
const ticketData = require("../utils/configParser").getTicketById(ticketId,true)
//check perms
if (config.system.closeMode == "adminonly"){
if (!guild) return
if (!permsChecker.command(user.id,guild.id)){
if (!permsChecker.ticket(user.id,guild.id,ticketId)){
permsChecker.sendUserNoPerms(user)
return
}
@@ -129,16 +145,6 @@ exports.closeManager = async (member,channel,prefix,mode,reason,nomessage) => {
}
})
//ticketinfo error
const ticketInfoError = bot.errorLog.serverError("Unable to detect ticket information.\n*(First message that this bot sends)*\n\n__**Possible reasons:**__\n- you unpinned the first message\n- the first message is deleted\n- it has been unpinned & repinned after another message has been pinned.\n\n__**Possible solutions:**__\n- unpin all messages in this channel & repin the first message that this bot sent.\nIf this doesn't work, just delete the ticket manually!")
//add ticket adminroles
const hiddendata = bot.hiddenData.readHiddenData(channel.id)
if (hiddendata.length < 1) return channel.send({embeds:[bot.errorLog.notInATicket]})
const ticketId = hiddendata.find(d => d.key == "type").value
const ticketData = require("../utils/configParser").getTicketById(ticketId,true)
if (!ticketData) return
if (ticketData.closedCategory.enable){
/**@type {discord.CategoryChannel} */
@@ -184,13 +190,26 @@ exports.closeManager = async (member,channel,prefix,mode,reason,nomessage) => {
//send api event
require("../api/modules/events").onTicketClose(user,channel,guild,new Date(),{name:channel.name,status:"closed",ticketOptions:ticketData},newReason)
//STATS
bot.statsManager.updateGlobalStats("TICKETS_CLOSED",(current) => {
if (typeof current != "undefined") return current+1
return 1
})
bot.statsManager.updateUserStats("TICKETS_CLOSED",user.id,(current) => {
if (typeof current != "undefined") return current+1
return 1
})
bot.statsManager.updateTicketStats("STATUS",channel.id,(current) => {
return "closed"
})
}
/**
*
* @param {discord.TextChannel} channel
* @param {Number} limit
* @returns
* @returns {Promise<discord.Message[]>}
*/
const getmessages = async (channel,limit) => {
const final = []
+19
View File
@@ -214,6 +214,25 @@ module.exports = () => {
log("system","created new ticket",[{key:"ticket",value:ticketName},{key:"user",value:interaction.user.username}])
require("../api/modules/events").onTicketOpen(interaction.user,ticketChannel,interaction.guild,new Date(),{name:ticketName,status:"open",ticketOptions:currentTicketOptions})
//STATS:
bot.statsManager.updateGlobalStats("TICKETS_CREATED",(current) => {
if (typeof current != "undefined") return current+1
return 1
})
bot.statsManager.updateUserStats("TICKETS_CREATED",interaction.user.id,(current) => {
if (typeof current != "undefined") return current+1
return 1
})
bot.statsManager.updateTicketStats("CREATED_BY",ticketChannel.id,(current) => {
return interaction.user.id
})
bot.statsManager.updateTicketStats("CREATED_AT",ticketChannel.id,(current) => {
return new Date().getTime()
})
bot.statsManager.updateTicketStats("STATUS",ticketChannel.id,(current) => {
return "open"
})
const channelbutton = new discord.ActionRowBuilder()
.addComponents([
new discord.ButtonBuilder()
+13 -1
View File
@@ -46,9 +46,21 @@ const reopenTicket = (guild,channel,user) => {
}
}
})
channel.permissionOverwrites.set(permissionsArray)
require("../api/modules/events").onTicketReopen(user,channel,guild,new Date(),{name:channel.name,status:"reopened",ticketOptions:false})
//STATS
bot.statsManager.updateGlobalStats("TICKETS_REOPENED",(current) => {
if (typeof current != "undefined") return current+1
return 1
})
bot.statsManager.updateUserStats("TICKETS_REOPENED",user.id,(current) => {
if (typeof current != "undefined") return current+1
return 1
})
bot.statsManager.updateTicketStats("STATUS",channel.id,(current) => {
return "reopened"
})
}
exports.reopenTicket = reopenTicket
@@ -10,7 +10,7 @@ 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 {{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}, favicon:{enableCustomFavicon:Boolean, imageUrl: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 */
@@ -288,6 +288,7 @@ exports.compile = (guild,channel,user,messagesInv,data) => {
const dsb = data.style.background
const dsh = data.style.header
const dss = data.style.stats
const dsf = data.style.favicon
/**@type {OTTranscriptCompileInput} */
const result = {
@@ -317,7 +318,7 @@ exports.compile = (guild,channel,user,messagesInv,data) => {
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"
pfp:data.bot.pfp || "transcripts.dj-dj.be/favicon.png"
},
ticket:{
name:channel.name,
@@ -382,8 +383,8 @@ exports.compile = (guild,channel,user,messagesInv,data) => {
name:"test-server"
},
customFavicon:{
enabled:false,
image:"https://openticket.dj-dj.be"
enabled:dsf.enableCustomFavicon,
image:(dsf.imageUrl) ? dsf.imageUrl : "https://openticket.dj-dj.be"
},
additionalFlags:[]
}
+1 -1
View File
@@ -17,7 +17,7 @@ exports.upload = async (json) => {
const data = encodeURIComponent(JSON.stringify(json))
try {
const res = await axios.post("https://transcripts.dj-dj.be/api/upload?auth=openticketTRANSCRIPT1234&version=2",JSON.stringify(json))
const res = await axios.post("https://apis.dj-dj.be/transcripts/upload?auth=openticketTRANSCRIPT1234&version=2",JSON.stringify(json))
if (res.status != 200) resolve(false)
resolve(res.data)
+9
View File
@@ -35,6 +35,10 @@ const checkAvailability = async () => {
*/
module.exports = async (messages,guild,channel,user,reason) => {
require("../api/modules/events").onTranscriptCreation(messages,channel,guild,new Date())
bot.statsManager.updateGlobalStats("TRANSCRIPTS_CREATED",(current) => {
if (typeof current != "undefined") return current+1
return 1
})
const msglist = await channel.messages.fetchPinned()
const chName = channel.name
@@ -55,6 +59,7 @@ module.exports = async (messages,guild,channel,user,reason) => {
const tsb = tsconfig.style.background
const tsh = tsconfig.style.header
const tss = tsconfig.style.stats
const tsf = tsconfig.style.favicon
const JSONDATA = require("./communication/compileJsonV2").compile(guild,channel,user,messages,{
style:{
background:{
@@ -75,6 +80,10 @@ module.exports = async (messages,guild,channel,user,reason) => {
valueTextColor:tss.valueTextColor,
hideBackgroundColor:tss.hideBackgroundColor,
hideTextColor:tss.hideTextColor
},
favicon:{
enableCustomFavicon:tsf.enableCustomFavicon,
imageUrl:tsf.imageUrl
}
},
+2 -2
View File
@@ -46,7 +46,7 @@ const getLivestatus = (local) => {
}
}else{
try {
axios.get("https://livestatus.dj-dj.be/openticket.json").then((res) => {
axios.get("https://apis.dj-dj.be/livestatus/announcements/openticket.json").then((res) => {
const livestatus = res.data
if (!Array.isArray(livestatus)) return resolve(false)
if (!livestatus) return resolve(false)
@@ -189,7 +189,7 @@ exports.liveStatusUploadManager = async (err) => {
//system:config.system
},
language:config.languageFile,
version:"3.4.4",
version:"3.5.0",
slashcmds:slashMode,
transcripts:transcriptMode,
plugins:fs.readdirSync("./plugins"),
+29 -2
View File
@@ -12,12 +12,12 @@ const storage = bot.storage
* @param {String} guildid
* @returns {Boolean} has permissions?
*/
exports.command = (memberid,guildid) => {
exports.global = (memberid,guildid) => {
bot.actionRecorder.push({
category:"ot.managers.permissionChecker",
file:"./core/permissionChecker.js",
time:new Date().getTime(),
type:"command"
type:"global"
})
const permsmember = client.guilds.cache.find(g => g.id == guildid).members.cache.find(m => m.id == memberid)
if (config.adminRoles.some((item)=>{return permsmember.roles.cache.has(item)}) == false && !permsmember.permissions.has("Administrator") && !permsmember.permissions.has("ManageGuild")){
@@ -25,6 +25,33 @@ exports.command = (memberid,guildid) => {
}else {return true}
}
/**
*
* @param {String} memberid
* @param {String} guildid
* @param {String} optionid
* @returns {Boolean} has permissions?
*/
exports.ticket = (memberid,guildid,optionid) => {
bot.actionRecorder.push({
category:"ot.managers.permissionChecker",
file:"./core/permissionChecker.js",
time:new Date().getTime(),
type:"ticket"
})
const option = config.options.find((opt) => opt.id == optionid)
const ticketadmins = option && option.adminroles ? option.adminroles : []
const permsmember = client.guilds.cache.find(g => g.id == guildid).members.cache.find(m => m.id == memberid)
const isGlobalAdmin = config.adminRoles.some((item)=>{return permsmember.roles.cache.has(item)})
const isTicketAdmin = ticketadmins.some((item)=>{return permsmember.roles.cache.has(item)})
const hasAdministrator = permsmember.permissions.has("Administrator")
const hasManageGuild = permsmember.permissions.has("ManageGuild")
return isGlobalAdmin || isTicketAdmin || hasAdministrator || hasManageGuild
}
/**
*
* @param {discord.User} user
+38 -23
View File
@@ -17,22 +17,19 @@
SUGGESTING NEW FEATURES:
=====================
Open Ticket is a community project. This means that
almost all feature ideas come from our community.
Are you missing something you want in open ticket?
Then join our Discord server and we will add it (if possible)
Did you know that 80% of all features in OT were ideas from our community?
Open Ticket is an open-source community project!
Because of this, almost 80% of all features in OT were ideas from our community!
Feel free to add new ideas in our discord server
or via github issues! Translations are always welcome!
INFORMATION:
============
Open Ticket v3.4.4 - © DJdj Development
Open Ticket v3.5.0 - © DJdj Development
discord: https://discord.dj-dj.be
website: https://www.dj-dj.be
github: https://openticket.dj-dj.be
github: https://otgithub.dj-dj.be
support e-mail: support@dj-dj.be
Config files:
@@ -60,6 +57,7 @@ exports.client = client
client.setMaxListeners(50)
if (process.argv.some((v) => v == "--debug")) console.log("[TEMP_DEBUG]","created client")
//LOAD CONFIG
var tempconfig = require("./config.json")
/**@type {Boolean} */
var isDevConfig = false
@@ -75,31 +73,34 @@ if (process.argv.some((v) => v == "--devconfig")){
if (process.argv.some((v) => v == "--debug")) console.log("[TEMP_DEBUG]","loaded flags")
exports.developerConfig = isDevConfig
const config = tempconfig
exports.config = config
const tsconfig = isDevConfig ? require("./devtsconfig.json") : require("./transcriptconfig.json")
exports.tsconfig = tsconfig
//LOAD LANGUAGE
const language = require("./core/languageManager").language
exports.language = language
//LOAD FLAGS
if (process.argv.some((v) => v == "--debug")) console.log("[TEMP_DEBUG]","loaded language")
if (process.argv.some((v) => v == "--debug")) console.log("[TEMP_DEBUG]","loaded config")
exports.storage = require('./core/dynamicdatabase/storage')
exports.storage = require('./core/dynamicdatabase/storage').main
if (process.argv.some((v) => v == "--debug")) console.log("[TEMP_DEBUG]","loaded storage")
exports.statsStorage = require('./core/dynamicdatabase/storage').stats
if (process.argv.some((v) => v == "--debug")) console.log("[TEMP_DEBUG]","loaded stats storage")
exports.errorLog = require("./core/errorLogSystem")
if (process.argv.some((v) => v == "--debug")) console.log("[TEMP_DEBUG]","LOADED LOGGING SYSTEM")
if (process.argv.some((v) => v == "--debug")) console.log("[TEMP_DEBUG]","switching to new logs")
this.errorLog.log("debug","loaded new logs")
//LOAD SYSTEM LIBRARYS
exports.actionRecorder = require("./core/utils/liveStatus").actionRecorder
exports.hiddenData = require("./core/utils/hiddendata")
this.errorLog.log("debug","loaded hiddendataTM")
exports.embeds = {
commands:require("./core/interactionHandlers/embeds/commands")
}
@@ -110,6 +111,10 @@ exports.buttons = {
}
this.errorLog.log("debug","loaded buttons & embeds")
exports.statsManager = require("./core/statsManager")
this.statsManager.startupStatsManager()
//START CLIENT LOGIN PROCESS
client.on('ready',async () => {
this.errorLog.log("debug","client logged in")
this.actionRecorder.push({
@@ -118,17 +123,19 @@ client.on('ready',async () => {
time:new Date().getTime(),
type:"client.loggedin.success"
})
var statusSet = false
const setStatus = (type,text) => {
if (statusSet == true) return
const getTypeEnum = (text) => {
if (text.toLowerCase() == "playing") return discord.ActivityType.Playing
else if (text.toLowerCase() == "listening") return discord.ActivityType.Listening
else if (text.toLowerCase() == "watching") return discord.ActivityType.Watching
const getTypeEnum = (type) => {
if (type.toLowerCase() == "playing") return discord.ActivityType.Playing
else if (type.toLowerCase() == "listening") return discord.ActivityType.Listening
else if (type.toLowerCase() == "watching") return discord.ActivityType.Watching
else if (type.toLowerCase() == "custom") return discord.ActivityType.Custom
else return discord.ActivityType.Listening
}
client.user.setActivity(text,{type:getTypeEnum(type)})
statusSet = true
client.user.setActivity({
type:getTypeEnum(type),
state:(text.toLowerCase() == "custom") ? text : undefined,
name:text
})
}
this.errorLog.log("debug","bot status loaded")
this.actionRecorder.push({
@@ -226,7 +233,7 @@ client.on('ready',async () => {
}
}
//load plugins
//LOAD PLUGINS (after client login)
this.actionRecorder.push({
category:"ot.managers.plugins",
file:"./core/api/pluginlauncher.js",
@@ -242,6 +249,8 @@ client.on('ready',async () => {
})
this.errorLog.log("debug","loading plugins")
})
//LOAD CHECKER.JS
if (!require("./core/api/api.json").disable.checkerjs.all){
this.actionRecorder.push({
category:"ot.managers.main",
@@ -260,6 +269,7 @@ if (!require("./core/api/api.json").disable.checkerjs.all){
})
}
//LOAD COMMANDS & CORE
if (process.argv[2] && process.argv[2].startsWith("slash")){
//do nothing
}else{
@@ -283,6 +293,8 @@ if (process.argv[2] && process.argv[2].startsWith("slash")){
require("./commands/claim")()
require("./commands/unclaim")()
require("./commands/change")()
require("./commands/stats")()
this.actionRecorder.push({
category:"ot.managers.loader",
file:"./index.js",
@@ -314,6 +326,7 @@ if (process.argv[2] && process.argv[2].startsWith("slash")){
})
}
//LOAD API
this.actionRecorder.push({
category:"ot.managers.loader",
file:"./index.js",
@@ -331,6 +344,7 @@ this.actionRecorder.push({
type:"api.success"
})
//ERROR SYSTEM
this.actionRecorder.push({
category:"ot.managers.loader",
file:"./index.js",
@@ -382,6 +396,7 @@ this.actionRecorder.push({
type:"debugsystem.success"
})
//LOGIN SYSTEM
const token = config.token.fromENV ? process.env.TOKEN : config.token.value
client.login(token)
this.errorLog.log("debug","login with token")
+35 -1
View File
@@ -1,6 +1,6 @@
{
"_CREDITS":"ChilledBroke#9986 & M4#5882",
"_INFO":"This file is a translation for open ticket 3.4.4",
"_INFO":"This file is a translation for open ticket 3.5.0",
"errors": {
"missingArgsTitle": "قيمة غير صالحة!",
@@ -97,5 +97,39 @@
"wait":"Please wait!",
"estimated":"Estimated time",
"available":"The transcript is available here"
},
"stats":{
"globalTitle":"Global Stats",
"ticketTitle":"Ticket Stats for {0}",
"userTitle":"User Stats for {0}",
"systemTitle":"System Stats",
"versionTitle":"Bot Version",
"ticketsCreated":"Tickets Created",
"ticketsClosed":"Tickets Closed",
"ticketsDeleted":"Tickets Deleted",
"ticketsReopened":"Tickets Reopened",
"ticketsAutoclosed":"Tickets Autoclosed",
"transcriptsCreated":"Transcripts Created",
"startupDate":"Startup Date",
"latestUpdate":"Latest Update",
"ticketCreatedOn":"Ticket Created On",
"ticketCreatedBy":"Ticket Created By",
"messagesSent":"Messages Sent",
"status":"Status",
"participants":"Participants",
"role":"Role",
"switches":{
"globalAdmin":"Global Admin",
"ticketAdmin":"Ticket Admin",
"member":"Member",
"open":"Open",
"reopened":"Reopened",
"closed":"Closed",
"autoclosed":"Autoclosed"
},
"errorUserNotFound":"This user can't be found in the stats database!"
}
}
+35 -1
View File
@@ -1,6 +1,6 @@
{
"_CREDITS":"DJdj Development",
"_INFO":"This file is a translation for open ticket 3.4.4",
"_INFO":"This file is a translation for open ticket 3.5.0",
"errors":{
"missingArgsTitle":"Invalid Arguments!",
@@ -97,5 +97,39 @@
"wait":"Please wait!",
"estimated":"Estimated time",
"available":"The transcript is available here"
},
"stats":{
"globalTitle":"Global Stats",
"ticketTitle":"Ticket Stats for {0}",
"userTitle":"User Stats for {0}",
"systemTitle":"System Stats",
"versionTitle":"Bot Version",
"ticketsCreated":"Tickets Created",
"ticketsClosed":"Tickets Closed",
"ticketsDeleted":"Tickets Deleted",
"ticketsReopened":"Tickets Reopened",
"ticketsAutoclosed":"Tickets Autoclosed",
"transcriptsCreated":"Transcripts Created",
"startupDate":"Startup Date",
"latestUpdate":"Latest Update",
"ticketCreatedOn":"Ticket Created On",
"ticketCreatedBy":"Ticket Created By",
"messagesSent":"Messages Sent",
"status":"Status",
"participants":"Participants",
"role":"Role",
"switches":{
"globalAdmin":"Global Admin",
"ticketAdmin":"Ticket Admin",
"member":"Member",
"open":"Open",
"reopened":"Reopened",
"closed":"Closed",
"autoclosed":"Autoclosed"
},
"errorUserNotFound":"This user can't be found in the stats database!"
}
}
+35 -1
View File
@@ -1,6 +1,6 @@
{
"_CREDITS":"spyeye_",
"_INFO":"This file is a translation for open ticket 3.4.4",
"_INFO":"This file is a translation for open ticket 3.5.0",
"errors":{
"missingArgsTitle":"Neplatný Argument!",
@@ -97,5 +97,39 @@
"wait":"Prosím počkej!",
"estimated":"Odhadovaný čas",
"available":"Záloha je uložena zde!"
},
"stats":{
"globalTitle":"Globalní statistiky",
"ticketTitle":"Statistiky ticketů pro {0}",
"userTitle":"Statistiky uživatele {0}",
"systemTitle":"Systémové statistiky",
"versionTitle":"Verze bota",
"ticketsCreated":"Ticket založen",
"ticketsClosed":"Ticket uzavřen",
"ticketsDeleted":"Ticket vymazán",
"ticketsReopened":"Ticket znovu otevřen",
"ticketsAutoclosed":"Ticket byl automaticky uzavřen",
"transcriptsCreated":"Transcripty vytvořeny",
"startupDate":"Datum spuštění",
"latestUpdate":"Poslední aktualizace",
"ticketCreatedOn":"Ticket vytvořen dne",
"ticketCreatedBy":"Ticket vytvořil",
"messagesSent":"Zpráva odeslána",
"status":"Status",
"participants":"Účastníci",
"role":"Role",
"switches":{
"globalAdmin":"Global Admin",
"ticketAdmin":"Ticket Admin",
"member":"Uživatel",
"open":"Otevřít",
"reopened":"Znovu Otevřít",
"closed":"Uzavřít",
"autoclosed":"Automaticky uzavřen"
},
"errorUserNotFound":"Tento uživatel není v databázi statistik k nalezení!"
}
}
+36 -2
View File
@@ -1,6 +1,6 @@
{
"_CREDITS":"the_gamer#5095",
"_INFO":"This file is a translation for open ticket 3.4.4",
"_INFO":"This file is a translation for open ticket 3.5.0",
"errors": {
"missingArgsTitle": "Ugyldigt Argument!",
@@ -97,5 +97,39 @@
"wait": "Vent venligst!",
"estimated": "Estimeret tid",
"available": "Transcriptet er tilgængelig her"
}
},
"stats":{
"globalTitle":"Globale Statestikker",
"ticketTitle":"Ticket Statestikker tilhørende: {0}",
"userTitle":"Bruger Statestikker tilhørende: {0}",
"systemTitle":"System Statestikker",
"versionTitle":"Bot Version",
"ticketsCreated":"Tickets Oprettet",
"ticketsClosed":"Tickets Lukket",
"ticketsDeleted":"Tickets Slettet",
"ticketsReopened":"Tickets Genåbnet",
"ticketsAutoclosed":"Tickets Autolukket",
"transcriptsCreated":"Transcripts Oprettet",
"startupDate":"Startup Dato",
"latestUpdate":"Seneste Opdatering",
"ticketCreatedOn":"Ticket Oprettet Den",
"ticketCreatedBy":"Ticket Oprettet Af",
"messagesSent":"Beskeder sendt",
"status":"Status",
"participants":"Deltagere",
"role":"Rolle",
"switches":{
"globalAdmin":"Global Admin",
"ticketAdmin":"Ticket Admin",
"member":"Medlem",
"open":"Åben",
"reopened":"Genåbnet",
"closed":"Lukket",
"autoclosed":"Autolukket"
},
"errorUserNotFound":"Denne bruger kan ikke findes i statestik databasen!"
}
}
+35 -1
View File
@@ -1,6 +1,6 @@
{
"_CREDITS":"DJj123dj#1706",
"_INFO":"This file is a translation for open ticket 3.4.4",
"_INFO":"This file is a translation for open ticket 3.5.0",
"errors":{
"missingArgsTitle":"Onjuiste parameters!",
@@ -97,5 +97,39 @@
"wait":"Gelieve te wachten!",
"estimated":"Geschatte tijd",
"available":"Het transcript is hier beschikbaar"
},
"stats":{
"globalTitle":"Globale Stats",
"ticketTitle":"Ticket Stats voor {0}",
"userTitle":"User Stats voor {0}",
"systemTitle":"Systeem Stats",
"versionTitle":"Bot Versie",
"ticketsCreated":"Tickets Gemaakt",
"ticketsClosed":"Tickets Gesloten",
"ticketsDeleted":"Tickets Verwijderd",
"ticketsReopened":"Tickets Heropend",
"ticketsAutoclosed":"Tickets Auto-gesloten",
"transcriptsCreated":"Transcripts Gemaakt",
"startupDate":"Opstart Datum",
"latestUpdate":"Laatste Update",
"ticketCreatedOn":"Ticket Gemaakt Op",
"ticketCreatedBy":"Ticket Gemaakt Door",
"messagesSent":"Berichten Verzonden",
"status":"Status",
"participants":"Deelnemers",
"role":"Rol",
"switches":{
"globalAdmin":"Globale Admin",
"ticketAdmin":"Ticket Admin",
"member":"Member",
"open":"Open",
"reopened":"Heropend",
"closed":"Gesloten",
"autoclosed":"Auto-gesloten"
},
"errorUserNotFound":"Deze user kan niet in de database gevonden worden!"
}
}
+35 -1
View File
@@ -1,6 +1,6 @@
{
"_CREDITS":"DJdj Development",
"_INFO":"This file is a translation for open ticket 3.4.4",
"_INFO":"This file is a translation for open ticket 3.5.0",
"errors":{
"missingArgsTitle":"Invalid Arguments!",
@@ -97,5 +97,39 @@
"wait":"Please wait!",
"estimated":"Estimated time",
"available":"The transcript is available here"
},
"stats":{
"globalTitle":"Global Stats",
"ticketTitle":"Ticket Stats for {0}",
"userTitle":"User Stats for {0}",
"systemTitle":"System Stats",
"versionTitle":"Bot Version",
"ticketsCreated":"Tickets Created",
"ticketsClosed":"Tickets Closed",
"ticketsDeleted":"Tickets Deleted",
"ticketsReopened":"Tickets Reopened",
"ticketsAutoclosed":"Tickets Autoclosed",
"transcriptsCreated":"Transcripts Created",
"startupDate":"Startup Date",
"latestUpdate":"Latest Update",
"ticketCreatedOn":"Ticket Created On",
"ticketCreatedBy":"Ticket Created By",
"messagesSent":"Messages Sent",
"status":"Status",
"participants":"Participants",
"role":"Role",
"switches":{
"globalAdmin":"Global Admin",
"ticketAdmin":"Ticket Admin",
"member":"Member",
"open":"Open",
"reopened":"Reopened",
"closed":"Closed",
"autoclosed":"Autoclosed"
},
"errorUserNotFound":"This user can't be found in the stats database!"
}
}
+35 -1
View File
@@ -1,6 +1,6 @@
{
"_CREDITS":"Sanke#6086",
"_INFO":"This file is a translation for open ticket 3.4.4",
"_INFO":"This file is a translation for open ticket 3.5.0",
"errors":{
"missingArgsTitle":"Arguments invalides!",
@@ -97,5 +97,39 @@
"wait":"S'il vous plait, attendez...",
"estimated":"Temps estime:",
"available":"La transcript est disponible ici"
},
"stats":{
"globalTitle":"Global Stats",
"ticketTitle":"Ticket Stats for {0}",
"userTitle":"User Stats for {0}",
"systemTitle":"System Stats",
"versionTitle":"Bot Version",
"ticketsCreated":"Tickets Created",
"ticketsClosed":"Tickets Closed",
"ticketsDeleted":"Tickets Deleted",
"ticketsReopened":"Tickets Reopened",
"ticketsAutoclosed":"Tickets Autoclosed",
"transcriptsCreated":"Transcripts Created",
"startupDate":"Startup Date",
"latestUpdate":"Latest Update",
"ticketCreatedOn":"Ticket Created On",
"ticketCreatedBy":"Ticket Created By",
"messagesSent":"Messages Sent",
"status":"Status",
"participants":"Participants",
"role":"Role",
"switches":{
"globalAdmin":"Global Admin",
"ticketAdmin":"Ticket Admin",
"member":"Member",
"open":"Open",
"reopened":"Reopened",
"closed":"Closed",
"autoclosed":"Autoclosed"
},
"errorUserNotFound":"This user can't be found in the stats database!"
}
}
+35 -1
View File
@@ -1,6 +1,6 @@
{
"_CREDITS":"david.#8276 ",
"_INFO":"This file is a translation for open ticket 3.4.4",
"_INFO":"This file is a translation for open ticket 3.5.0",
"errors":{
"missingArgsTitle":"Ungültiges Argument!",
@@ -97,5 +97,39 @@
"wait":"Bitte warten!",
"estimated":"Verbleibende Zeit",
"available":"Das Transcript ist hier verfügbar"
},
"stats":{
"globalTitle":"Global Stats",
"ticketTitle":"Ticket Stats für {0}",
"userTitle":"NutzerStats für {0}",
"systemTitle":"System Stats",
"versionTitle":"Bot Version",
"ticketsCreated":"Tickets erstellt",
"ticketsClosed":"Tickets geschlossen",
"ticketsDeleted":"Tickets gelöscht",
"ticketsReopened":"Tickets wiedergeöffnet",
"ticketsAutoclosed":"Tickets Autogeschlossen",
"transcriptsCreated":"Transcripts erstellt",
"startupDate":"Start Datum",
"latestUpdate":"Letztes Update",
"ticketCreatedOn":"Ticket erstellt am",
"ticketCreatedBy":"Ticket erstellt von",
"messagesSent":"Nachrichten gesendet",
"status":"Status",
"participants":"Teilnehmer",
"role":"Rolle",
"switches":{
"globalAdmin":"Global Admin",
"ticketAdmin":"Ticket Admin",
"member":"Nutzer",
"open":"Öffnen",
"reopened":"Wiedergeöffnet",
"closed":"Geschlossen",
"autoclosed":"Autogeschlossen"
},
"errorUserNotFound":"Der Nutzer wurde in der Statistik-Datenbank nicht gefunden!"
}
}
+35 -1
View File
@@ -1,6 +1,6 @@
{
"_CREDITS":"ꙅoᴎɒᎸɘƚꙅ#3744",
"_INFO":"This file is a translation for open ticket 3.4.4",
"_INFO":"This file is a translation for open ticket 3.5.0",
"errors":{
"missingArgsTitle":"Invalid Arguments!",
@@ -97,5 +97,39 @@
"wait":"Παρακαλώ περιμένετε!",
"estimated":"Ώρα αναμονής",
"available":"Το αντίγραφο είναι ανοιχτώ εδώ!"
},
"stats":{
"globalTitle":"Global Stats",
"ticketTitle":"Ticket Stats for {0}",
"userTitle":"User Stats for {0}",
"systemTitle":"System Stats",
"versionTitle":"Bot Version",
"ticketsCreated":"Tickets Created",
"ticketsClosed":"Tickets Closed",
"ticketsDeleted":"Tickets Deleted",
"ticketsReopened":"Tickets Reopened",
"ticketsAutoclosed":"Tickets Autoclosed",
"transcriptsCreated":"Transcripts Created",
"startupDate":"Startup Date",
"latestUpdate":"Latest Update",
"ticketCreatedOn":"Ticket Created On",
"ticketCreatedBy":"Ticket Created By",
"messagesSent":"Messages Sent",
"status":"Status",
"participants":"Participants",
"role":"Role",
"switches":{
"globalAdmin":"Global Admin",
"ticketAdmin":"Ticket Admin",
"member":"Member",
"open":"Open",
"reopened":"Reopened",
"closed":"Closed",
"autoclosed":"Autoclosed"
},
"errorUserNotFound":"This user can't be found in the stats database!"
}
}
+35 -1
View File
@@ -1,6 +1,6 @@
{
"_CREDITS":"Snowy",
"_INFO":"This file is a translation for open ticket 3.4.4",
"_INFO":"This file is a translation for open ticket 3.5.0",
"errors":{
"missingArgsTitle":"Hibás paraméterek!",
@@ -97,5 +97,39 @@
"wait":"Kérlek várj!",
"estimated":"Becsült idő",
"available":"Az átirat itt érhető el"
},
"stats":{
"globalTitle":"Global Stats",
"ticketTitle":"Ticket Stats for {0}",
"userTitle":"User Stats for {0}",
"systemTitle":"System Stats",
"versionTitle":"Bot Version",
"ticketsCreated":"Tickets Created",
"ticketsClosed":"Tickets Closed",
"ticketsDeleted":"Tickets Deleted",
"ticketsReopened":"Tickets Reopened",
"ticketsAutoclosed":"Tickets Autoclosed",
"transcriptsCreated":"Transcripts Created",
"startupDate":"Startup Date",
"latestUpdate":"Latest Update",
"ticketCreatedOn":"Ticket Created On",
"ticketCreatedBy":"Ticket Created By",
"messagesSent":"Messages Sent",
"status":"Status",
"participants":"Participants",
"role":"Role",
"switches":{
"globalAdmin":"Global Admin",
"ticketAdmin":"Ticket Admin",
"member":"Member",
"open":"Open",
"reopened":"Reopened",
"closed":"Closed",
"autoclosed":"Autoclosed"
},
"errorUserNotFound":"This user can't be found in the stats database!"
}
}
+35 -1
View File
@@ -1,6 +1,6 @@
{
"_CREDITS":"erxg",
"_INFO":"This file is a translation for open ticket 3.4.4",
"_INFO":"This file is a translation for open ticket 3.5.0",
"errors":{
"missingArgsTitle":"Argumen tidak valid!",
@@ -97,5 +97,39 @@
"wait":"Mohon tunggu!",
"estimated":"Estimasi waktu",
"available":"Transkrip tersedia di sini"
},
"stats":{
"globalTitle":"Global Stats",
"ticketTitle":"Ticket Stats for {0}",
"userTitle":"User Stats for {0}",
"systemTitle":"System Stats",
"versionTitle":"Bot Version",
"ticketsCreated":"Tickets Created",
"ticketsClosed":"Tickets Closed",
"ticketsDeleted":"Tickets Deleted",
"ticketsReopened":"Tickets Reopened",
"ticketsAutoclosed":"Tickets Autoclosed",
"transcriptsCreated":"Transcripts Created",
"startupDate":"Startup Date",
"latestUpdate":"Latest Update",
"ticketCreatedOn":"Ticket Created On",
"ticketCreatedBy":"Ticket Created By",
"messagesSent":"Messages Sent",
"status":"Status",
"participants":"Participants",
"role":"Role",
"switches":{
"globalAdmin":"Global Admin",
"ticketAdmin":"Ticket Admin",
"member":"Member",
"open":"Open",
"reopened":"Reopened",
"closed":"Closed",
"autoclosed":"Autoclosed"
},
"errorUserNotFound":"This user can't be found in the stats database!"
}
}
+35 -1
View File
@@ -1,6 +1,6 @@
{
"_CREDITS":"Maurizio#0268",
"_INFO":"This file is a translation for open ticket 3.4.4",
"_INFO":"This file is a translation for open ticket 3.5.0",
"errors":{
"missingArgsTitle":"Argomenti non validi!",
@@ -97,5 +97,39 @@
"wait":"Perfavore attendi!",
"estimated":"Tempo estimato",
"available":"La trascrizione è disponibile qui"
},
"stats":{
"globalTitle":"Global Stats",
"ticketTitle":"Ticket Stats for {0}",
"userTitle":"User Stats for {0}",
"systemTitle":"System Stats",
"versionTitle":"Bot Version",
"ticketsCreated":"Tickets Created",
"ticketsClosed":"Tickets Closed",
"ticketsDeleted":"Tickets Deleted",
"ticketsReopened":"Tickets Reopened",
"ticketsAutoclosed":"Tickets Autoclosed",
"transcriptsCreated":"Transcripts Created",
"startupDate":"Startup Date",
"latestUpdate":"Latest Update",
"ticketCreatedOn":"Ticket Created On",
"ticketCreatedBy":"Ticket Created By",
"messagesSent":"Messages Sent",
"status":"Status",
"participants":"Participants",
"role":"Role",
"switches":{
"globalAdmin":"Global Admin",
"ticketAdmin":"Ticket Admin",
"member":"Member",
"open":"Open",
"reopened":"Reopened",
"closed":"Closed",
"autoclosed":"Autoclosed"
},
"errorUserNotFound":"This user can't be found in the stats database!"
}
}
+35 -1
View File
@@ -1,6 +1,6 @@
{
"_CREDITS":"NoOneNook#0266",
"_INFO":"This file is a translation for open ticket 3.4.4",
"_INFO":"This file is a translation for open ticket 3.5.0",
"errors":{
"missingArgsTitle":"Ugyldige argumenter!",
@@ -97,5 +97,39 @@
"wait":"Vennligst vent!",
"estimated":"Beregnet tid",
"available":"Loggfil er tilgjengelig over denne meldingen!"
},
"stats":{
"globalTitle":"Globale Stats",
"ticketTitle":"Ticket Stats for {0}",
"userTitle":"Bruker Stats for {0}",
"systemTitle":"System Stats",
"versionTitle":"Bot Versjon",
"ticketsCreated":"Tickets Laget",
"ticketsClosed":"Tickets Lukket",
"ticketsDeleted":"Tickets Slettet",
"ticketsReopened":"Tickets Gjenåpnet",
"ticketsAutoclosed":"Tickets Auto-lukket",
"transcriptsCreated":"Transcripts Opprettet",
"startupDate":"Start Dato",
"latestUpdate":"Siste Oppdatering",
"ticketCreatedOn":"Ticket Laget den",
"ticketCreatedBy":"Ticket Laget av",
"messagesSent":"Meldinger sendt",
"status":"Status",
"participants":"Deltakere",
"role":"Rolle",
"switches":{
"globalAdmin":"Global Admin",
"ticketAdmin":"Ticket Admin",
"member":"Medlem",
"open":"Åpen",
"reopened":"Gjenåpnet",
"closed":"Lukket",
"autoclosed":"Auto-Lukket"
},
"errorUserNotFound":"Denne brukeren kan ikke bli funnet i statistikkdatabasen!"
}
}
+35 -1
View File
@@ -1,6 +1,6 @@
{
"_CREDITS":"MKevas#8311",
"_INFO":"This file is a translation for open ticket 3.4.4",
"_INFO":"This file is a translation for open ticket 3.5.0",
"errors":{
"missingArgsTitle":"Nieprawidłowe argumenty!",
@@ -97,5 +97,39 @@
"wait":"Proszę czekać!",
"estimated":"Szacowany czas",
"available":"Transkrypcja jest dostępna tutaj"
},
"stats":{
"globalTitle":"Global Stats",
"ticketTitle":"Ticket Stats for {0}",
"userTitle":"User Stats for {0}",
"systemTitle":"System Stats",
"versionTitle":"Bot Version",
"ticketsCreated":"Tickets Created",
"ticketsClosed":"Tickets Closed",
"ticketsDeleted":"Tickets Deleted",
"ticketsReopened":"Tickets Reopened",
"ticketsAutoclosed":"Tickets Autoclosed",
"transcriptsCreated":"Transcripts Created",
"startupDate":"Startup Date",
"latestUpdate":"Latest Update",
"ticketCreatedOn":"Ticket Created On",
"ticketCreatedBy":"Ticket Created By",
"messagesSent":"Messages Sent",
"status":"Status",
"participants":"Participants",
"role":"Role",
"switches":{
"globalAdmin":"Global Admin",
"ticketAdmin":"Ticket Admin",
"member":"Member",
"open":"Open",
"reopened":"Reopened",
"closed":"Closed",
"autoclosed":"Autoclosed"
},
"errorUserNotFound":"This user can't be found in the stats database!"
}
}
+35 -1
View File
@@ -1,6 +1,6 @@
{
"_CREDITS":"QuirAddon#9778",
"_INFO":"This file is a translation for open ticket 3.4.4",
"_INFO":"This file is a translation for open ticket 3.5.0",
"errors":{
"missingArgsTitle":"Argumentos inválidos!",
@@ -97,5 +97,39 @@
"wait":"Por favor espere!",
"estimated":"Tempo estimado",
"available":"A Transcrição está disponível aqui"
},
"stats":{
"globalTitle":"Global Stats",
"ticketTitle":"Ticket Stats for {0}",
"userTitle":"User Stats for {0}",
"systemTitle":"System Stats",
"versionTitle":"Bot Version",
"ticketsCreated":"Tickets Created",
"ticketsClosed":"Tickets Closed",
"ticketsDeleted":"Tickets Deleted",
"ticketsReopened":"Tickets Reopened",
"ticketsAutoclosed":"Tickets Autoclosed",
"transcriptsCreated":"Transcripts Created",
"startupDate":"Startup Date",
"latestUpdate":"Latest Update",
"ticketCreatedOn":"Ticket Created On",
"ticketCreatedBy":"Ticket Created By",
"messagesSent":"Messages Sent",
"status":"Status",
"participants":"Participants",
"role":"Role",
"switches":{
"globalAdmin":"Global Admin",
"ticketAdmin":"Ticket Admin",
"member":"Member",
"open":"Open",
"reopened":"Reopened",
"closed":"Closed",
"autoclosed":"Autoclosed"
},
"errorUserNotFound":"This user can't be found in the stats database!"
}
}
+35 -1
View File
@@ -1,6 +1,6 @@
{
"_CREDITS":"Sanke#6086",
"_INFO":"This file is a translation for open ticket 3.4.4",
"_INFO":"This file is a translation for open ticket 3.5.0",
"errors":{
"missingArgsTitle":"Argumente Invalide",
@@ -97,5 +97,39 @@
"wait":"Te rugam sa astepti!",
"estimated":"Timp estimat",
"available":"Transcriptul este disponibil aici"
},
"stats":{
"globalTitle":"Statistici Globale",
"ticketTitle":"Statistici Ticket pentru {0}",
"userTitle":"Statistici utilizator pentru {0}",
"systemTitle":"Statistici Sistem",
"versionTitle":"Versiune Bot",
"ticketsCreated":"Tickete Create",
"ticketsClosed":"Tickets Inchise",
"ticketsDeleted":"Tickete Sterse",
"ticketsReopened":"Tickete Redeschise",
"ticketsAutoclosed":"Tickets Inchise automat",
"transcriptsCreated":"Transcript-uri create",
"startupDate":"Data startup",
"latestUpdate":"Update recent",
"ticketCreatedOn":"Ticket creat pe data",
"ticketCreatedBy":"Ticket Creat de",
"messagesSent":"Mesaje trimise",
"status":"Status",
"participants":"Participanti",
"role":"Rol",
"switches":{
"globalAdmin":"Admin Global",
"ticketAdmin":"Admin Ticket",
"member":"Membru",
"open":"Deschis",
"reopened":"Redeschis",
"closed":"Inchis",
"autoclosed":"Inchis automat"
},
"errorUserNotFound":"Acest utilizator nu poate fi gasit in database-ul nostru!"
}
}
+35 -1
View File
@@ -1,6 +1,6 @@
{
"_CREDITS":"Apexo#0723",
"_INFO":"This file is a translation for open ticket 3.4.4",
"_INFO":"This file is a translation for open ticket 3.5.0",
"errors":{
"missingArgsTitle":"Неверные аргументы!",
@@ -97,5 +97,39 @@
"wait":"Пожайлуста подождите!",
"estimated":"Оценочное время",
"available":"Транскрипт здесь доступен"
},
"stats":{
"globalTitle":"Общая статистика",
"ticketTitle":"Статистика тикета для {0}",
"userTitle":"Статистика пользователя для {0}",
"systemTitle":"Системная статистика",
"versionTitle":"Версия бота",
"ticketsCreated":"Тикет создан",
"ticketsClosed":"Тикет закрыт",
"ticketsDeleted":"Тикет удален",
"ticketsReopened":"Тикет переоткрыт",
"ticketsAutoclosed":"Тикет автоматически закрыт",
"transcriptsCreated":"Транскрипт создан",
"startupDate":"Дата запуска",
"latestUpdate":"Последнее обновление",
"ticketCreatedOn":"Тикет создан",
"ticketCreatedBy":"Тикет создан",
"messagesSent":"Сообщение отправлено",
"status":"Статус",
"participants":"Участники",
"role":"Роль",
"switches":{
"globalAdmin":"Главная",
"ticketAdmin":"Тикет",
"member":"Участник",
"open":"Открыть",
"reopened":"Переоткрытый",
"closed":"Закрыт",
"autoclosed":"Автоматически закрыт"
},
"errorUserNotFound":"Участник не найден в базе данных статистики!"
}
}
+35 -1
View File
@@ -1,6 +1,6 @@
{
"_CREDITS":"n1kkec#5341",
"_INFO":"This file is a translation for open ticket 3.4.4",
"_INFO":"This file is a translation for open ticket 3.5.0",
"errors":{
"missingArgsTitle":"Napačen argument!",
@@ -97,5 +97,39 @@
"wait": "Počakajte!",
"estimated": "Predvideni čas",
"available": "Prepis je na voljo tukaj"
},
"stats":{
"globalTitle":"Global Stats",
"ticketTitle":"Ticket Stats for {0}",
"userTitle":"User Stats for {0}",
"systemTitle":"System Stats",
"versionTitle":"Bot Version",
"ticketsCreated":"Tickets Created",
"ticketsClosed":"Tickets Closed",
"ticketsDeleted":"Tickets Deleted",
"ticketsReopened":"Tickets Reopened",
"ticketsAutoclosed":"Tickets Autoclosed",
"transcriptsCreated":"Transcripts Created",
"startupDate":"Startup Date",
"latestUpdate":"Latest Update",
"ticketCreatedOn":"Ticket Created On",
"ticketCreatedBy":"Ticket Created By",
"messagesSent":"Messages Sent",
"status":"Status",
"participants":"Participants",
"role":"Role",
"switches":{
"globalAdmin":"Global Admin",
"ticketAdmin":"Ticket Admin",
"member":"Member",
"open":"Open",
"reopened":"Reopened",
"closed":"Closed",
"autoclosed":"Autoclosed"
},
"errorUserNotFound":"This user can't be found in the stats database!"
}
}
+35 -1
View File
@@ -1,6 +1,6 @@
{
"_CREDITS":"Redactado#1673 & josuens14#5267",
"_INFO":"This file is a translation for open ticket 3.4.4",
"_INFO":"This file is a translation for open ticket 3.5.0",
"errors":{
"missingArgsTitle":"¡Argumentos inválidos!",
@@ -97,5 +97,39 @@
"wait":"¡Por favor, espere!",
"estimated":"Tiempo estimado",
"available":"La transcripción estará disponible aquí"
},
"stats":{
"globalTitle":"Global Stats",
"ticketTitle":"Ticket Stats for {0}",
"userTitle":"User Stats for {0}",
"systemTitle":"System Stats",
"versionTitle":"Bot Version",
"ticketsCreated":"Tickets Created",
"ticketsClosed":"Tickets Closed",
"ticketsDeleted":"Tickets Deleted",
"ticketsReopened":"Tickets Reopened",
"ticketsAutoclosed":"Tickets Autoclosed",
"transcriptsCreated":"Transcripts Created",
"startupDate":"Startup Date",
"latestUpdate":"Latest Update",
"ticketCreatedOn":"Ticket Created On",
"ticketCreatedBy":"Ticket Created By",
"messagesSent":"Messages Sent",
"status":"Status",
"participants":"Participants",
"role":"Role",
"switches":{
"globalAdmin":"Global Admin",
"ticketAdmin":"Ticket Admin",
"member":"Member",
"open":"Open",
"reopened":"Reopened",
"closed":"Closed",
"autoclosed":"Autoclosed"
},
"errorUserNotFound":"This user can't be found in the stats database!"
}
}
+35 -1
View File
@@ -1,6 +1,6 @@
{
"_CREDITS":"Mods HD#0661",
"_INFO":"This file is a translation for open ticket 3.4.4",
"_INFO":"This file is a translation for open ticket 3.5.0",
"errors":{
"missingArgsTitle":"อาร์กิวเมนต์ไม่ถูกต้อง!",
@@ -97,5 +97,39 @@
"wait":"กรุณารอ!",
"estimated":"เวลาโดยประมาณ",
"available":"บันทึกการสนทนาสามารถใช้งานได้ที่นี่"
},
"stats":{
"globalTitle":"สถิติทั้งหมด",
"ticketTitle":"สถิติห้องติดต่อสำหรับ {0}",
"userTitle":"สถิติผู้ใช้สำหรับ {0}",
"systemTitle":"สถานะระบบ",
"versionTitle":"เวอร์ชั่นของบอท",
"ticketsCreated":"ห้องติดต่อที่สร้าง",
"ticketsClosed":"ห้องติดต่อที่ปิด",
"ticketsDeleted":"ห้องติดต่อที่ลบ:",
"ticketsReopened":"ห้องติดต่อที่เปิดใหม่",
"ticketsAutoclosed":"ห้องติดต่อที่ปิดโดยอัตโนมัติ",
"transcriptsCreated":"ทรานสคริปต์ที่สร้าง",
"startupDate":"วันที่เริ่มต้น",
"latestUpdate":"การอัปเดตล่าสุด",
"ticketCreatedOn":"ห้องติดต่อที่สร้างเมื่อ",
"ticketCreatedBy":"ห้องติดต่อที่สร้างโดย",
"messagesSent":"ข้อความที่ส่ง",
"status":"สถานะ",
"participants":"ผู้มีส่วนร่วม",
"role":"บทบาท",
"switches":{
"globalAdmin":"ผู้ดูแลทั้งหมด",
"ticketAdmin":"ผู้ดูแลห้องติดต่อ",
"member":"ผู้ใช้",
"open":"เปิด",
"reopened":"เปิดใหม่",
"closed":"ปิด",
"autoclosed":"ปิดโดยอัตโนมัติ"
},
"errorUserNotFound":"ไม่พบผู้ใช้ในฐานข้อมูลสถิติ!"
}
}
+35 -1
View File
@@ -1,6 +1,6 @@
{
"_CREDITS":"Hydrâelčhâvø#1575",
"_INFO":"This file is a translation for open ticket 3.4.4",
"_INFO":"This file is a translation for open ticket 3.5.0",
"errors":{
"missingArgsTitle":"Geçersiz argümanlar!",
@@ -97,5 +97,39 @@
"wait":"Lütfen Bekleyiniz!",
"estimated":"Tahmini Süre",
"available":"Transkript burada mevcuttur"
},
"stats":{
"globalTitle":"Global Stats",
"ticketTitle":"Ticket Stats for {0}",
"userTitle":"User Stats for {0}",
"systemTitle":"System Stats",
"versionTitle":"Bot Version",
"ticketsCreated":"Tickets Created",
"ticketsClosed":"Tickets Closed",
"ticketsDeleted":"Tickets Deleted",
"ticketsReopened":"Tickets Reopened",
"ticketsAutoclosed":"Tickets Autoclosed",
"transcriptsCreated":"Transcripts Created",
"startupDate":"Startup Date",
"latestUpdate":"Latest Update",
"ticketCreatedOn":"Ticket Created On",
"ticketCreatedBy":"Ticket Created By",
"messagesSent":"Messages Sent",
"status":"Status",
"participants":"Participants",
"role":"Role",
"switches":{
"globalAdmin":"Global Admin",
"ticketAdmin":"Ticket Admin",
"member":"Member",
"open":"Open",
"reopened":"Reopened",
"closed":"Closed",
"autoclosed":"Autoclosed"
},
"errorUserNotFound":"This user can't be found in the stats database!"
}
}
+35 -1
View File
@@ -1,6 +1,6 @@
{
"_CREDITS":"Anderskiy#4093",
"_INFO":"Цей файл є перекладом для open ticket 3.4.4",
"_INFO":"Цей файл є перекладом для open ticket 3.5.0",
"errors":{
"missingArgsTitle":"Невірні аргументи!",
@@ -97,5 +97,39 @@
"wait":"Будь-ласка почекайте!",
"estimated":"Розрахунковий час",
"available":"Транскрипція доступна тут"
},
"stats":{
"globalTitle":"Загальна статистика",
"ticketTitle":"Статистика тікету для {0}",
"userTitle":"Статистика корстувача для {0}",
"systemTitle":"Системна статистика",
"versionTitle":"Версія бота",
"ticketsCreated":"Тікет створен",
"ticketsClosed":"Тікет закрито",
"ticketsDeleted":"Тікет видалено",
"ticketsReopened":"Тікет перевідкритий",
"ticketsAutoclosed":"Тікет автоматично закритий",
"transcriptsCreated":"Транскрипт створено",
"startupDate":"Дата запуску",
"latestUpdate":"Останнє оновлення",
"ticketCreatedOn":"Тікет створено",
"ticketCreatedBy":"Тікет створено",
"messagesSent":"Повідомлення відправлено",
"status":"Стан",
"participants":"Учасники",
"role":"Роль",
"switches":{
"globalAdmin":"Головна",
"ticketAdmin":"Тікет",
"member":"Учасник",
"open":"Відкрити",
"reopened":"Перевідкритий",
"closed":"Закритий",
"autoclosed":"Автоматично закритий"
},
"errorUserNotFound":"Учасник не знайдений у базі даних статистики!"
}
}
+4 -4
View File
@@ -1,11 +1,11 @@
{
"name": "open-ticket",
"version": "3.4.4",
"version": "3.5.0",
"description": "This is an open-source discord ticket bot, you can configure it and it comes with cool features like a transcript.",
"main": "index.js",
"scripts": {
"start": "node index.js",
"test": "node index.js --devconfig",
"test": "node index.js --devconfig --noerrorupload",
"slashEnable": "node index.js slash enable",
"slashDisable": "node index.js slash disable",
"cleardata": "node ./core/dynamicdatabase/cleardata.js"
@@ -13,9 +13,9 @@
"author": "DJdj Development",
"license": "ISC",
"dependencies": {
"axios": "^0.27.2",
"axios": "^1.6.2",
"chalk": "^5.0.1",
"discord.js": "^14.11.0"
"discord.js": "^14.14.1"
},
"repository": {
"type": "git",
+4
View File
@@ -27,6 +27,10 @@
"valueTextColor":"#ffffff",
"hideBackgroundColor":"#40444a",
"hideTextColor":"#ffffff"
},
"favicon":{
"enableCustomFavicon":false,
"imageUrl":"https://transcripts.dj-dj.be/favicon.png"
}
}
}