Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
407e56a806 | ||
|
|
e0f42834e5 | ||
|
|
d03abd9eeb | ||
|
|
466a4aea81 | ||
|
|
9d96d11cd3 | ||
|
|
e3b99e656e | ||
|
|
07e2a68d06 | ||
|
|
795ca4f981 | ||
|
|
5231129278 | ||
|
|
f62bc7adf9 | ||
|
|
5de6b1e906 | ||
|
|
62413505d6 | ||
|
|
20b617f6eb | ||
|
|
94510bbfb0 | ||
|
|
d51511fdb5 | ||
|
|
3447a37603 | ||
|
|
4b17aa640f | ||
|
|
3b7674f1a5 | ||
|
|
7de9339da3 | ||
|
|
e2e1e19bc8 | ||
|
|
5f19adf561 | ||
|
|
1bb70745ea | ||
|
|
589bbe5cd5 | ||
|
|
447fddea56 | ||
|
|
bf7a003799 | ||
|
|
6115ab1cc8 | ||
|
|
c2307fd1ed | ||
|
|
2a3850c3cc | ||
|
|
688c40ce7b | ||
|
|
dee2a21be9 | ||
|
|
d7ae040d60 | ||
|
|
7b6202985a | ||
|
|
a2f2c601a5 | ||
|
|
b27016df2e | ||
|
|
6341f2f71b | ||
|
|
56a5b9c7d0 | ||
|
|
f608cb71ce | ||
|
|
7c7c325307 | ||
|
|
832021d72a | ||
|
|
030554a7f5 | ||
|
|
ada5ea0c5d | ||
|
|
fb6b891835 | ||
|
|
739ad81f3f | ||
|
|
a6f67a9452 | ||
|
|
56a6540663 | ||
|
|
5f8812d261 | ||
|
|
7a3dcf4c42 | ||
|
|
7cebd4dd6a | ||
|
|
27912a0c37 | ||
|
|
67871d885a | ||
|
|
1bd0d013ed | ||
|
|
a074a17519 | ||
|
|
67af96ef5c | ||
|
|
a041f28cf7 | ||
|
|
a8c9c2ea8d | ||
|
|
8748301b04 | ||
|
|
2d7a7b5728 | ||
|
|
0807ca884c | ||
|
|
0ead037fa8 | ||
|
|
4287c11bf1 | ||
|
|
69fdc7ccf0 | ||
|
|
6c213306b6 | ||
|
|
4096e8196d | ||
|
|
94ee890848 | ||
|
|
4dced819a3 | ||
|
|
1159af9fa9 | ||
|
|
67d429c52b | ||
|
|
f67af805c1 | ||
|
|
944032f690 | ||
|
|
ee248e86bc | ||
|
|
b171bce62b | ||
|
|
df0bce0189 | ||
|
|
2630aa899f | ||
|
|
dba370d66e | ||
|
|
d0bcf26b93 | ||
|
|
65f82171d3 | ||
|
|
6e730f058d | ||
|
|
4702c633ec | ||
|
|
dc14a39c4e | ||
|
|
05c97909d4 | ||
|
|
b3c4c2f6e8 | ||
|
|
e0e678bee0 | ||
|
|
1b01b1703f | ||
|
|
26539360c6 | ||
|
|
627c461f64 | ||
|
|
2e40dc0468 | ||
|
|
fa57b9a93f | ||
|
|
930452155b | ||
|
|
e70f22162d | ||
|
|
d5b0a0f3c6 | ||
|
|
c43081e05d | ||
|
|
8c4bf735f1 | ||
|
|
3a20c4707b | ||
|
|
9a7e563c57 | ||
|
|
72b4f43a25 | ||
|
|
5fec028cc9 | ||
|
|
81300303e5 | ||
|
|
8a1ea1c856 | ||
|
|
8a9d63bf8b | ||
|
|
208b365276 | ||
|
|
abb64a0575 | ||
|
|
c930140540 | ||
|
|
294c4d3f2b | ||
|
|
28e7d48e7e | ||
|
|
bad278e681 | ||
|
|
2e2542d064 | ||
|
|
2c48da45ae | ||
|
|
e1232a559e | ||
|
|
3d58475461 | ||
|
|
f702b199da | ||
|
|
ea1604a805 | ||
|
|
f8bc3d9e12 | ||
|
|
af35f83291 | ||
|
|
39fec94ead | ||
|
|
1b8468330e | ||
|
|
b698c89a89 | ||
|
|
7ed2d7bcc7 | ||
|
|
f2ddaa5fd4 | ||
|
|
fc50a8e83f | ||
|
|
5bece3357d | ||
|
|
97d1489558 | ||
|
|
a211cef1f6 | ||
|
|
ae002e168b | ||
|
|
86a5a1a2ca | ||
|
|
23ebc14b8b | ||
|
|
3a5768a1b1 | ||
|
|
33c3803ca8 | ||
|
|
f3613fb674 | ||
|
|
f1dc8cbcf5 | ||
|
|
a365c4b69f | ||
|
|
687372481a | ||
|
|
1bc8bde922 |
@@ -0,0 +1,43 @@
|
||||
# Contributing
|
||||
## Translation
|
||||
### Step 1: checking
|
||||
1. [Check if the language isn't already in open ticket!](/language/)
|
||||
2. Check if the current translation is up-to-date!
|
||||
3. Can you edit/write JSON?
|
||||
|
||||
If there is translation missing & you can write json, then go to the next step!
|
||||
|
||||
### Step 2: translating
|
||||
**RULES:**
|
||||
- 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 2 are optional & will be added by us if you don't do it!
|
||||
1. add `yourlanguage.json` to the `/language/` directory
|
||||
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!
|
||||
|
||||
## Writing plugins
|
||||
We are going to create an official repository for plugins soon!
|
||||
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 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 further!
|
||||
|
||||
<br>
|
||||
CONTRIBUTING GUIDELINES - Last updated: 23/3/2023<br>
|
||||
© DJdj Development<br><br>
|
||||
Website: https://www.dj-dj.be <br>
|
||||
Discord: https://discord.dj-dj.be <br>
|
||||
Email: support@dj-dj.be <br>
|
||||
Open Ticket website: https://openticket.dj-dj.be
|
||||
@@ -0,0 +1,37 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Report bugs to help us improve open ticket!
|
||||
title: "[BUG] your bug"
|
||||
labels: bug
|
||||
assignees: DJj123dj
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Device:**
|
||||
- Device: [e.g. Macbook pro, raspberry pi, HP Probook]
|
||||
- OS: [e.g. MacOS, Ubuntu, Windows,...]
|
||||
- Node.js version:
|
||||
- Open Ticket Version:
|
||||
|
||||
**Files:**
|
||||
Please include the `openticketdebug.txt` file in your report!
|
||||
This is a file that we can see what happend!
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
@@ -0,0 +1,29 @@
|
||||
---
|
||||
name: Plugin
|
||||
about: Show your plugin to the developers from open ticket!
|
||||
title: "[PLUGIN] your plugin"
|
||||
labels: plugin
|
||||
assignees: DJj123dj
|
||||
|
||||
---
|
||||
|
||||
**Plugin Name:**
|
||||
What's the name of your plugin?
|
||||
|
||||
**Description:**
|
||||
Tell a little bit about what the plugin does!
|
||||
Also tell how to use the plugin, like if there is additional setup needed!
|
||||
|
||||
**NPM libraries:**
|
||||
List all the libraries needed for this plugin to work!
|
||||
*The default open ticket libraries are not required!*
|
||||
|
||||
**Author:**
|
||||
- github account [e.g. DJj123dj]
|
||||
- discord account [e.g. Wumpus#1234]
|
||||
|
||||
**Compatible versions:**
|
||||
[e.g. from v2.2.1 until v3.0.1]
|
||||
|
||||
**File:**
|
||||
Please attach the plugin file to this issue!
|
||||
@@ -0,0 +1,41 @@
|
||||
# Security Policy
|
||||
|
||||
## Supported Versions
|
||||
Below, you can find a list with the status of every open ticket version. This list will change every update!
|
||||
|
||||
- ✅ Supported **(bugs, errors, discord support, documentation, html transcripts)**
|
||||
- 🟧 Deprecated / Partially Supported **(discord support, documentation, html transcripts)**
|
||||
- ❌ Fully Deprecated / Not Supported **(sometimes documentation)**
|
||||
|
||||
| Version | Supported | Until |
|
||||
|-----------|-----------|-----------------------------|
|
||||
| 3.5.3 | ✅ | |
|
||||
| 3.5.2 | ✅ | April 2024 |
|
||||
| 3.5.1 | 🟧 | Next Update |
|
||||
| 3.5.0 | 🟧 | Next Update |
|
||||
| < 3.5.0 | ❌ | |
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
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)
|
||||
|
||||
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: 14/12/2023<br>
|
||||
© DJdj Development<br><br>
|
||||
Website: https://www.dj-dj.be <br>
|
||||
Discord: https://discord.dj-dj.be <br>
|
||||
Email: support@dj-dj.be <br>
|
||||
Open Ticket website: https://openticket.dj-dj.be
|
||||
+13
-6
@@ -1,16 +1,23 @@
|
||||
node_modules/
|
||||
package-lock.json
|
||||
devConfig.json
|
||||
devConfig1.json
|
||||
devConfig2.json
|
||||
devConfig3.json
|
||||
devConfig4.json
|
||||
devConfig5.json
|
||||
devconfig.json
|
||||
devconfig1.json
|
||||
devconfig2.json
|
||||
devconfig3.json
|
||||
devconfig4.json
|
||||
devconfig5.json
|
||||
.DS_Store
|
||||
openticketdebug.txt
|
||||
developerChangelog.md
|
||||
storage/dynamicDB/
|
||||
storage/slashcmdEnabled.txt
|
||||
storage/database.json
|
||||
storage/tsdatabase.json
|
||||
storage/stats.json
|
||||
storage/.DS_Store
|
||||
.vscode/
|
||||
livestatus.json
|
||||
test.js
|
||||
devtsconfig.json
|
||||
plugins/*
|
||||
!plugins/example.plugin.js
|
||||
@@ -1,3 +0,0 @@
|
||||
# comming soon
|
||||
For now on, you can create a ticket in our server:
|
||||
https://discord.dj-dj.be
|
||||
@@ -1,59 +1,85 @@
|
||||
# Open Ticket
|
||||
[](https://discord.com/invite/26vT9wt3n3) [](https://github.com/DJj123dj/open-ticket/releases/tag/v3.0.0) []() [](https://github.com/DJj123dj/open-ticket/blob/main/LICENSE) [](https://docs.openticket.dj-dj.be)
|
||||
# Coming Soon: OPEN TICKET v4.0 🎉
|
||||
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>
|
||||
|
||||
Open ticket is the most configurable open-source ticket bot for discord! Made with the newest technologies. Like: Slash commands, transcripts, multiple ticket types, buttons & dropdowns!
|
||||
Start using it now, you can do anything!
|
||||
<img src="https://apis.dj-dj.be/cdn/openticket/logo.png" alt="Open Ticket" width="600px">
|
||||
|
||||
*We love to hear suggestions for more features!*
|
||||
[](https://discord.com/invite/26vT9wt3n3) [](https://github.com/DJj123dj/open-ticket/releases/tag/v3.5.3) []() [](https://github.com/DJj123dj/open-ticket/blob/main/LICENSE) [](https://docs.openticket.dj-dj.be)
|
||||
|
||||
<img src="logo.png" alt="Open Ticket logo" style="height: 200px; width:200px;"/>
|
||||
### 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!
|
||||
|
||||
[](https://www.github.com/DJj123dj/open-ticket/wiki)
|
||||
Take a look at all the features and discover the possibilities!
|
||||
### [Visit the Documentation!](https://docs.openticket.dj-dj.be/quick-start)
|
||||
|
||||
### Thanks to these people:
|
||||
- DJ-Lite: for doing the administration
|
||||
- Sanke: for translation & new ideas
|
||||
- Everyone that reported a bug
|
||||
#### And our translators!
|
||||
- ExothDE
|
||||
- 1x1
|
||||
- Redactado
|
||||
- t0miiis
|
||||
- josuens14
|
||||
- M4
|
||||
- David.
|
||||
- Maurizio
|
||||
## Features
|
||||
- **🎉 advanced html transcripts!**
|
||||
- 🔒 close, ❌ delete & ✅ re-open tickets
|
||||
- 🇬🇧 translation in 19 different languages
|
||||
- 📄 very advanced customisation
|
||||
- 🆗 buttons or 🔽 dropdowns!
|
||||
- 🆒 plugins
|
||||
- ∞ unlimited tickets & unlimited messages
|
||||
- ➕➖ add/remove users from a ticket
|
||||
- 📊 ticket, user & global staticstics
|
||||
- /slash & text commands
|
||||
|
||||
## features
|
||||
- discord interaction buttons
|
||||
- slash & text commands
|
||||
- close, delete & re-open tickets
|
||||
- translation in 10 different languages
|
||||
- transcripts
|
||||
- add/remove users from a ticket
|
||||
- a lot of customisation options.
|
||||
- tickets, reaction roles & links are all possible!
|
||||
- choose between buttons or dropdowns!
|
||||
- discord.js v14
|
||||
- everyting is configurable
|
||||
- custom API + plugins
|
||||
- unlimited tickets spread over multiple messages
|
||||
- close with reason
|
||||
<details>
|
||||
<summary><b>But wait, there are even more features! Click here to discover!</b></summary>
|
||||
|
||||
*comming soon*
|
||||
- share transcripts
|
||||
- view transcripts in html
|
||||
|
||||
## quick start
|
||||
[Click here to start your adventure!](https://docs.openticket.dj-dj.be/quick-start)
|
||||
- fully customisable embeds & buttons
|
||||
- close tickets with reason
|
||||
- reaction roles (or verification system)
|
||||
- discord interaction buttons
|
||||
- discord.js v14
|
||||
</details>
|
||||
|
||||
## documentation
|
||||
[Official Documentation](https://docs.openticket.dj-dj.be)
|
||||
## preview
|
||||
<img src="https://apis.dj-dj.be/cdn/openticket/message_buttons.png" alt="Message with buttons" width="350px">
|
||||
<img src="https://apis.dj-dj.be/cdn/openticket/message_dropdown.png" alt="Message with dropdown" width="350px">
|
||||
<br>
|
||||
<img src="https://apis.dj-dj.be/cdn/openticket/firstmsg.png" alt="Ticket start message" width="350px">
|
||||
<img src="https://apis.dj-dj.be/cdn/openticket/command_close.png" alt="Ticket start message" width="350px">
|
||||
|
||||
## information
|
||||
|
||||
_v3.0.0_
|
||||
## credits
|
||||
### Developer Team
|
||||
|Role |User (discord name)|
|
||||
|-----------------|-------------------|
|
||||
|Lead Developer |djj123dj |
|
||||
|Developer |sankedev |
|
||||
|Support Team |lover_catss |
|
||||
|Designer |vuur_draak |
|
||||
|
||||
changelog: [click here](https://docs.openticket.dj-dj.be/other/changelog)
|
||||
### Translators
|
||||
|Language |Maintainer (discord name) |Status |
|
||||
|-------------------|--------------------------|--------------------------------|
|
||||
|English |djj123dj |🟢 Up To Date |
|
||||
|Dutch |djj123dj |🟢 Up To Date |
|
||||
|French |sankedev & tostam |🟢 Up To Date |
|
||||
|Romanian |sankedev |🟢 Up To Date |
|
||||
|Spanish |redactado & josuens |🟢 Up To Date |
|
||||
|German |david.3 |🟢 Up To Date |
|
||||
|Italian |maurizio26 |🟢 Up To Date |
|
||||
|Czech |spyeye_ |🟢 Up To Date |
|
||||
|Arabic |deqressing |🟢 Up To Date |
|
||||
|Danish |.the_gamer |🟢 Up To Date |
|
||||
|Portuguese |quiradon |🔴 Outdated |
|
||||
|Russian |apexo & ander |🟢 Up To Date |
|
||||
|Ukrainian |ander |🟢 Up To Date |
|
||||
|Turkish |Hydra#0009 |🔴 Outdated |
|
||||
|Polish |mkevas |🟢 Up To Date |
|
||||
|Slovenian |n1kkec |🔴 Outdated |
|
||||
|Thai |modshd |🟢 Up To Date |
|
||||
|Norwegian |noonenook |🟢 Up To Date |
|
||||
|Greek |stefanos__. |🔴 Outdated |
|
||||
|Indonesian |erxg |🟢 Up To Date |
|
||||
|
||||
© 2022 - DJdj Development | [website](https://www.dj-dj.be) | [discord](https://discord.dj-dj.be) | [terms of service](https://www.dj-dj.be/terms)
|
||||
## links
|
||||
current version: _v3.5.3_
|
||||
</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)
|
||||
|
||||
+21
-26
@@ -18,62 +18,57 @@ 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)){
|
||||
|
||||
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.messages.fetchPinned().then(msglist => {
|
||||
var firstmsg = msglist.last()
|
||||
if (firstmsg == undefined || firstmsg.author.id != client.user.id) return msg.channel.send({embeds:[bot.errorLog.notInATicket]})
|
||||
const hiddendata = bot.hiddenData.readHiddenData(firstmsg.embeds[0].description)
|
||||
const ticketId = hiddendata.data.find(d => d.key == "type").value
|
||||
|
||||
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)]})
|
||||
|
||||
var loguser = msg.mentions.users.first()
|
||||
log("command","someone used the 'add' command",[{key:"user",value:msg.author.tag}])
|
||||
log("system","user added to ticket",[{key:"user",value:msg.author.tag},{key:"ticket",value:msg.channel.name},{key:"added_user",value:loguser.tag}])
|
||||
log("command","someone used the 'add' command",[{key:"user",value:msg.author.username}])
|
||||
log("system","user added to ticket",[{key:"user",value:msg.author.username},{key:"ticket",value:msg.channel.name},{key:"added_user",value:loguser.username}])
|
||||
|
||||
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",(interaction) => {
|
||||
if (!DISABLE.commands.slash.add) client.on("interactionCreate",async (interaction) => {
|
||||
if (!interaction.isChatInputCommand()) return
|
||||
if (interaction.commandName != "add") return
|
||||
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.reply({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.channel.messages.fetchPinned().then(msglist => {
|
||||
var firstmsg = msglist.last()
|
||||
if (firstmsg == undefined || firstmsg.author.id != client.user.id) return interaction.reply({embeds:[bot.errorLog.notInATicket]})
|
||||
const hiddendata = bot.hiddenData.readHiddenData(firstmsg.embeds[0].description)
|
||||
const ticketId = hiddendata.data.find(d => d.key == "type").value
|
||||
await interaction.deferReply()
|
||||
|
||||
interaction.channel.permissionOverwrites.create(user.id, { ViewChannel:true, AddReactions:true,AttachFiles:true, EmbedLinks:true, SendMessages:true})
|
||||
interaction.reply({embeds:[bot.embeds.commands.addEmbed(user,interaction.user)]})
|
||||
interaction.editReply({embeds:[bot.embeds.commands.addEmbed(user,interaction.user)]})
|
||||
|
||||
var loguser = user
|
||||
log("command","someone used the 'add' command",[{key:"user",value:interaction.user.tag}])
|
||||
log("system","user added to ticket",[{key:"user",value:interaction.user.tag},{key:"ticket",value:interaction.channel.name},{key:"added_user",value:loguser.tag}])
|
||||
log("command","someone used the 'add' command",[{key:"user",value:interaction.user.username}])
|
||||
log("system","user added to ticket",[{key:"user",value:interaction.user.username},{key:"ticket",value:interaction.channel.name},{key:"added_user",value:loguser.username}])
|
||||
|
||||
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())
|
||||
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,134 @@
|
||||
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 change.js")
|
||||
|
||||
if (!DISABLE.commands.text.change) client.on("messageCreate", async msg => {
|
||||
if (!msg.content.startsWith(config.prefix+"change")) return
|
||||
if (!msg.channel.isTextBased()) return
|
||||
|
||||
if (!msg.guild) 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)
|
||||
})
|
||||
|
||||
var newtype = msg.content.split(config.prefix+"change")[1].substring(1)
|
||||
if (!newtype) return msg.channel.send({embeds:[bot.errorLog.invalidIdChooseFromList(list,l.errors.missingArgsDescription+" `<type>`:\n`"+config.prefix+"change <type>`")]})
|
||||
|
||||
const newTicket = require("../core/utils/configParser").getTicketById(newtype,true)
|
||||
if (!newTicket) return msg.channel.send({embeds:[bot.errorLog.invalidIdChooseFromList(list,l.errors.missingArgsDescription+" `<type>`:\n`"+config.prefix+"change <type>`")]})
|
||||
|
||||
/**@type {discord.PermissionOverwriteManager} */
|
||||
const prePermsManager = msg.channel.permissionOverwrites
|
||||
const prePerms = prePermsManager.cache
|
||||
|
||||
/**@type {String} */
|
||||
var chName = msg.channel.name
|
||||
const splitted = chName.split("-")
|
||||
const prefix = splitted.shift()
|
||||
const name = (splitted.length > 0) ? splitted.join("-") : prefix
|
||||
|
||||
if (newTicket.category){
|
||||
const parent = await msg.guild.channels.fetch(newTicket.category,{cache:true})
|
||||
if (parent && parent.type == discord.ChannelType.GuildCategory) msg.channel.setParent(parent)
|
||||
}
|
||||
|
||||
prePermsManager.set(prePerms)
|
||||
msg.channel.setName(newTicket.channelprefix+name).catch(() => {
|
||||
msg.channel.send({embeds:[bot.errorLog.failedRenameChannel]})
|
||||
})
|
||||
|
||||
hiddendata.find((value,index) => {
|
||||
if (value.key == "type"){
|
||||
hiddendata[index] = {key:"type",value:newtype}
|
||||
}
|
||||
})
|
||||
|
||||
msg.channel.send({embeds:[bot.embeds.commands.changeEmbed(msg.author,newtype)]})
|
||||
|
||||
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.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) => {
|
||||
if (!interaction.isChatInputCommand()) return
|
||||
if (interaction.commandName != "change") return
|
||||
if (!interaction.channel.isTextBased()) return
|
||||
|
||||
if (!interaction.guild) return
|
||||
|
||||
const hiddendata = bot.hiddenData.readHiddenData(interaction.channel.id)
|
||||
if (hiddendata.length < 1) return interaction.reply({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 list = []
|
||||
config.options.forEach((o) => {
|
||||
if (o.type == "ticket") list.push(o.id)
|
||||
})
|
||||
|
||||
var newtype = interaction.options.getString("type",true)
|
||||
const newTicket = require("../core/utils/configParser").getTicketById(newtype,true)
|
||||
|
||||
if (!newTicket) return interaction.editReply({embeds:[bot.errorLog.invalidIdChooseFromList(list,l.errors.missingArgsDescription+" `<type>`:\n`"+config.prefix+"change <type>`")]})
|
||||
|
||||
/**@type {discord.PermissionOverwriteManager} */
|
||||
const prePermsManager = interaction.channel.permissionOverwrites
|
||||
const prePerms = prePermsManager.cache
|
||||
|
||||
/**@type {String} */
|
||||
var chName = interaction.channel.name
|
||||
const splitted = chName.split("-")
|
||||
const prefix = splitted.shift()
|
||||
const name = (splitted.length > 0) ? splitted.join("-") : prefix
|
||||
|
||||
if (newTicket.category){
|
||||
const parent = await interaction.guild.channels.fetch(newTicket.category,{cache:true})
|
||||
if (parent && parent.type == discord.ChannelType.GuildCategory) interaction.channel.setParent(parent)
|
||||
}
|
||||
|
||||
prePermsManager.set(prePerms)
|
||||
interaction.channel.setName(newTicket.channelprefix+name).catch(() => {
|
||||
interaction.channel.send({embeds:[bot.errorLog.failedRenameChannel]})
|
||||
})
|
||||
|
||||
hiddendata.find((value,index) => {
|
||||
if (value.key == "type"){
|
||||
hiddendata[index] = {key:"type",value:newtype}
|
||||
}
|
||||
})
|
||||
|
||||
interaction.editReply({embeds:[bot.embeds.commands.changeEmbed(interaction.user,newtype)]})
|
||||
|
||||
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.ticket(interaction.user.id,interaction.guild.id,ticketId),interaction.user,interaction.channel,interaction.guild,new Date())
|
||||
})
|
||||
}
|
||||
+59
-32
@@ -5,6 +5,8 @@ const config = bot.config
|
||||
const log = bot.errorLog.log
|
||||
const l = bot.language
|
||||
const permsChecker = require("../core/utils/permisssionChecker")
|
||||
const embed = discord.EmbedBuilder
|
||||
const storage = bot.storage
|
||||
|
||||
const APIEvents = require("../core/api/modules/events")
|
||||
const DISABLE = require("../core/api/api.json").disable
|
||||
@@ -12,69 +14,94 @@ const DISABLE = require("../core/api/api.json").disable
|
||||
module.exports = () => {
|
||||
bot.errorLog.log("debug","COMMANDS: loaded claim.js")
|
||||
|
||||
if (!DISABLE.commands.text.claim) client.on("messageCreate",msg => {
|
||||
if (!DISABLE.commands.text.claim) client.on("messageCreate", async msg => {
|
||||
if (!msg.content.startsWith(config.prefix+"claim")) return
|
||||
var user = msg.mentions.users.first()
|
||||
|
||||
const claimingUser = user ? user : msg.author
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
msg.channel.messages.fetchPinned().then(msglist => {
|
||||
hiddendata.push({key:"claimedby",value:claimingUser.id})
|
||||
bot.hiddenData.writeHiddenData(msg.channel.id,hiddendata)
|
||||
storage.set("claimData",msg.channel.id,claimingUser.id)
|
||||
|
||||
await msg.channel.messages.fetchPinned().then(msglist => {
|
||||
var firstmsg = msglist.last()
|
||||
if (firstmsg == undefined || firstmsg.author.id != client.user.id) return msg.channel.send({embeds:[bot.errorLog.notInATicket]})
|
||||
const hiddendata = bot.hiddenData.readHiddenData(firstmsg.embeds[0].description)
|
||||
const ticketId = hiddendata.data.find(d => d.key == "type").value
|
||||
|
||||
const newEmbed = new embed(firstmsg.embeds[0].data)
|
||||
.setFooter({text:"claimed by: "+msg.author.username,iconURL:msg.author.displayAvatarURL()})
|
||||
|
||||
//msg.channel.send({embeds:[bot.embeds.commands.claimEmbed(claimingUser,msg.author)]})
|
||||
msg.channel.send({embeds:[bot.errorLog.warning("Coming soon!","This feature isn't ready yet!\nIt will become active in the next update!")]})
|
||||
if (firstmsg.components[0].components[1] && firstmsg.components[0].components[1].disabled){
|
||||
firstmsg.edit({components:[bot.buttons.firstmsg.firstmsgRowDisabledNoClaim],embeds:[newEmbed]})
|
||||
}else{
|
||||
firstmsg.edit({components:[bot.buttons.firstmsg.firstmsgRowNormalNoClaim],embeds:[newEmbed]})
|
||||
}
|
||||
})
|
||||
|
||||
var loguser = claimingUser
|
||||
log("command","someone used the 'claim' command",[{key:"user",value:msg.author.tag}])
|
||||
log("system","user claimed to ticket",[{key:"user",value:msg.author.tag},{key:"ticket",value:msg.channel.name},{key:"claimed_user",value:claimingUser.tag}])
|
||||
msg.channel.send({embeds:[bot.embeds.commands.claimEmbed(claimingUser,msg.author)]})
|
||||
|
||||
log("command","someone used the 'claim' command",[{key:"user",value:msg.author.username}])
|
||||
log("system","user claimed to ticket",[{key:"user",value:msg.author.username},{key:"ticket",value:msg.channel.name},{key:"claimed_user",value:claimingUser.username}])
|
||||
|
||||
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.onTicketClaim(msg.author,loguser,msg.channel,msg.guild,new Date(),{status:"open",name:msg.channel.name,ticketOptions:ticketData})
|
||||
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",(interaction) => {
|
||||
if (!DISABLE.commands.slash.claim) client.on("interactionCreate",async (interaction) => {
|
||||
if (!interaction.isChatInputCommand()) return
|
||||
if (interaction.commandName != "claim") return
|
||||
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.reply({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
|
||||
return interaction.reply({content:":x: "+l.errors.noPermsTitle,ephemeral:true})
|
||||
}
|
||||
|
||||
interaction.channel.messages.fetchPinned().then(msglist => {
|
||||
await interaction.deferReply()
|
||||
|
||||
hiddendata.push({key:"claimedby",value:user.id})
|
||||
bot.hiddenData.writeHiddenData(interaction.channel.id,hiddendata)
|
||||
storage.set("claimData",interaction.channel.id,user.id)
|
||||
|
||||
await interaction.channel.messages.fetchPinned().then(msglist => {
|
||||
var firstmsg = msglist.last()
|
||||
if (firstmsg == undefined || firstmsg.author.id != client.user.id) return interaction.reply({embeds:[bot.errorLog.notInATicket]})
|
||||
const hiddendata = bot.hiddenData.readHiddenData(firstmsg.embeds[0].description)
|
||||
const ticketId = hiddendata.data.find(d => d.key == "type").value
|
||||
if (firstmsg == undefined || firstmsg.author.id != client.user.id) return msg.channel.send({embeds:[bot.errorLog.notInATicket]})
|
||||
|
||||
//interaction.reply({embeds:[bot.embeds.commands.claimEmbed(user,interaction.user)]})
|
||||
interaction.reply({embeds:[bot.errorLog.warning("Coming soon!","This feature isn't ready yet!\nIt will become active in the next update!")]})
|
||||
const newEmbed = new embed(firstmsg.embeds[0].data)
|
||||
.setFooter({text:"claimed by: "+user.username,iconURL:user.displayAvatarURL()})
|
||||
|
||||
var loguser = user
|
||||
log("command","someone used the 'claim' command",[{key:"user",value:interaction.user.tag}])
|
||||
log("system","user claimed to ticket",[{key:"user",value:interaction.user.tag},{key:"ticket",value:interaction.channel.name},{key:"claimed_user",value:loguser.tag}])
|
||||
if (firstmsg.components[0].components[1] && firstmsg.components[0].components[1].disabled){
|
||||
firstmsg.edit({components:[bot.buttons.firstmsg.firstmsgRowDisabledNoClaim],embeds:[newEmbed]})
|
||||
}else{
|
||||
firstmsg.edit({components:[bot.buttons.firstmsg.firstmsgRowNormalNoClaim],embeds:[newEmbed]})
|
||||
}
|
||||
})
|
||||
|
||||
interaction.editReply({embeds:[bot.embeds.commands.claimEmbed(user,interaction.user)]})
|
||||
|
||||
log("command","someone used the 'claim' command",[{key:"user",value:interaction.user.username}])
|
||||
log("system","user claimed to ticket",[{key:"user",value:interaction.user.username},{key:"ticket",value:interaction.channel.name},{key:"claimed_user",value:user.username}])
|
||||
|
||||
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.onTicketClaim(interaction.user,user,interaction.channel,interaction.guild,new Date(),{status:"open",name:interaction.channel.name,ticketOptions:ticketData})
|
||||
APIEvents.onCommand("claim",permsChecker.ticket(interaction.user.id,interaction.guild.id,ticketId),interaction.user,interaction.channel,interaction.guild,new Date())
|
||||
})
|
||||
}
|
||||
+18
-23
@@ -24,13 +24,11 @@ module.exports = () => {
|
||||
}
|
||||
const reason = tempreason
|
||||
|
||||
msg.channel.messages.fetchPinned().then(msglist => {
|
||||
var firstmsg = msglist.last()
|
||||
if (firstmsg == undefined || firstmsg.author.id != client.user.id) return msg.channel.send({embeds:[bot.errorLog.notInATicket]})
|
||||
const hiddendata = bot.hiddenData.readHiddenData(firstmsg.embeds[0].description)
|
||||
const ticketId = hiddendata.data.find(d => d.key == "type").value
|
||||
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 (hiddendata.data.find(h => h.key == "pendingdelete")) return msg.channel.send({embeds:[bot.errorLog.warning("Warning!","You can't close a ticket while it's being deleted!")]})
|
||||
if (hiddendata.find(h => h.key == "pendingdelete")) return msg.channel.send({embeds:[bot.errorLog.warning("Warning!","You can't close a ticket while it's being deleted!")]})
|
||||
|
||||
const descriptionReason = reason ? "**"+l.messages.reason+":** "+reason : false
|
||||
msg.channel.send({embeds:[bot.embeds.commands.closeEmbed(msg.author,descriptionReason)],components:[bot.buttons.close.closeCommandRow]})
|
||||
@@ -44,17 +42,14 @@ module.exports = () => {
|
||||
}
|
||||
})
|
||||
|
||||
require("../core/ticketActions/ticketCloser").NEWcloseTicket(msg.member,msg.channel,prefix,"close",reason,true)
|
||||
require("../core/ticketActions/ticketCloser").closeManager(msg.member,msg.channel,prefix,"close",reason,true)
|
||||
|
||||
log("command","someone used the 'close' command",[{key:"user",value:msg.author.tag}])
|
||||
log("command","someone used the 'close' command",[{key:"user",value:msg.author.username}])
|
||||
APIEvents.onCommand("close",true,msg.author,msg.channel,msg.guild,new Date())
|
||||
|
||||
})
|
||||
|
||||
|
||||
})
|
||||
|
||||
if (!DISABLE.commands.slash.close) client.on("interactionCreate",(interaction) => {
|
||||
if (!DISABLE.commands.slash.close) client.on("interactionCreate",async(interaction) => {
|
||||
if (!interaction.isChatInputCommand()) return
|
||||
if (interaction.commandName != "close") return
|
||||
|
||||
@@ -62,16 +57,18 @@ module.exports = () => {
|
||||
|
||||
const reason = interaction.options.getString("reason") ? interaction.options.getString("reason") : false
|
||||
|
||||
interaction.channel.messages.fetchPinned().then(msglist => {
|
||||
var firstmsg = msglist.last()
|
||||
if (firstmsg == undefined || firstmsg.author.id != client.user.id) return interaction.reply({embeds:[bot.errorLog.notInATicket]})
|
||||
const hiddendata = bot.hiddenData.readHiddenData(firstmsg.embeds[0].description)
|
||||
const ticketId = hiddendata.data.find(d => d.key == "type").value
|
||||
|
||||
if (hiddendata.data.find(h => h.key == "pendingdelete")) return interaction.reply({embeds:[bot.errorLog.warning("Warning!","You can't close a ticket while it's being deleted!")]})
|
||||
|
||||
const hiddendata = bot.hiddenData.readHiddenData(interaction.channel.id)
|
||||
if (hiddendata.length < 1) return interaction.reply({embeds:[bot.errorLog.notInATicket]})
|
||||
const ticketId = hiddendata.find(d => d.key == "type").value
|
||||
|
||||
if (hiddendata.find(h => h.key == "pendingdelete")) return interaction.reply({embeds:[bot.errorLog.warning("Warning!","You can't close a ticket while it's being deleted!")]})
|
||||
|
||||
await interaction.deferReply()
|
||||
|
||||
const descriptionReason = reason ? "**"+l.messages.reason+":** "+reason : false
|
||||
interaction.reply({embeds:[bot.embeds.commands.closeEmbed(interaction.user,descriptionReason)],components:[bot.buttons.close.closeCommandRow]})
|
||||
interaction.editReply({embeds:[bot.embeds.commands.closeEmbed(interaction.user,descriptionReason)],components:[bot.buttons.close.closeCommandRow]})
|
||||
|
||||
var name = interaction.channel.name
|
||||
var prefix = ""
|
||||
@@ -82,11 +79,9 @@ module.exports = () => {
|
||||
}
|
||||
})
|
||||
|
||||
require("../core/ticketActions/ticketCloser").NEWcloseTicket(interaction.member,interaction.channel,prefix,"close",false,true)
|
||||
require("../core/ticketActions/ticketCloser").closeManager(interaction.member,interaction.channel,prefix,"close",false,true)
|
||||
|
||||
log("command","someone used the 'close' command",[{key:"user",value:interaction.user.tag}])
|
||||
log("command","someone used the 'close' command",[{key:"user",value:interaction.user.username}])
|
||||
APIEvents.onCommand("close",true,interaction.user,interaction.channel,interaction.guild,new Date())
|
||||
|
||||
})
|
||||
})
|
||||
}
|
||||
+21
-27
@@ -16,17 +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)){
|
||||
|
||||
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.messages.fetchPinned().then(msglist => {
|
||||
var firstmsg = msglist.last()
|
||||
if (firstmsg == undefined || firstmsg.author.id != client.user.id) return msg.channel.send({embeds:[bot.errorLog.notInATicket]})
|
||||
const hiddendata = bot.hiddenData.readHiddenData(firstmsg.embeds[0].description)
|
||||
const ticketId = hiddendata.data.find(d => d.key == "type").value
|
||||
|
||||
msg.channel.send({embeds:[bot.embeds.commands.deleteEmbed(msg.author)]})
|
||||
|
||||
var name = msg.channel.name
|
||||
@@ -38,34 +37,31 @@ module.exports = () => {
|
||||
}
|
||||
})
|
||||
|
||||
require("../core/ticketActions/ticketCloser").NEWcloseTicket(msg.member,msg.channel,prefix,"delete",false,true)
|
||||
|
||||
log("command","someone used the 'delete' command",[{key:"user",value:msg.author.tag}])
|
||||
APIEvents.onCommand("delete",permsChecker.command(msg.author.id,msg.guild.id),msg.author,msg.channel,msg.guild,new Date())
|
||||
})
|
||||
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.ticket(msg.author.id,msg.guild.id,ticketId),msg.author,msg.channel,msg.guild,new Date())
|
||||
|
||||
})
|
||||
|
||||
if (!DISABLE.commands.slash.delete) client.on("interactionCreate",(interaction) => {
|
||||
if (!DISABLE.commands.slash.delete) client.on("interactionCreate",async (interaction) => {
|
||||
if (!interaction.isChatInputCommand()) return
|
||||
if (interaction.commandName != "delete") return
|
||||
|
||||
//interaction.deferReply()
|
||||
|
||||
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.reply({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)]})
|
||||
}
|
||||
|
||||
interaction.channel.messages.fetchPinned().then(msglist => {
|
||||
var firstmsg = msglist.last()
|
||||
if (firstmsg == undefined || firstmsg.author.id != client.user.id) return interaction.reply({embeds:[bot.errorLog.notInATicket]})
|
||||
const hiddendata = bot.hiddenData.readHiddenData(firstmsg.embeds[0].description)
|
||||
const ticketId = hiddendata.data.find(d => d.key == "type").value
|
||||
await interaction.deferReply()
|
||||
|
||||
interaction.reply({embeds:[bot.embeds.commands.deleteEmbed(interaction.user)]})
|
||||
interaction.editReply({embeds:[bot.embeds.commands.deleteEmbed(interaction.user)]})
|
||||
|
||||
var name = interaction.channel.name
|
||||
var prefix = ""
|
||||
@@ -76,11 +72,9 @@ module.exports = () => {
|
||||
}
|
||||
})
|
||||
|
||||
require("../core/ticketActions/ticketCloser").NEWcloseTicket(interaction.member,interaction.channel,prefix,"delete",false,true)
|
||||
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.tag}])
|
||||
APIEvents.onCommand("delete",permsChecker.command(interaction.user.id,interaction.guild.id),interaction.user,interaction.channel,interaction.guild,new Date())
|
||||
|
||||
})
|
||||
log("command","someone used the 'delete' command",[{key:"user",value:interaction.user.username}])
|
||||
APIEvents.onCommand("delete",permsChecker.ticket(interaction.user.id,interaction.guild.id,ticketId),interaction.user,interaction.channel,interaction.guild,new Date())
|
||||
})
|
||||
}
|
||||
+11
-9
@@ -15,13 +15,15 @@ module.exports = () => {
|
||||
const prefix = config.system.showSlashcmdsInHelp ? "/" : config.prefix
|
||||
|
||||
const helpEmbed = new discord.EmbedBuilder()
|
||||
.setColor(config.main_color)
|
||||
.setColor(config.color)
|
||||
.setTitle("❔ "+l.helpMenu.title)
|
||||
|
||||
const header = config.system.ticket_channel ? l.helpMenu.header1.replace("{0}","<#"+config.system.ticket_channel+">") : l.helpMenu.header2
|
||||
helpEmbed.setDescription(header+"`"+prefix+msgName+" <id>` ➜ _"+l.helpMenu.msgCmd+"_\n\n`"+prefix+"rename <name>` ➜ _"+l.helpMenu.renameCmd+"_\n`"+prefix+"close` ➜ _"+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+"_")
|
||||
|
||||
if (config.credits) helpEmbed.setFooter({text:"Open-Ticket by DJdj Development | view on github for source code",iconURL:"https://raw.githubusercontent.com/DJj123dj/open-ticket/main/logo.png"})
|
||||
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:"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
|
||||
|
||||
@@ -31,15 +33,15 @@ module.exports = () => {
|
||||
|
||||
if (msg.content == config.prefix || msg.content == config.prefix+" " || msg.content == otherprefix){
|
||||
msg.channel.send({embeds:[helpEmbed]})
|
||||
log("command","someone used the 'help' command",[{key:"user",value:msg.author.tag}])
|
||||
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())
|
||||
return
|
||||
}
|
||||
|
||||
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")){
|
||||
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.tag}])
|
||||
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())
|
||||
}
|
||||
}
|
||||
@@ -50,7 +52,7 @@ module.exports = () => {
|
||||
if (interaction.commandName != "help") return
|
||||
|
||||
interaction.reply({embeds:[helpEmbed]})
|
||||
log("command","someone used the 'help' command",[{key:"user",value:interaction.user.tag}])
|
||||
log("command","someone used the 'help' command",[{key:"user",value:interaction.user.username}])
|
||||
APIEvents.onCommand("help",true,interaction.user,interaction.channel,interaction.guild,new Date())
|
||||
})
|
||||
}
|
||||
+20
-23
@@ -18,30 +18,27 @@ 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)){
|
||||
|
||||
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.messages.fetchPinned().then(msglist => {
|
||||
var firstmsg = msglist.last()
|
||||
if (firstmsg == undefined || firstmsg.author.id != client.user.id) return msg.channel.send({embeds:[bot.errorLog.notInATicket]})
|
||||
const hiddendata = bot.hiddenData.readHiddenData(firstmsg.embeds[0].description)
|
||||
const ticketId = hiddendata.data.find(d => d.key == "type").value
|
||||
|
||||
msg.channel.permissionOverwrites.delete(user.id)
|
||||
msg.channel.send({embeds:[bot.embeds.commands.removeEmbed(user,msg.author)]})
|
||||
|
||||
var loguser = msg.mentions.users.first()
|
||||
|
||||
log("command","someone used the 'remove' command",[{key:"user",value:msg.author.tag}])
|
||||
log("system","user removed from ticket",[{key:"user",value:msg.author.tag},{key:"ticket",value:msg.channel.name},{key:"removed_user",value:loguser.tag}])
|
||||
log("command","someone used the 'remove' command",[{key:"user",value:msg.author.username}])
|
||||
log("system","user removed from ticket",[{key:"user",value:msg.author.username},{key:"ticket",value:msg.channel.name},{key:"removed_user",value:loguser.username}])
|
||||
|
||||
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) => {
|
||||
@@ -50,28 +47,28 @@ 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.reply({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.channel.messages.fetchPinned().then(msglist => {
|
||||
var firstmsg = msglist.last()
|
||||
if (firstmsg == undefined || firstmsg.author.id != client.user.id) return interaction.reply({embeds:[bot.errorLog.notInATicket]})
|
||||
const hiddendata = bot.hiddenData.readHiddenData(firstmsg.embeds[0].description)
|
||||
const ticketId = hiddendata.data.find(d => d.key == "type").value
|
||||
await interaction.deferReply()
|
||||
|
||||
interaction.channel.permissionOverwrites.delete(user.id)
|
||||
interaction.reply({embeds:[bot.embeds.commands.removeEmbed(user,interaction.user)]})
|
||||
interaction.editReply({embeds:[bot.embeds.commands.removeEmbed(user,interaction.user)]})
|
||||
|
||||
var loguser = user
|
||||
|
||||
log("command","someone used the 'remove' command",[{key:"user",value:interaction.user.tag}])
|
||||
log("system","user removed from ticket",[{key:"user",value:interaction.user.tag},{key:"ticket",value:interaction.channel.name},{key:"removed_user",value:loguser.tag}])
|
||||
log("command","someone used the 'remove' command",[{key:"user",value:interaction.user.username}])
|
||||
log("system","user removed from ticket",[{key:"user",value:interaction.user.username},{key:"ticket",value:interaction.channel.name},{key:"removed_user",value:loguser.username}])
|
||||
|
||||
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())
|
||||
})
|
||||
}
|
||||
+21
-28
@@ -16,17 +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)){
|
||||
|
||||
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.messages.fetchPinned().then(msglist => {
|
||||
var firstmsg = msglist.last()
|
||||
if (firstmsg == undefined || firstmsg.author.id != client.user.id) return msg.channel.send({embeds:[bot.errorLog.notInATicket]})
|
||||
const hiddendata = bot.hiddenData.readHiddenData(firstmsg.embeds[0].description)
|
||||
const ticketId = hiddendata.data.find(d => d.key == "type").value
|
||||
|
||||
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>`")]})
|
||||
@@ -41,35 +40,30 @@ module.exports = () => {
|
||||
})
|
||||
|
||||
if (!prefix) prefix = "noprefix-"
|
||||
|
||||
msg.channel.setName(prefix+newname)
|
||||
msg.channel.send({embeds:[bot.embeds.commands.renameEmbed(msg.author,prefix+newname)]})
|
||||
|
||||
log("command","someone used the 'rename' command",[{key:"user",value:msg.author.tag}])
|
||||
log("system","ticket renamed",[{key:"user",value:msg.author.tag},{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())
|
||||
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.ticket(msg.author.id,msg.guild.id,ticketId),msg.author,msg.channel,msg.guild,new Date())
|
||||
})
|
||||
|
||||
|
||||
})
|
||||
|
||||
if (!DISABLE.commands.slash.rename) client.on("interactionCreate",(interaction) => {
|
||||
if (!DISABLE.commands.slash.rename) client.on("interactionCreate",async (interaction) => {
|
||||
if (!interaction.isChatInputCommand()) return
|
||||
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.reply({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.deferReply()
|
||||
|
||||
interaction.channel.messages.fetchPinned().then(msglist => {
|
||||
var firstmsg = msglist.last()
|
||||
if (firstmsg == undefined || firstmsg.author.id != client.user.id) return interaction.reply({embeds:[bot.errorLog.notInATicket]})
|
||||
const hiddendata = bot.hiddenData.readHiddenData(firstmsg.embeds[0].description)
|
||||
const ticketId = hiddendata.data.find(d => d.key == "type").value
|
||||
await interaction.deferReply()
|
||||
|
||||
var newname = interaction.options.getString("name")
|
||||
var name = interaction.channel.name
|
||||
@@ -84,12 +78,11 @@ module.exports = () => {
|
||||
if (!prefix) prefix = "noprefix-"
|
||||
|
||||
interaction.channel.setName(prefix+newname)
|
||||
interaction.reply({embeds:[bot.embeds.commands.renameEmbed(interaction.user,prefix+newname)]})
|
||||
interaction.editReply({embeds:[bot.embeds.commands.renameEmbed(interaction.user,prefix+newname)]})
|
||||
|
||||
log("command","someone used the 'rename' command",[{key:"user",value:interaction.user.tag}])
|
||||
log("system","ticket renamed",[{key:"user",value:interaction.user.tag},{key:"ticket",value:name},{key:"newname",value:newname}])
|
||||
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())
|
||||
})
|
||||
}
|
||||
+12
-21
@@ -15,46 +15,37 @@ module.exports = () => {
|
||||
if (!DISABLE.commands.text.reopen) client.on("messageCreate",msg => {
|
||||
if (!msg.content.startsWith(config.prefix+"reopen")) return
|
||||
|
||||
msg.channel.messages.fetchPinned().then(msglist => {
|
||||
var firstmsg = msglist.last()
|
||||
if (firstmsg == undefined || firstmsg.author.id != client.user.id) return msg.channel.send({embeds:[bot.errorLog.notInATicket]})
|
||||
const hiddendata = bot.hiddenData.readHiddenData(firstmsg.embeds[0].description)
|
||||
const ticketId = hiddendata.data.find(d => d.key == "type").value
|
||||
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 (hiddendata.data.find(h => h.key == "pendingdelete")) return msg.channel.send({embeds:[bot.errorLog.warning("Warning!","You can't re-open a ticket while it's being deleted!")]})
|
||||
if (hiddendata.find(h => h.key == "pendingdelete")) return msg.channel.send({embeds:[bot.errorLog.warning("Warning!","You can't re-open a ticket while it's being deleted!")]})
|
||||
|
||||
msg.channel.send({embeds:[bot.embeds.commands.reopenEmbed(msg.author)],components:[bot.buttons.close.openRowNormal]})
|
||||
|
||||
require("../core/ticketActions/ticketReopener").reopenTicket(msg.guild,msg.channel,msg.author)
|
||||
|
||||
log("command","someone used the 'reopen' command",[{key:"user",value:msg.author.tag}])
|
||||
log("command","someone used the 'reopen' command",[{key:"user",value:msg.author.username}])
|
||||
APIEvents.onCommand("reopen",true,msg.author,msg.channel,msg.guild,new Date())
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
if (!DISABLE.commands.slash.reopen) client.on("interactionCreate",async (interaction) => {
|
||||
if (!interaction.isChatInputCommand()) return
|
||||
if (interaction.commandName != "reopen") return
|
||||
|
||||
//interaction.deferReply()
|
||||
const hiddendata = bot.hiddenData.readHiddenData(interaction.channel.id)
|
||||
if (hiddendata.length < 1) return interaction.reply({embeds:[bot.errorLog.notInATicket]})
|
||||
const ticketId = hiddendata.find(d => d.key == "type").value
|
||||
|
||||
interaction.channel.messages.fetchPinned().then(async msglist => {
|
||||
var firstmsg = msglist.last()
|
||||
if (firstmsg == undefined || firstmsg.author.id != client.user.id) return interaction.reply({embeds:[bot.errorLog.notInATicket]})
|
||||
const hiddendata = bot.hiddenData.readHiddenData(firstmsg.embeds[0].description)
|
||||
const ticketId = hiddendata.data.find(d => d.key == "type").value
|
||||
if (hiddendata.find(h => h.key == "pendingdelete")) return interaction.reply({embeds:[bot.errorLog.warning("Warning!","You can't re-open a ticket while it's being deleted!")]})
|
||||
|
||||
if (hiddendata.data.find(h => h.key == "pendingdelete")) return interaction.reply({embeds:[bot.errorLog.warning("Warning!","You can't re-open a ticket while it's being deleted!")]})
|
||||
await interaction.deferReply()
|
||||
|
||||
await interaction.reply({embeds:[bot.embeds.commands.reopenEmbed(interaction.user)],components:[bot.buttons.close.openRowNormal]})
|
||||
await interaction.editReply({embeds:[bot.embeds.commands.reopenEmbed(interaction.user)],components:[bot.buttons.close.openRowNormal]})
|
||||
|
||||
require("../core/ticketActions/ticketReopener").reopenTicket(interaction.guild,interaction.channel,interaction.user)
|
||||
|
||||
log("command","someone used the 'reopen' command",[{key:"user",value:interaction.user.tag}])
|
||||
log("command","someone used the 'reopen' command",[{key:"user",value:interaction.user.username}])
|
||||
APIEvents.onCommand("reopen",true,interaction.user,interaction.channel,interaction.guild,new Date())
|
||||
})
|
||||
|
||||
|
||||
})
|
||||
}
|
||||
@@ -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())
|
||||
})
|
||||
}
|
||||
+8
-8
@@ -23,23 +23,23 @@ 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
|
||||
}
|
||||
|
||||
const id = msg.content.split(config.prefix+"msg")[1].substring(1) ? msg.content.split(config.prefix+"msg")[1].substring(1) : false
|
||||
|
||||
if (!id) return msg.channel.send({embeds:[bot.errorLog.invalidArgsMessage(l.errors.missingArgsDescription+" `<id>`:\n`"+config.prefix+"msg <id>`")]})
|
||||
if (!msgIds.includes(id)) return msg.channel.send({embeds:[bot.errorLog.invalidIdChooseFromList(msgIds)]})
|
||||
if (!id) return msg.channel.send({embeds:[bot.errorLog.invalidIdChooseFromList(msgIds,l.errors.missingArgsDescription+" `<id>`:\n`"+config.prefix+"msg <id>`")]})
|
||||
if (!msgIds.includes(id)) return msg.channel.send({embeds:[bot.errorLog.invalidIdChooseFromList(msgIds,l.errors.missingArgsDescription+" `<id>`:\n`"+config.prefix+"msg <id>`")]})
|
||||
|
||||
|
||||
const {embed,componentRows} = require("../core/utils/getEmbed").createEmbed(id)
|
||||
|
||||
msg.channel.send({embeds:[embed],components:componentRows})
|
||||
|
||||
log("command","someone used the 'message' command",[{key:"user",value:msg.author.tag},{key:"id",value:id}])
|
||||
APIEvents.onCommand("message",permsChecker.command(msg.author.id,msg.guild.id),msg.author,msg.channel,msg.guild,new Date())
|
||||
log("command","someone used the 'message' command",[{key:"user",value:msg.author.username},{key:"id",value:id}])
|
||||
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
|
||||
}
|
||||
@@ -62,9 +62,9 @@ module.exports = () => {
|
||||
interaction.reply({content:l.commands.ticketWarning})
|
||||
interaction.channel.send({embeds:[embed],components:componentRows})
|
||||
|
||||
log("command","someone used the 'message' command",[{key:"user",value:interaction.user.tag},{key:"id",value:id}])
|
||||
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())
|
||||
|
||||
})
|
||||
}
|
||||
+78
-30
@@ -5,6 +5,8 @@ const config = bot.config
|
||||
const log = bot.errorLog.log
|
||||
const l = bot.language
|
||||
const permsChecker = require("../core/utils/permisssionChecker")
|
||||
const embed = discord.EmbedBuilder
|
||||
const storage = bot.storage
|
||||
|
||||
const APIEvents = require("../core/api/modules/events")
|
||||
const DISABLE = require("../core/api/api.json").disable
|
||||
@@ -16,62 +18,108 @@ 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
|
||||
}
|
||||
|
||||
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!")]})
|
||||
|
||||
hiddendata.push({key:"claimedby",value:"false"})
|
||||
bot.hiddenData.writeHiddenData(msg.channel.id,hiddendata)
|
||||
storage.set("claimData",msg.channel.id,"false")
|
||||
|
||||
msg.channel.messages.fetchPinned().then(msglist => {
|
||||
/**@type {discord.Message} */
|
||||
var firstmsg = msglist.last()
|
||||
if (firstmsg == undefined || firstmsg.author.id != client.user.id) return msg.channel.send({embeds:[bot.errorLog.notInATicket]})
|
||||
const hiddendata = bot.hiddenData.readHiddenData(firstmsg.embeds[0].description)
|
||||
const ticketId = hiddendata.data.find(d => d.key == "type").value
|
||||
|
||||
|
||||
//msg.channel.send({embeds:[bot.embeds.commands.unclaimEmbed(msg.author)]})
|
||||
msg.channel.send({embeds:[bot.errorLog.warning("Coming soon!","This feature isn't ready yet!\nIt will become active in the next update!")]})
|
||||
|
||||
var loguser = msg.author
|
||||
log("command","someone used the 'unclaim' command",[{key:"user",value:msg.author.tag}])
|
||||
log("system","user unclaimed from ticket",[{key:"user",value:msg.author.tag},{key:"ticket",value:msg.channel.name},{key:"unclaimed_user",value:msg.author.tag}])
|
||||
const newEmbed = new embed(firstmsg.embeds[0].data)
|
||||
|
||||
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())
|
||||
if (ticketData && ticketData.autoclose.enable){
|
||||
const footerText = l.commands.autocloseTitle.replace("{0}",ticketData.autoclose.inactiveHours+"h")
|
||||
newEmbed.setFooter({text:footerText})
|
||||
}else{
|
||||
newEmbed.setFooter(null)
|
||||
}
|
||||
|
||||
if (firstmsg.components[0].components[1] && firstmsg.components[0].components[1].disabled){
|
||||
firstmsg.edit({components:[bot.buttons.firstmsg.firstmsgRowDisabled],embeds:[newEmbed]})
|
||||
}else{
|
||||
firstmsg.edit({components:[bot.buttons.firstmsg.firstmsgRowNormal],embeds:[newEmbed]})
|
||||
}
|
||||
|
||||
msg.channel.send({embeds:[bot.embeds.commands.unclaimEmbed(msg.author)]})
|
||||
|
||||
log("command","someone used the 'unclaim' command",[{key:"user",value:msg.author.username}])
|
||||
log("system","user unclaimed from ticket",[{key:"user",value:msg.author.username},{key:"ticket",value:msg.channel.name},{key:"unclaimed_user",value:unclaimuser}])
|
||||
|
||||
|
||||
APIEvents.onTicketUnclaim(msg.author,msg.channel,msg.guild,new Date(),{status:"open",name:msg.channel.name,ticketOptions:ticketData})
|
||||
APIEvents.onCommand("unclaim",permsChecker.ticket(msg.author.id,msg.guild.id,ticketId),msg.author,msg.channel,msg.guild,new Date())
|
||||
})
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
if (!DISABLE.commands.slash.unclaim) client.on("interactionCreate",(interaction) => {
|
||||
if (!DISABLE.commands.slash.unclaim) client.on("interactionCreate",async (interaction) => {
|
||||
if (!interaction.isChatInputCommand()) return
|
||||
if (interaction.commandName != "unclaim") return
|
||||
const user = 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.reply({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
|
||||
}
|
||||
|
||||
await interaction.deferReply()
|
||||
|
||||
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!")]})
|
||||
|
||||
hiddendata.push({key:"claimedby",value:"false"})
|
||||
bot.hiddenData.writeHiddenData(interaction.channel.id,hiddendata)
|
||||
storage.set("claimData",interaction.channel.id,"false")
|
||||
|
||||
interaction.channel.messages.fetchPinned().then(msglist => {
|
||||
/**@type {discord.Message} */
|
||||
var firstmsg = msglist.last()
|
||||
if (firstmsg == undefined || firstmsg.author.id != client.user.id) return interaction.reply({embeds:[bot.errorLog.notInATicket]})
|
||||
const hiddendata = bot.hiddenData.readHiddenData(firstmsg.embeds[0].description)
|
||||
const ticketId = hiddendata.data.find(d => d.key == "type").value
|
||||
if (firstmsg == undefined || firstmsg.author.id != client.user.id) return interaction.editReply({embeds:[bot.errorLog.notInATicket]})
|
||||
|
||||
//interaction.reply({embeds:[bot.embeds.commands.unclaimEmbed(interaction.user)]})
|
||||
interaction.reply({embeds:[bot.errorLog.warning("Coming soon!","This feature isn't ready yet!\nIt will become active in the next update!")]})
|
||||
|
||||
var loguser = user
|
||||
log("command","someone used the 'unclaim' command",[{key:"user",value:interaction.user.tag}])
|
||||
log("system","user unclaimed from ticket",[{key:"user",value:interaction.user.tag},{key:"ticket",value:interaction.channel.name},{key:"unclaimed_user",value:loguser.tag}])
|
||||
const newEmbed = new embed(firstmsg.embeds[0].data)
|
||||
|
||||
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())
|
||||
if (ticketData && ticketData.autoclose.enable){
|
||||
const footerText = l.commands.autocloseTitle.replace("{0}",ticketData.autoclose.inactiveHours+"h")
|
||||
newEmbed.setFooter({text:footerText})
|
||||
}else{
|
||||
newEmbed.setFooter(null)
|
||||
}
|
||||
|
||||
if (firstmsg.components[0].components[1] && firstmsg.components[0].components[1].disabled){
|
||||
firstmsg.edit({components:[bot.buttons.firstmsg.firstmsgRowDisabled],embeds:[newEmbed]})
|
||||
}else{
|
||||
firstmsg.edit({components:[bot.buttons.firstmsg.firstmsgRowNormal],embeds:[newEmbed]})
|
||||
}
|
||||
|
||||
interaction.editReply({embeds:[bot.embeds.commands.unclaimEmbed(interaction.user)]})
|
||||
|
||||
log("command","someone used the 'unclaim' command",[{key:"user",value:interaction.user.username}])
|
||||
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.ticket(interaction.user.id,interaction.guild.id,ticketId),interaction.user,interaction.channel,interaction.guild,new Date())
|
||||
})
|
||||
|
||||
|
||||
})
|
||||
}
|
||||
+60
-19
@@ -1,12 +1,14 @@
|
||||
{
|
||||
"main_color":"#ffffff",
|
||||
"server_id":"server id (for slash cmds)",
|
||||
"auth_token":"auth token",
|
||||
"main_adminroles":["discord role id"],
|
||||
"color":"#ffffff",
|
||||
"serverId":"server id (for slash cmds)",
|
||||
"token":{
|
||||
"value":"insert your bot token here",
|
||||
"fromENV":false
|
||||
},
|
||||
"adminRoles":["discord role id"],
|
||||
"prefix":"!ticket ",
|
||||
"languagefile":"english",
|
||||
"languageFile":"english",
|
||||
|
||||
"credits":true,
|
||||
"status":{
|
||||
"enabled":true,
|
||||
"type":"PLAYING",
|
||||
@@ -14,21 +16,19 @@
|
||||
},
|
||||
|
||||
"system":{
|
||||
"ticket_channel":"channel id",
|
||||
"max_allowed_tickets":3,
|
||||
"enable_DM_Messages":true,
|
||||
"maxAmountOfTickets":3,
|
||||
"dmMessages":false,
|
||||
|
||||
"has@everyoneaccess":false,
|
||||
"member_role":"member role (doesn't have access to tickets)",
|
||||
"closeMode":"adminonly|normal",
|
||||
"memberRole":"member role (leave empty if you have no member role)",
|
||||
"closeMode":"adminonly OR normal (select one!)",
|
||||
|
||||
"enable_transcript":false,
|
||||
"enable_DM_transcript":false,
|
||||
"transcript_channel":"channel id",
|
||||
"transcripts":"!!!! ALL SETTINGS FOR TRANSCRIPTS ARE LOCATED IN: transcriptconfig.json !!!!",
|
||||
|
||||
"showSlashcmdsInHelp":false
|
||||
"showSlashcmdsInHelp":false,
|
||||
"answerInEphemeralOnOpen":true
|
||||
},
|
||||
|
||||
"SUPPORT":"Take look at our wiki: https://docs.openticket.dj-dj.be or join our discord server: https://discord.dj-dj.be if you need support!",
|
||||
"options":[
|
||||
{
|
||||
"id":"general",
|
||||
@@ -40,8 +40,9 @@
|
||||
|
||||
"color":"gray",
|
||||
"adminroles":["role id"],
|
||||
"readonlyAdminroles":["role id"],
|
||||
"channelprefix":"question-",
|
||||
"category":"category id",
|
||||
"category":"category id (or leave empty)",
|
||||
"message":"You created a ticket!",
|
||||
"enableDmOnOpen":true,
|
||||
"ticketmessage":"The staff will help you soon!\n\n*Click on the button below to close the ticket!*",
|
||||
@@ -50,10 +51,28 @@
|
||||
"enable":false,
|
||||
"url":"https://www.example.com/catmemes/cat.png"
|
||||
},
|
||||
"image":{
|
||||
"enable":false,
|
||||
"url":"https://www.example.com/catmemes/cat.png"
|
||||
},
|
||||
|
||||
"closedCategory":{
|
||||
"enable":false,
|
||||
"id":"category id"
|
||||
},
|
||||
|
||||
"autoclose":{
|
||||
"enable":false,
|
||||
"inactiveHours":24
|
||||
},
|
||||
|
||||
"ping":{
|
||||
"@here":true,
|
||||
"@everyone":false,
|
||||
"custom":{
|
||||
"enable":false,
|
||||
"roleId":"012345678910"
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
@@ -92,17 +111,39 @@
|
||||
"dropdown":false,
|
||||
|
||||
"enableFooter":false,
|
||||
"footer":"Open Ticket v3.0.0 - I'm a footer!",
|
||||
"footer":"Open Ticket v3.5.3 - I'm a footer!",
|
||||
|
||||
"enableFooterImage":false,
|
||||
"footerImage":"https://www.example.com/catmemes/cat.png",
|
||||
|
||||
"enableThumbnail":false,
|
||||
"thumbnail":"https://www.example.com/catmemes/cat.png",
|
||||
|
||||
"enableImage":false,
|
||||
"image":"https://www.example.com/catmemes/cat.png",
|
||||
|
||||
"enableCustomColor":false,
|
||||
"color":"#ffffff",
|
||||
|
||||
"options":["general","apply"],
|
||||
|
||||
"other":{
|
||||
"enableTicketExplaination":true,
|
||||
"enableMaxTicketsWarning":true
|
||||
"enableMaxTicketsWarning":true,
|
||||
|
||||
"customDropdownPlaceholder":{
|
||||
"enable":false,
|
||||
"text":"Choose a ticket"
|
||||
},
|
||||
"customCategoryText":{
|
||||
"enable":false,
|
||||
"text":"choose a category:"
|
||||
},
|
||||
"embedTitleURL":{
|
||||
"enable":false,
|
||||
"url":"https://www.dj-dj.be/projects/open-ticket"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
+6
-2
@@ -29,7 +29,9 @@
|
||||
"remove":false,
|
||||
"rename":false,
|
||||
"claim":false,
|
||||
"unclaim":false
|
||||
"unclaim":false,
|
||||
"change":false,
|
||||
"stats":false
|
||||
},
|
||||
"slash":{
|
||||
"help":false,
|
||||
@@ -42,7 +44,9 @@
|
||||
"remove":false,
|
||||
"rename":false,
|
||||
"claim":false,
|
||||
"unclaim":false
|
||||
"unclaim":false,
|
||||
"change":false,
|
||||
"stats":false
|
||||
}
|
||||
},
|
||||
"checkerjs":{
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
/** FOR DEVELOPERS ONLY!!
|
||||
* Don't change anything in this file before reading the documentation!
|
||||
* visit the api documentation at https://docs.openticket.dj-dj.be
|
||||
*/
|
||||
|
||||
|
||||
exports.embeddedMode = false
|
||||
exports.clientLocation = require("../../../index").client
|
||||
+103
-10
@@ -4,7 +4,8 @@ const client = bot.client
|
||||
const config = bot.config
|
||||
const log = bot.errorLog.log
|
||||
const l = bot.language
|
||||
const storage = bot.storage
|
||||
|
||||
const configParser = require("../../utils/configParser")
|
||||
|
||||
|
||||
//EVENT API:
|
||||
@@ -16,6 +17,10 @@ const ticketReopenListeners = []
|
||||
const ticketAddListeners = []
|
||||
const ticketRemoveListeners = []
|
||||
|
||||
const ticketClaimListeners = []
|
||||
const ticketUnclaimListeners = []
|
||||
const ticketChangeListeners = []
|
||||
|
||||
|
||||
const transcriptCreationListeners = []
|
||||
const commandListeners = []
|
||||
@@ -48,7 +53,7 @@ exports.onTicketOpen = (user,channel,guild,date,ticketdata) => {
|
||||
* @param {discord.TextChannel} channel
|
||||
* @param {discord.Guild} guild
|
||||
* @param {Date} date
|
||||
* @param {{name:String,status:"open"|"closed"|"deleted"|"reopened",ticketOptions:Object|false}} ticketdata
|
||||
* @param {{name:String,status:"open"|"closed"|"deleted"|"reopened",ticketOptions:configParser.OTTicketOptions}} ticketdata
|
||||
* @param {String} reason
|
||||
*/
|
||||
exports.onTicketClose = (user,channel,guild,date,ticketdata,reason) => {
|
||||
@@ -69,7 +74,7 @@ exports.onTicketClose = (user,channel,guild,date,ticketdata,reason) => {
|
||||
* @param {discord.TextChannel} channel
|
||||
* @param {discord.Guild} guild
|
||||
* @param {Date} date
|
||||
* @param {{name:String,status:"open"|"closed"|"deleted"|"reopened",ticketOptions:Object|false}} ticketdata
|
||||
* @param {{name:String,status:"open"|"closed"|"deleted"|"reopened",ticketOptions:configParser.OTTicketOptions}} ticketdata
|
||||
*/
|
||||
exports.onTicketDelete = (user,channel,guild,date,ticketdata) => {
|
||||
//system
|
||||
@@ -89,7 +94,7 @@ exports.onTicketDelete = (user,channel,guild,date,ticketdata) => {
|
||||
* @param {discord.TextChannel} channel
|
||||
* @param {discord.Guild} guild
|
||||
* @param {Date} date
|
||||
* @param {{name:String,status:"open"|"closed"|"deleted"|"reopened",ticketOptions:Object|false}} ticketdata
|
||||
* @param {{name:String,status:"open"|"closed"|"deleted"|"reopened",ticketOptions:configParser.OTTicketOptions}} ticketdata
|
||||
*/
|
||||
exports.onTicketReopen = (user,channel,guild,date,ticketdata) => {
|
||||
//system
|
||||
@@ -110,7 +115,7 @@ exports.onTicketReopen = (user,channel,guild,date,ticketdata) => {
|
||||
* @param {discord.TextChannel} channel
|
||||
* @param {discord.Guild} guild
|
||||
* @param {Date} date
|
||||
* @param {{name:String,status:"open"|"closed"|"deleted"|"reopened",ticketOptions:Object|false}} ticketdata
|
||||
* @param {{name:String,status:"open"|"closed"|"deleted"|"reopened",ticketOptions:configParser.OTTicketOptions}} ticketdata
|
||||
*/
|
||||
exports.onTicketAdd = (user,editeduser,channel,guild,date,ticketdata) => {
|
||||
//system
|
||||
@@ -131,7 +136,7 @@ exports.onTicketAdd = (user,editeduser,channel,guild,date,ticketdata) => {
|
||||
* @param {discord.TextChannel} channel
|
||||
* @param {discord.Guild} guild
|
||||
* @param {Date} date
|
||||
* @param {{name:String,status:"open"|"closed"|"deleted"|"reopened",ticketOptions:Object|false}} ticketdata
|
||||
* @param {{name:String,status:"open"|"closed"|"deleted"|"reopened",ticketOptions:configParser.OTTicketOptions}} ticketdata
|
||||
*/
|
||||
exports.onTicketRemove = (user,editeduser,channel,guild,date,ticketdata) => {
|
||||
//system
|
||||
@@ -145,6 +150,66 @@ exports.onTicketRemove = (user,editeduser,channel,guild,date,ticketdata) => {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {discord.User} user
|
||||
* @param {discord.TextChannel} channel
|
||||
* @param {discord.Guild} guild
|
||||
* @param {Date} date
|
||||
* @param {{name:String,status:"open"|"closed"|"deleted"|"reopened",ticketOptions:configParser.OTTicketOptions}} ticketdata
|
||||
*/
|
||||
exports.onTicketClaim = (user,channel,guild,date,ticketdata) => {
|
||||
//system
|
||||
bot.errorLog.log("api","user claimed a ticket",[{key:"userid",value:user.id},{key:"channelid",value:channel.id},{key:"guildid",value:guild.id},{key:"ticketdata",value:JSON.stringify(ticketdata)}])
|
||||
|
||||
ticketClaimListeners.forEach((func) => {
|
||||
try {
|
||||
func(user,channel,guild,date,ticketdata)
|
||||
}catch{}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {discord.User} user
|
||||
* @param {discord.TextChannel} channel
|
||||
* @param {discord.Guild} guild
|
||||
* @param {Date} date
|
||||
* @param {{name:String,status:"open"|"closed"|"deleted"|"reopened",ticketOptions:configParser.OTTicketOptions}} ticketdata
|
||||
*/
|
||||
exports.onTicketUnclaim = (user,channel,guild,date,ticketdata) => {
|
||||
//system
|
||||
bot.errorLog.log("api","user unclaimed a ticket",[{key:"userid",value:user.id},{key:"channelid",value:channel.id},{key:"guildid",value:guild.id},{key:"ticketdata",value:JSON.stringify(ticketdata)}])
|
||||
|
||||
ticketUnclaimListeners.forEach((func) => {
|
||||
try {
|
||||
func(user,channel,guild,date,ticketdata)
|
||||
}catch{}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {String} newtype
|
||||
* @param {discord.User} user
|
||||
* @param {discord.TextChannel} channel
|
||||
* @param {discord.Guild} guild
|
||||
* @param {Date} date
|
||||
* @param {{name:String,status:"open"|"closed"|"deleted"|"reopened",ticketOptions:configParser.OTTicketOptions}} ticketdata
|
||||
*/
|
||||
exports.onTicketChange = (newtype,user,channel,guild,date,ticketdata) => {
|
||||
//system
|
||||
bot.errorLog.log("api","user changed ticket type",[{key:"newtype",value:newtype},{key:"userid",value:user.id},{key:"channelid",value:channel.id},{key:"guildid",value:guild.id},{key:"ticketdata",value:JSON.stringify(ticketdata)}])
|
||||
|
||||
ticketChangeListeners.forEach((func) => {
|
||||
try {
|
||||
func(newtype,user,channel,guild,date,ticketdata)
|
||||
}catch{}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {discord.Message[]} messages
|
||||
@@ -164,7 +229,7 @@ exports.onTranscriptCreation = (messages,channel,guild,date) => {
|
||||
|
||||
}
|
||||
|
||||
/**@typedef {"help"|"message"|"close"|"delete"|"reopen"|"rename"|"add"|"remove"} OTCommandType */
|
||||
/**@typedef {"help"|"message"|"close"|"delete"|"reopen"|"rename"|"add"|"remove"|"claim"|"unclaim"|"change"|"stats"} OTCommandType */
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -237,7 +302,7 @@ exports.onCommand = (type,hasPerms,user,channel,guild,date) => {
|
||||
* @param {discord.TextChannel} channel
|
||||
* @param {discord.Guild} guild
|
||||
* @param {Date} date
|
||||
* @param {{name:String,status:"open"|"closed"|"deleted"|"reopened",ticketOptions:Object|false}} ticketdata
|
||||
* @param {{name:String,status:"open"|"closed"|"deleted"|"reopened",ticketOptions:configParser.OTTicketOptions}} ticketdata
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -246,7 +311,7 @@ exports.onCommand = (type,hasPerms,user,channel,guild,date) => {
|
||||
* @param {discord.TextChannel} channel
|
||||
* @param {discord.Guild} guild
|
||||
* @param {Date} date
|
||||
* @param {{name:String,status:"open"|"closed"|"deleted"|"reopened",ticketOptions:Object|false}} ticketdata
|
||||
* @param {{name:String,status:"open"|"closed"|"deleted"|"reopened",ticketOptions:configParser.OTTicketOptions}} ticketdata
|
||||
* @param {String} reason
|
||||
*/
|
||||
|
||||
@@ -265,7 +330,17 @@ exports.onCommand = (type,hasPerms,user,channel,guild,date) => {
|
||||
* @param {discord.TextChannel} channel
|
||||
* @param {discord.Guild} guild
|
||||
* @param {Date} date
|
||||
* @param {{name:String,status:"open"|"closed"|"deleted"|"reopened",ticketOptions:Object|false}} ticketdata
|
||||
* @param {{name:String,status:"open"|"closed"|"deleted"|"reopened",ticketOptions:configParser.OTTicketOptions}} ticketdata
|
||||
*/
|
||||
|
||||
/**
|
||||
* @callback TicketTypeChangeEvent
|
||||
* @param {String} newtype
|
||||
* @param {discord.User} user
|
||||
* @param {discord.TextChannel} channel
|
||||
* @param {discord.Guild} guild
|
||||
* @param {Date} date
|
||||
* @param {{name:String,status:"open"|"closed"|"deleted"|"reopened",ticketOptions:configParser.OTTicketOptions}} ticketdata
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -327,6 +402,21 @@ const onTicketRemove = (callback) => {
|
||||
ticketRemoveListeners.push(callback)
|
||||
}
|
||||
|
||||
/**@param {TicketActionEvent} callback */
|
||||
const onTicketClaim = (callback) => {
|
||||
ticketClaimListeners.push(callback)
|
||||
}
|
||||
|
||||
/**@param {TicketActionEvent} callback */
|
||||
const onTicketUnclaim = (callback) => {
|
||||
ticketUnclaimListeners.push(callback)
|
||||
}
|
||||
|
||||
/**@param {TicketTypeChangeEvent} callback */
|
||||
const onTicketChange = (callback) => {
|
||||
ticketChangeListeners.push(callback)
|
||||
}
|
||||
|
||||
/**@param {TranscriptCreationEvent} callback */
|
||||
const onTranscriptCreation = (callback) => {
|
||||
transcriptCreationListeners.push(callback)
|
||||
@@ -354,6 +444,9 @@ exports.events = {
|
||||
onTicketReopen,
|
||||
onTicketAdd,
|
||||
onTicketRemove,
|
||||
onTicketClaim,
|
||||
onTicketUnclaim,
|
||||
onTicketChange,
|
||||
onTranscriptCreation,
|
||||
onCommand,
|
||||
onReactionRole,
|
||||
|
||||
@@ -3,6 +3,9 @@ const bot = require("../../index")
|
||||
const log = bot.errorLog.log
|
||||
|
||||
module.exports = () => {
|
||||
const args = process.argv
|
||||
const debugMode = args.includes("--debug")
|
||||
|
||||
const files = fs.readdirSync("./plugins")
|
||||
const api = require("./api.json")
|
||||
var totalcount = 0
|
||||
@@ -11,23 +14,30 @@ module.exports = () => {
|
||||
files.forEach((file) => {
|
||||
if (file.endsWith(".plugin.js")){
|
||||
try {
|
||||
require("../../plugins/"+file)()
|
||||
require("../../plugins/" + file)()
|
||||
|
||||
successcount++
|
||||
totalcount++
|
||||
}catch(err){
|
||||
/**@type {Error} */
|
||||
const theError = err
|
||||
if (api.enableAPIdebug){
|
||||
const data = fs.readFileSync("./apiDebug.txt")
|
||||
const newData = data ? data.toString() : ""
|
||||
fs.writeFileSync("./apiDebug.txt",newData+"ERROR: "+theError.name+": "+theError.message+"\n"+theError.stack+"\n\n")
|
||||
if (api.enableAPIdebug || debugMode) {
|
||||
console.error(theError)
|
||||
}
|
||||
|
||||
try {
|
||||
const data = fs.readFileSync("./openticketdebug.txt")
|
||||
const newData = data ? data.toString() : ""
|
||||
fs.writeFileSync("./openticketdebug.txt", newData + "\nPLUGIN "+file+" ERROR: " + theError.name + ": " + theError.message + "\n" + theError.stack + "\n\n")
|
||||
} catch {
|
||||
fs.writeFileSync("./openticketdebug.txt", "\nPLUGIN "+file+" ERROR: " + theError.name + ": " + theError.message + "\n" + theError.stack + "\n\n")
|
||||
}
|
||||
|
||||
failcount++
|
||||
totalcount++
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
log("info","loaded plugins",[{key:"success",value:successcount},{key:"error",value:failcount},{key:"total",value:totalcount}])
|
||||
require("../startscreen").headerDataPlugins({ total: totalcount, success: successcount, error: failcount })
|
||||
}
|
||||
+117
-64
@@ -5,7 +5,7 @@ exports.checker = async () => {
|
||||
if (process.argv.some((v) => v == "--devconfig")){
|
||||
//console.log(chalk.blue("=> used dev config instead of normal config"))
|
||||
try{
|
||||
var tempconfig = require("../devConfig.json")
|
||||
var tempconfig = require("../devconfig.json")
|
||||
}catch(err){console.log(err);var tempconfig = require("../config.json")}
|
||||
}else{
|
||||
var tempconfig = require("../config.json")
|
||||
@@ -53,9 +53,9 @@ exports.checker = async () => {
|
||||
/**@param {String} value */
|
||||
const checkToken = (value) => {
|
||||
if (value.length < 40){
|
||||
createError("'auth_token' | your token is invalid")
|
||||
createError("'token/value' | your token is invalid")
|
||||
}
|
||||
if (value.includes(" ")) createError("'auth_token' | your token includes spaces!")
|
||||
if (value.includes(" ")) createError("'token/value' | your token includes spaces!")
|
||||
}
|
||||
|
||||
/**@param {String} value @param {String} path */
|
||||
@@ -85,6 +85,9 @@ exports.checker = async () => {
|
||||
|
||||
/**@param {"userid"|"roleid"|"channelid"|"serverid"} mode @param {String[]} arrayValue @param {String} path */
|
||||
const checkDiscordArray = (mode,arrayValue,path) => {
|
||||
if (!Array.isArray(arrayValue)){
|
||||
return createError("'"+path+"' | this needs to be an Array!")
|
||||
}
|
||||
if (mode == "userid"){
|
||||
arrayValue.forEach((value,index) => {
|
||||
if (value.length < 16 || value.length > 20 || !/^\d+$/.test(value)){
|
||||
@@ -111,21 +114,34 @@ exports.checker = async () => {
|
||||
})
|
||||
}
|
||||
}
|
||||
/**@param {String} value @param {"string"|"boolean"|"number"} type */
|
||||
/**@param {String} value @param {"string"|"boolean"|"number"|"array"|"object"} type */
|
||||
const checkType = (value,type,path) => {
|
||||
if (type == "boolean"){
|
||||
if (typeof value != "boolean"){
|
||||
createError("'"+path+"' | invalid type, this must be a boolean!")
|
||||
}
|
||||
return true
|
||||
}else return false
|
||||
}else if (type == "number"){
|
||||
if (typeof value != "number"){
|
||||
createError("'"+path+"' | invalid type, this must be a number!")
|
||||
}
|
||||
return true
|
||||
}else return false
|
||||
}else if (type == "string"){
|
||||
if (typeof value != "string"){
|
||||
createError("'"+path+"' | invalid type, this must be a string!")
|
||||
}
|
||||
}
|
||||
return true
|
||||
}else return false
|
||||
}else if (type == "array"){
|
||||
if (!Array.isArray(value)){
|
||||
createError("'"+path+"' | invalid type, this must be an array!")
|
||||
return true
|
||||
}else return false
|
||||
}else if (type == "object"){
|
||||
if (typeof value != "object"){
|
||||
createError("'"+path+"' | invalid type, this must be an object!")
|
||||
return true
|
||||
}else return false
|
||||
}else return false
|
||||
}
|
||||
|
||||
const checkButtonColor = (value,path) => {
|
||||
@@ -163,7 +179,7 @@ exports.checker = async () => {
|
||||
checkType(option.description,"string",path+"/description")
|
||||
|
||||
//icon
|
||||
const emojiRegex = /(\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff])/gi;
|
||||
const emojiRegex = /(?:\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff])|(?:<a?:[^:]*:[0-9]+>)/gi
|
||||
if (option.icon.length > 0){
|
||||
|
||||
const isEmoji = emojiRegex.test(option.icon)
|
||||
@@ -194,6 +210,7 @@ exports.checker = async () => {
|
||||
checkButtonColor(option.color,path+"/color")
|
||||
|
||||
//adminroles
|
||||
checkType(option.adminroles,"array",path+"/adminroles")
|
||||
checkDiscordArray("roleid",option.adminroles,path+"/adminroles")
|
||||
|
||||
//channelprefix
|
||||
@@ -218,15 +235,39 @@ exports.checker = async () => {
|
||||
checkType(option.ticketmessage,"string",path+"/ticketmessage")
|
||||
|
||||
//thumbnail
|
||||
checkType(option.thumbnail.enable,"boolean",path/"/thumbnail/enable")
|
||||
checkType(option.thumbnail.url,"string",path/"/thumbnail/url")
|
||||
if (option.thumbnail){
|
||||
checkType(option.thumbnail.enable,"boolean",path+"/thumbnail/enable")
|
||||
checkType(option.thumbnail.url,"string",path+"/thumbnail/url")
|
||||
}else{
|
||||
createError("'"+path+"/thumbnail' | there is no thumbnail object!")
|
||||
}
|
||||
|
||||
//image
|
||||
if (option.image){
|
||||
checkType(option.image.enable,"boolean",path+"/image/enable")
|
||||
checkType(option.image.url,"string",path+"/image/url")
|
||||
}else{
|
||||
createError("'"+path+"/image' | there is no image object!")
|
||||
}
|
||||
|
||||
//closedCategory
|
||||
if (option.closedCategory){
|
||||
checkType(option.closedCategory.enable,"boolean",path/"/closedCategory/enable")
|
||||
checkType(option.closedCategory.id,"string",path/"/closedCategory/id")
|
||||
if (option.closedCategory.enable){
|
||||
checkDiscord("roleid",option.closedCategory.id,path+"/closedCategory/id")
|
||||
}
|
||||
}else{
|
||||
createError("'"+path+"/closedCategory' | there is no closedCategory object!")
|
||||
}
|
||||
|
||||
//autoclose
|
||||
if (option.autoclose){
|
||||
checkType(option.autoclose.enable,"boolean",path/"/autoclose/enable")
|
||||
checkType(option.autoclose.inactiveHours,"number",path/"/autoclose/id")
|
||||
}else{
|
||||
createError("'"+path+"/autoclose' | there is no autoclose object!")
|
||||
}
|
||||
|
||||
}else if (type == "website"){
|
||||
//url
|
||||
@@ -308,11 +349,8 @@ exports.checker = async () => {
|
||||
checkHexColor(input.color,path+"/color")
|
||||
}
|
||||
|
||||
//ticket explaination & max tickets warning
|
||||
checkType(input.enableTicketExplaination,"boolean",path+"/enableTicketExplaination")
|
||||
checkType(input.enableMaxTicketsWarning,"boolean",path+"/enableMaxTicketsWarning")
|
||||
|
||||
//OPTIONS!!!
|
||||
if (checkType(input.options,"array",path+"/options")){
|
||||
var counter = 0
|
||||
input.options.forEach((option) => {if (!configParser.optionExists(option)){counter++}})
|
||||
|
||||
@@ -327,39 +365,76 @@ exports.checker = async () => {
|
||||
}
|
||||
}
|
||||
|
||||
//other
|
||||
//ticket explaination & max tickets warning
|
||||
if (typeof input.other != "object"){
|
||||
createError("'"+path+"/other' | this object doesn't exist!")
|
||||
}else{
|
||||
checkType(input.other.enableTicketExplaination,"boolean",path+"/other/enableTicketExplaination")
|
||||
checkType(input.other.enableMaxTicketsWarning,"boolean",path+"/other/enableMaxTicketsWarning")
|
||||
|
||||
//customDropdownPlaceholder
|
||||
if (typeof input.other.customDropdownPlaceholder != "object"){
|
||||
createError("'"+path+"/other/customDropdownPlaceholder' | this object doesn't exist!")
|
||||
}else{
|
||||
checkType(input.other.customDropdownPlaceholder.enable,"boolean",path+"/other/customDropdownPlaceholder/enable")
|
||||
checkType(input.other.customDropdownPlaceholder.text,"string",path+"/other/customDropdownPlaceholder/text")
|
||||
if (input.other.customDropdownPlaceholder.enable && input.other.customDropdownPlaceholder.text.length < 1){createError("'"+path+"/other/customDropdownPlaceholder/text' | there is no placeholder text!")}
|
||||
}
|
||||
|
||||
//customCategoryText
|
||||
if (typeof input.other.customCategoryText != "object"){
|
||||
createError("'"+path+"/other/customCategoryText' | this object doesn't exist!")
|
||||
}else{
|
||||
checkType(input.other.customCategoryText.enable,"boolean",path+"/other/customCategoryText/enable")
|
||||
checkType(input.other.customCategoryText.text,"string",path+"/other/customCategoryText/text")
|
||||
if (input.other.customCategoryText.enable && input.other.customCategoryText.text.length < 1){createError("'"+path+"/other/customCategoryText/text' | there is no category text!")}
|
||||
}
|
||||
|
||||
//embedTitleURL
|
||||
if (typeof input.other.embedTitleURL != "object"){
|
||||
createError("'"+path+"/other/embedTitleURL' | this object doesn't exist!")
|
||||
}else{
|
||||
checkType(input.other.embedTitleURL.enable,"boolean",path+"/other/embedTitleURL/enable")
|
||||
checkType(input.other.embedTitleURL.url,"string",path+"/other/embedTitleURL/text")
|
||||
if (input.other.embedTitleURL.enable && input.other.embedTitleURL.url.length < 1){createError("'"+path+"/other/embedTitleURL/url' | there is no url!")}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------|
|
||||
//--------------------------|
|
||||
//checker => START HERE |
|
||||
//--------------------------|
|
||||
//--------------------------|
|
||||
|
||||
var configArray = ["main_color","server_id","auth_token","main_adminroles","prefix","languagefile","credits","status","system","options","messages"]
|
||||
var configArray = ["color","serverId","token","adminRoles","prefix","languageFile","status","system","options","messages"]
|
||||
configArray.forEach((item) => {
|
||||
if (config[item] == undefined){
|
||||
throw new Error("\n\nMAIN ERROR: the item '"+item+"' doesn't exist in config.json")
|
||||
}
|
||||
})
|
||||
|
||||
checkHexColor(config.main_color,"main_color")
|
||||
checkDiscord("serverid",config.server_id,"server_id")
|
||||
checkHexColor(config.color,"main_color")
|
||||
checkDiscord("serverid",config.serverId,"server_id")
|
||||
|
||||
if (!require("./api/api.json").disable.checkerjs.token) checkToken(config.auth_token)
|
||||
if (!require("./api/api.json").disable.checkerjs.token && !config.token.fromENV) checkToken(config.token.value)
|
||||
|
||||
checkDiscordArray("roleid",config.main_adminroles,"main_adminroles")
|
||||
checkType(config.adminRoles,"array","/main_adminroles")
|
||||
checkDiscordArray("roleid",config.adminRoles,"main_adminroles")
|
||||
checkString(config.prefix,1,15,"prefix","prefix")
|
||||
//languagefile
|
||||
checkType(config.languagefile,"string","languagefile")
|
||||
const lf = config.languagefile
|
||||
checkType(config.languageFile,"string","languagefile")
|
||||
const lf = config.languageFile
|
||||
|
||||
if (!lf.startsWith("custom") && !lf.startsWith("english") && !lf.startsWith("dutch") && !lf.startsWith("romanian") && !lf.startsWith("german") && !lf.startsWith("arabic") && !lf.startsWith("spanish") && !lf.startsWith("portuguese") && !lf.startsWith("french") && !lf.startsWith("italian")){
|
||||
if (!lf.startsWith("custom") && !lf.startsWith("english") && !lf.startsWith("dutch") && !lf.startsWith("romanian") && !lf.startsWith("german") && !lf.startsWith("arabic") && !lf.startsWith("spanish") && !lf.startsWith("portuguese") && !lf.startsWith("french") && !lf.startsWith("italian") && !lf.startsWith("czech") && !lf.startsWith("danish") && !lf.startsWith("russian") && !lf.startsWith("turkish") && !lf.startsWith("polish") && !lf.startsWith("slovenian") && !lf.startsWith("thai") && !lf.startsWith("norwegian") && !lf.startsWith("greek") && !lf.startsWith("ukrainian") && !lf.startsWith("hungarian") && !lf.startsWith("indonesian")){
|
||||
createError("'languagefile' | invalid language, more info in the wiki")
|
||||
}
|
||||
|
||||
checkType(config.credits,"boolean","credits")
|
||||
//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){
|
||||
@@ -370,30 +445,28 @@ exports.checker = async () => {
|
||||
|
||||
|
||||
//system:
|
||||
if (config.system.ticket_channel){
|
||||
if (config.system.ticket_channel.length < 16 || config.system.ticket_channel.length > 20 || !/^\d+$/.test(config.system.ticket_channel)){
|
||||
createError("'system/ticket_channel' | this channel id is invalid")
|
||||
}
|
||||
}else createWarn("'"+path+"' | you have no ticket channel selected!")
|
||||
checkType(config.system.max_allowed_tickets,"number","system/max_allowed_tickets")
|
||||
checkType(config.system.enable_DM_Messages,"boolean","system/enable_DM_Messages")
|
||||
checkType(config.system["has@everyoneaccess"],"boolean","system/has@everyoneaccess")
|
||||
if (config.system.member_role != "" && config.system.member_role != " " && config.system.member_role != "false" && config.system.member_role != "null" && config.system.member_role != "0"){
|
||||
checkDiscord("roleid",config.system.member_role,"system/member_role")
|
||||
//max tickets
|
||||
checkType(config.system.maxAmountOfTickets,"number","system/maxAmountOfTickets")
|
||||
|
||||
//enableDMmessages
|
||||
checkType(config.system.dmMessages,"boolean","system/dmMessages")
|
||||
|
||||
//memberRole
|
||||
checkType(config.system.memberRole,"string","system/memberRole")
|
||||
if (config.system.memberRole && ![" ","0","false","null","undefined"].includes(config.system.memberRole)){
|
||||
checkDiscord("roleid",config.system.memberRole,"system/memberRole")
|
||||
}else{
|
||||
createWarn("'system/member_role' | You don't have a member role, but it's recommended!")
|
||||
createWarn("'system/memberRole' | You don't have a member role, but it's recommended!")
|
||||
}
|
||||
|
||||
//closemode
|
||||
checkType(config.system.closeMode,"string","system/closeMode")
|
||||
if (!["normal","adminonly"].includes(config.system.closeMode)){
|
||||
createError("'system/closeMode' | the close mode must be adminonly or normal")
|
||||
}
|
||||
|
||||
checkType(config.system.enable_transcript,"boolean","system/enable_transcript")
|
||||
checkType(config.system.enable_DM_transcript,"boolean","system/enable_DM_transcript")
|
||||
if (config.system.enable_transcript){
|
||||
checkDiscord("channelid",config.system.transcript_channel,"system/transcript_channel")
|
||||
}
|
||||
checkType(config.system.showSlashcmdsInHelp,"boolean","system/showSlashcmdsInHelp")
|
||||
checkType(config.system.answerInEphemeralOnOpen,"boolean","system/answerInEphemeralOnOpen")
|
||||
|
||||
//options
|
||||
|
||||
@@ -407,29 +480,6 @@ exports.checker = async () => {
|
||||
})
|
||||
|
||||
|
||||
//discord check
|
||||
/**
|
||||
const discord = require("discord.js")
|
||||
const {GatewayIntentBits,Partials} = discord
|
||||
const client = new discord.Client({
|
||||
intents:[
|
||||
GatewayIntentBits.DirectMessages,
|
||||
GatewayIntentBits.GuildInvites,
|
||||
GatewayIntentBits.GuildMembers,
|
||||
GatewayIntentBits.GuildMessages,
|
||||
GatewayIntentBits.Guilds,
|
||||
GatewayIntentBits.MessageContent
|
||||
],
|
||||
partials:[Partials.Channel,Partials.Message]
|
||||
})
|
||||
await client.guilds.fetch()
|
||||
if (!client.guilds.cache.find(g => g.id == config.server_id)){
|
||||
createError("'server_id' | i'm not in a server with this id!")
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
|
||||
//the end
|
||||
if (errorList.length > 0 || warnList.length > 0){
|
||||
console.log("REPORT:\n===========================")
|
||||
@@ -438,6 +488,9 @@ exports.checker = async () => {
|
||||
const splitw = w.split("'")
|
||||
if (splitw.length > 1){
|
||||
var splitstring = chalk.yellow(splitw[0])+chalk.blue("'"+splitw[1]+"'")+chalk.yellow(splitw[2])
|
||||
if (splitw[3]){splitstring = splitstring+chalk.yellow(splitw[3])}
|
||||
if (splitw[4]){splitstring = splitstring+chalk.yellow(splitw[4])}
|
||||
if (splitw[5]){splitstring = splitstring+chalk.yellow(splitw[5])}
|
||||
}else {var splitstring = chalk.yellow(splitw[0])}
|
||||
console.log(splitstring)
|
||||
})
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
const fs = require("fs")
|
||||
const location = "./storage/database.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"))
|
||||
}
|
||||
|
||||
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|false}
|
||||
*/
|
||||
exports.get = (category,key) => {
|
||||
const currentData = getData()
|
||||
const tempresult = currentData.find((d) => (d.category == category) && (d.key == key))
|
||||
const result = tempresult ? tempresult.value : false
|
||||
return result
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {String} category
|
||||
* @returns {[{key:String,value:String}]|false}
|
||||
*/
|
||||
exports.getCategory = (category) => {
|
||||
const currentData = getData()
|
||||
const result = currentData.filter((v) => v.category == category)
|
||||
return result
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {String} category
|
||||
* @param {String} key
|
||||
* @param {String} value
|
||||
*/
|
||||
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
|
||||
}
|
||||
@@ -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,39 +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
|
||||
}
|
||||
@@ -1,13 +1,23 @@
|
||||
//Do not change this without knowing what you are doing!!
|
||||
const databaseFile = "local"
|
||||
//Do not change this without knowing what you are doing!!
|
||||
|
||||
/**
|
||||
==================================================================
|
||||
ALL DATABASE FILES NEED TO EXPORT THE FOLLOWING FUNCTIONS:
|
||||
- get(category:String,key:String) => String (value)
|
||||
- set(category:String,key:String,value:String) => Boolean (success)
|
||||
- delete(category:String,key:String) => Boolean (success)
|
||||
- getCategory(category:String) => Array[{key:String,value:String}] (key,value)
|
||||
==================================================================
|
||||
*/
|
||||
|
||||
try {
|
||||
var db = require("./dynamicfiles/local")
|
||||
}catch{
|
||||
console.log("I couldn't find the database file! (location: ./core/dynamicdatabase/storage.js:2)")
|
||||
var main = require("./databases/main")
|
||||
var stats = require("./databases/stats")
|
||||
}catch(err){
|
||||
console.log(err)
|
||||
console.log("Unable to find the database handlers!")
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
module.exports = db
|
||||
module.exports = {
|
||||
main,
|
||||
stats
|
||||
}
|
||||
+34
-14
@@ -14,25 +14,25 @@ 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.tag})
|
||||
.setFooter({iconURL:user.displayAvatarURL(),text:user.username})
|
||||
}
|
||||
|
||||
/**@param {discord.User} 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.tag})
|
||||
.setFooter({iconURL:user.displayAvatarURL(),text:user.username})
|
||||
}
|
||||
|
||||
/**@param {String} message */
|
||||
exports.invalidArgsMessage = (message) => {
|
||||
var x = new embed()
|
||||
.setColor(c.Red)
|
||||
.setTitle(":x: "+l.errors.missingArgsTitle)
|
||||
.setTitle("❌ "+l.errors.missingArgsTitle)
|
||||
.setDescription(message)
|
||||
|
||||
return x
|
||||
@@ -42,32 +42,38 @@ 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
|
||||
}
|
||||
|
||||
/**@param {String[]} list */
|
||||
exports.invalidIdChooseFromList = (list) => {
|
||||
/**@param {String[]} list @param {String|undefined} message */
|
||||
exports.invalidIdChooseFromList = (list,message) => {
|
||||
const beforemsg = message ? message+"\n\n" : ""
|
||||
var x = new embed()
|
||||
.setColor(c.Red)
|
||||
.setTitle(":x: "+l.errors.chooseFromListTitle)
|
||||
.setDescription(l.errors.chooseFromListDescription+"\n`"+list.join("`\n`")+"`")
|
||||
.setTitle("❌ "+l.errors.chooseFromListTitle)
|
||||
.setDescription(beforemsg+l.errors.chooseFromListDescription+"\n`"+list.join("`\n`")+"`")
|
||||
return x
|
||||
}
|
||||
|
||||
exports.failedRenameChannel = new embed()
|
||||
.setColor(c.Red)
|
||||
.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)
|
||||
|
||||
|
||||
/**@param {String} message @param {String} title */
|
||||
exports.success = (title,message) => {
|
||||
var x = new embed()
|
||||
.setColor(config.main_color)
|
||||
.setTitle(":white_check_mark: "+title)
|
||||
.setColor(config.color)
|
||||
.setTitle("✅ "+title)
|
||||
.setDescription(message)
|
||||
|
||||
return x
|
||||
@@ -77,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
|
||||
@@ -93,10 +99,24 @@ exports.custom = (title,message,emoji,color) => {
|
||||
return x
|
||||
}
|
||||
|
||||
exports.clearDebugFile = () => {
|
||||
const fs = require("fs")
|
||||
if (!fs.existsSync("./openticketdebug.txt")) return
|
||||
const content = fs.readFileSync("./openticketdebug.txt").toString().split("\n")
|
||||
if (content.length < 5000) return
|
||||
for (let i = 0; i < 4000; i++) {
|
||||
content.shift()
|
||||
}
|
||||
|
||||
const newContent = "==========================\n<OPEN TICKET DEBUG FILE:>\n=========================="+content.join("\n")
|
||||
fs.writeFileSync("./openticketdebug.txt",newContent)
|
||||
}
|
||||
|
||||
const normalLog = (debugString) => {
|
||||
const fs = require("fs")
|
||||
const content = fs.existsSync("./openticketdebug.txt") ? fs.readFileSync("./openticketdebug.txt").toString() : "==========================\n<OPEN TICKET DEBUG FILE:>\n=========================="
|
||||
fs.writeFileSync("./openticketdebug.txt",content+"\nSYSTEM: "+debugString)
|
||||
this.clearDebugFile()
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -7,7 +7,7 @@ const log = bot.errorLog.log
|
||||
|
||||
const hiddendata = bot.hiddenData
|
||||
const embed = discord.EmbedBuilder
|
||||
const mc = config.main_color
|
||||
const mc = config.color
|
||||
|
||||
const button = discord.ButtonBuilder
|
||||
const arb = discord.ActionRowBuilder
|
||||
@@ -25,16 +25,26 @@ exports.closeCommandRow = new arb()
|
||||
)
|
||||
.addComponents(
|
||||
new button()
|
||||
.setCustomId("OTsendTranscript")
|
||||
.setCustomId("OTreopenTicket")
|
||||
.setDisabled(false)
|
||||
.setStyle(bs.Secondary)
|
||||
.setLabel(l.buttons.sendTranscript)
|
||||
.setEmoji("📄")
|
||||
.setStyle(bs.Success)
|
||||
.setLabel(l.buttons.reopen)
|
||||
.setEmoji("✔")
|
||||
)
|
||||
|
||||
exports.closeCommandRowDisabled = new arb()
|
||||
.addComponents(
|
||||
new button()
|
||||
.setCustomId("OTdeleteTicket1")
|
||||
.setDisabled(true)
|
||||
.setStyle(bs.Danger)
|
||||
.setLabel(l.buttons.delete)
|
||||
.setEmoji("✖️")
|
||||
)
|
||||
.addComponents(
|
||||
new button()
|
||||
.setCustomId("OTreopenTicket")
|
||||
.setDisabled(false)
|
||||
.setDisabled(true)
|
||||
.setStyle(bs.Success)
|
||||
.setLabel(l.buttons.reopen)
|
||||
.setEmoji("✔")
|
||||
|
||||
@@ -7,7 +7,7 @@ const log = bot.errorLog.log
|
||||
|
||||
const hiddendata = bot.hiddenData
|
||||
const embed = discord.EmbedBuilder
|
||||
const mc = config.main_color
|
||||
const mc = config.color
|
||||
|
||||
const button = discord.ButtonBuilder
|
||||
const arb = discord.ActionRowBuilder
|
||||
@@ -15,6 +15,13 @@ const bs = discord.ButtonStyle
|
||||
|
||||
|
||||
exports.firstmsgRowNormal = new arb()
|
||||
.addComponents(
|
||||
new button()
|
||||
.setCustomId("OTclaimTicket")
|
||||
.setDisabled(false)
|
||||
.setStyle(bs.Success)
|
||||
.setLabel("Claim Ticket")
|
||||
)
|
||||
.addComponents(
|
||||
new button()
|
||||
.setCustomId("OTcloseTicket")
|
||||
@@ -33,6 +40,63 @@ exports.firstmsgRowNormal = new arb()
|
||||
)
|
||||
|
||||
exports.firstmsgRowDisabled = new arb()
|
||||
.addComponents(
|
||||
new button()
|
||||
.setCustomId("OTclaimTicket")
|
||||
.setDisabled(false)
|
||||
.setStyle(bs.Success)
|
||||
.setLabel("Claim Ticket")
|
||||
)
|
||||
.addComponents(
|
||||
new button()
|
||||
.setCustomId("OTcloseTicket")
|
||||
.setDisabled(true)
|
||||
.setStyle(bs.Secondary)
|
||||
.setLabel(l.buttons.close)
|
||||
.setEmoji("🔒")
|
||||
)
|
||||
.addComponents(
|
||||
new button()
|
||||
.setCustomId("OTdeleteTicket")
|
||||
.setDisabled(true)
|
||||
.setStyle(bs.Danger)
|
||||
.setLabel(l.buttons.delete)
|
||||
.setEmoji("✖️")
|
||||
)
|
||||
|
||||
exports.firstmsgRowNormalNoClaim = new arb()
|
||||
.addComponents(
|
||||
new button()
|
||||
.setCustomId("OTclaimTicket")
|
||||
.setDisabled(true)
|
||||
.setStyle(bs.Secondary)
|
||||
.setLabel("Claim Ticket")
|
||||
)
|
||||
.addComponents(
|
||||
new button()
|
||||
.setCustomId("OTcloseTicket")
|
||||
.setDisabled(false)
|
||||
.setStyle(bs.Secondary)
|
||||
.setLabel(l.buttons.close)
|
||||
.setEmoji("🔒")
|
||||
)
|
||||
.addComponents(
|
||||
new button()
|
||||
.setCustomId("OTdeleteTicket")
|
||||
.setDisabled(false)
|
||||
.setStyle(bs.Danger)
|
||||
.setLabel(l.buttons.delete)
|
||||
.setEmoji("✖️")
|
||||
)
|
||||
|
||||
exports.firstmsgRowDisabledNoClaim = new arb()
|
||||
.addComponents(
|
||||
new button()
|
||||
.setCustomId("OTclaimTicket")
|
||||
.setDisabled(true)
|
||||
.setStyle(bs.Secondary)
|
||||
.setLabel("Claim Ticket")
|
||||
)
|
||||
.addComponents(
|
||||
new button()
|
||||
.setCustomId("OTcloseTicket")
|
||||
|
||||
@@ -8,7 +8,7 @@ const log = bot.errorLog.log
|
||||
|
||||
const hiddendata = bot.hiddenData
|
||||
const embed = discord.EmbedBuilder
|
||||
const mc = config.main_color
|
||||
const mc = config.color
|
||||
|
||||
const button = discord.ButtonBuilder
|
||||
const arb = discord.ActionRowBuilder
|
||||
|
||||
@@ -7,7 +7,7 @@ const log = bot.errorLog.log
|
||||
|
||||
const hiddendata = bot.hiddenData
|
||||
const embed = discord.EmbedBuilder
|
||||
const mc = config.main_color
|
||||
const mc = config.color
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -19,7 +19,7 @@ exports.addEmbed = (addedUser,adder) => {
|
||||
return new embed()
|
||||
.setTitle("⬆️ "+l.commands.userAddedTitle.replace("{0}",addedUser.username))
|
||||
.setColor(mc)
|
||||
.setFooter({text:adder.tag,iconURL:adder.displayAvatarURL()})
|
||||
.setFooter({text:adder.username,iconURL:adder.displayAvatarURL()})
|
||||
.setThumbnail(addedUser.displayAvatarURL({extension:"png"}))
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ exports.removeEmbed = (removedUser,remover) => {
|
||||
return new embed()
|
||||
.setTitle("⬇️ "+l.commands.userRemovedTitle.replace("{0}",removedUser.username))
|
||||
.setColor(mc)
|
||||
.setFooter({text:remover.tag,iconURL:remover.displayAvatarURL()})
|
||||
.setFooter({text:remover.username,iconURL:remover.displayAvatarURL()})
|
||||
.setThumbnail(removedUser.displayAvatarURL({extension:"png"}))
|
||||
}
|
||||
|
||||
@@ -47,12 +47,27 @@ exports.closeEmbed = (closer,description) => {
|
||||
const embd = new embed()
|
||||
.setTitle("🔒 "+l.commands.closeTitle)
|
||||
.setColor(mc)
|
||||
.setFooter({text:closer.tag,iconURL:closer.displayAvatarURL()})
|
||||
.setFooter({text:closer.username,iconURL:closer.displayAvatarURL()})
|
||||
|
||||
if (description) embd.setDescription(description)
|
||||
return embd
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {discord.User} closer
|
||||
* @param {Number} time
|
||||
* @returns {discord.EmbedBuilder}
|
||||
*/
|
||||
exports.autocloseSignalEmbed = (closer,time) => {
|
||||
const embd = new embed()
|
||||
.setTitle("⏰ This ticket got closed by Autoclose!")
|
||||
.setColor(mc)
|
||||
.setFooter({text:closer.username,iconURL:closer.displayAvatarURL()})
|
||||
.setDescription("This ticket has been inactive for `"+time+"h`!")
|
||||
return embd
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {discord.User} deleter
|
||||
@@ -62,7 +77,7 @@ exports.deleteEmbed = (deleter) => {
|
||||
return new embed()
|
||||
.setTitle("❌ "+l.commands.deleteTitle)
|
||||
.setColor(mc)
|
||||
.setFooter({text:deleter.tag,iconURL:deleter.displayAvatarURL()})
|
||||
.setFooter({text:deleter.username,iconURL:deleter.displayAvatarURL()})
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -75,7 +90,7 @@ exports.renameEmbed = (renamer,newname) => {
|
||||
return new embed()
|
||||
.setTitle("🔄 "+l.commands.renameTitle.replace("{0}",newname))
|
||||
.setColor(mc)
|
||||
.setFooter({text:renamer.tag,iconURL:renamer.displayAvatarURL()})
|
||||
.setFooter({text:renamer.username,iconURL:renamer.displayAvatarURL()})
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -87,7 +102,7 @@ exports.renameEmbed = (renamer,newname) => {
|
||||
return new embed()
|
||||
.setTitle("🔓 "+l.commands.reopenTitle)
|
||||
.setColor(mc)
|
||||
.setFooter({text:reopener.tag,iconURL:reopener.displayAvatarURL()})
|
||||
.setFooter({text:reopener.username,iconURL:reopener.displayAvatarURL()})
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -100,7 +115,7 @@ exports.renameEmbed = (renamer,newname) => {
|
||||
return new embed()
|
||||
.setTitle("📌 "+l.commands.claimTitle.replace("{0}",claimer.username))
|
||||
.setColor(mc)
|
||||
.setFooter({text:user.tag,iconURL:user.displayAvatarURL()})
|
||||
.setFooter({text:user.username,iconURL:user.displayAvatarURL()})
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -112,28 +127,18 @@ exports.renameEmbed = (renamer,newname) => {
|
||||
return new embed()
|
||||
.setTitle("🆓 "+l.commands.unclaimTitle)
|
||||
.setColor(mc)
|
||||
.setFooter({text:unclaimer.tag,iconURL:unclaimer.displayAvatarURL()})
|
||||
.setFooter({text:unclaimer.username,iconURL:unclaimer.displayAvatarURL()})
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {Boolean} done
|
||||
* @param {discord.TextChannel} channel
|
||||
* @param {discord.User} author
|
||||
* @param {discord.User} changer
|
||||
* @param {String} newtype
|
||||
* @returns {discord.EmbedBuilder}
|
||||
*/
|
||||
exports.sendTranscriptEmbed = (done,channel,author) => {
|
||||
if (done){
|
||||
exports.changeEmbed = (changer,newtype) => {
|
||||
return new embed()
|
||||
.setTitle("📄 "+l.messages.hereIsTheTranscript)
|
||||
.setTitle("🔄 "+l.commands.changeTitle.replace("{0}",newtype))
|
||||
.setColor(mc)
|
||||
.setDescription("Ticket: "+channel.name)
|
||||
.setFooter({text:author.tag,iconURL:author.displayAvatarURL()})
|
||||
}else{
|
||||
return new embed()
|
||||
.setTitle("📄 "+l.messages.hereIsTheTranscript)
|
||||
.setColor(mc)
|
||||
.setDescription("Loading...")
|
||||
.setFooter({text:author.tag,iconURL:author.displayAvatarURL()})
|
||||
}
|
||||
.setFooter({text:changer.username,iconURL:changer.displayAvatarURL()})
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
const discord = require('discord.js')
|
||||
const bot = require('../../../../index')
|
||||
const client = bot.client
|
||||
const config = bot.config
|
||||
const l = bot.language
|
||||
const log = bot.errorLog.log
|
||||
|
||||
const permissionChecker = require("../../../utils/permisssionChecker")
|
||||
const storage = bot.storage
|
||||
const embed = discord.EmbedBuilder
|
||||
const mc = config.color
|
||||
const permsChecker = require("../../../utils/permisssionChecker")
|
||||
|
||||
const button = discord.ButtonBuilder
|
||||
const arb = discord.ActionRowBuilder
|
||||
const bs = discord.ButtonStyle
|
||||
|
||||
module.exports = () => {
|
||||
//CLAIM
|
||||
client.on("interactionCreate",async interaction => {
|
||||
if (!interaction.isButton()) return
|
||||
if (interaction.customId != "OTclaimTicket") return
|
||||
|
||||
try {
|
||||
await interaction.deferUpdate()
|
||||
}catch{}
|
||||
|
||||
if (!interaction.guild) 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)
|
||||
|
||||
interaction.channel.messages.fetchPinned().then(msglist => {
|
||||
/**@type {discord.Message} */
|
||||
var firstmsg = msglist.last()
|
||||
if (firstmsg == undefined || firstmsg.author.id != client.user.id) return interaction.editReply({embeds:[bot.errorLog.notInATicket]})
|
||||
|
||||
const newEmbed = new embed(firstmsg.embeds[0].data)
|
||||
.setFooter({text:"claimed by: "+interaction.user.username,iconURL:interaction.user.displayAvatarURL()})
|
||||
|
||||
if (firstmsg.components[0].components[1] && firstmsg.components[0].components[1].disabled){
|
||||
firstmsg.edit({components:[bot.buttons.firstmsg.firstmsgRowDisabledNoClaim],embeds:[newEmbed]})
|
||||
}else{
|
||||
firstmsg.edit({components:[bot.buttons.firstmsg.firstmsgRowNormalNoClaim],embeds:[newEmbed]})
|
||||
}
|
||||
|
||||
interaction.channel.send({embeds:[bot.embeds.commands.claimEmbed(interaction.user,interaction.user)]})
|
||||
})
|
||||
})
|
||||
}
|
||||
@@ -9,7 +9,7 @@ const permissionChecker = require("../../../utils/permisssionChecker")
|
||||
const storage = bot.storage
|
||||
const hiddendata = bot.hiddenData
|
||||
const embed = discord.EmbedBuilder
|
||||
const mc = config.main_color
|
||||
const mc = config.color
|
||||
|
||||
const button = discord.ButtonBuilder
|
||||
const arb = discord.ActionRowBuilder
|
||||
@@ -22,15 +22,21 @@ module.exports = () => {
|
||||
if (!interaction.isButton()) return
|
||||
if (interaction.customId != "OTcloseTicketTrue") return
|
||||
|
||||
interaction.deferUpdate()
|
||||
try {
|
||||
await interaction.deferUpdate()
|
||||
} catch{}
|
||||
|
||||
if (closeTicketButtonChecker == true) return
|
||||
closeTicketButtonChecker = true
|
||||
|
||||
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)
|
||||
}
|
||||
@@ -39,8 +45,17 @@ module.exports = () => {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if (interaction.message.pinned && interaction.message.author.id == client.user.id){
|
||||
const claimdata = storage.get("claimData",interaction.channel.id)
|
||||
if (claimdata && claimdata != "false"){
|
||||
interaction.message.edit({components:[bot.buttons.firstmsg.firstmsgRowDisabledNoClaim]})
|
||||
}else{
|
||||
interaction.message.edit({components:[bot.buttons.firstmsg.firstmsgRowDisabled]})
|
||||
}
|
||||
}else{
|
||||
interaction.message.edit({components:[bot.buttons.close.openRowDisabled]})
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @type {String}
|
||||
@@ -55,7 +70,7 @@ module.exports = () => {
|
||||
})
|
||||
|
||||
interaction.channel.send({embeds:[bot.embeds.commands.closeEmbed(interaction.user)],components:[bot.buttons.close.closeCommandRow]})
|
||||
await require("../../../ticketActions/ticketCloser").NEWcloseTicket(interaction.member,interaction.channel,prefix,"close",false,true)
|
||||
await require("../../../ticketActions/ticketCloser").closeManager(interaction.member,interaction.channel,prefix,"close",false,true)
|
||||
closeTicketButtonChecker = false
|
||||
})
|
||||
}
|
||||
@@ -9,7 +9,7 @@ const permissionChecker = require("../../../utils/permisssionChecker")
|
||||
const storage = bot.storage
|
||||
const hiddendata = bot.hiddenData
|
||||
const embed = discord.EmbedBuilder
|
||||
const mc = config.main_color
|
||||
const mc = config.color
|
||||
|
||||
const button = discord.ButtonBuilder
|
||||
const arb = discord.ActionRowBuilder
|
||||
@@ -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)
|
||||
}
|
||||
@@ -93,7 +97,7 @@ module.exports = () => {
|
||||
})
|
||||
|
||||
//interaction.channel.send({embeds:[bot.embeds.commands.closeEmbed(interaction.user)],components:[bot.buttons.close.closeCommandRow]})
|
||||
await require("../../../ticketActions/ticketCloser").NEWcloseTicket(interaction.member,interaction.channel,prefix,"close",reason,true)
|
||||
await require("../../../ticketActions/ticketCloser").closeManager(interaction.member,interaction.channel,prefix,"close",reason,true)
|
||||
closeTicketButtonChecker = false
|
||||
})
|
||||
}
|
||||
@@ -9,7 +9,7 @@ const permissionChecker = require("../../../utils/permisssionChecker")
|
||||
const storage = bot.storage
|
||||
const hiddendata = bot.hiddenData
|
||||
const embed = discord.EmbedBuilder
|
||||
const mc = config.main_color
|
||||
const mc = config.color
|
||||
|
||||
const button = discord.ButtonBuilder
|
||||
const arb = discord.ActionRowBuilder
|
||||
@@ -22,14 +22,18 @@ module.exports = () => {
|
||||
if (!interaction.isButton()) return
|
||||
if (interaction.customId != "OTdeleteTicketTrue") return
|
||||
|
||||
interaction.deferUpdate()
|
||||
await interaction.deferUpdate()
|
||||
|
||||
if (deleteTicketButtonChecker == true) return
|
||||
deleteTicketButtonChecker = true
|
||||
|
||||
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)
|
||||
}
|
||||
@@ -50,9 +54,9 @@ module.exports = () => {
|
||||
}
|
||||
})
|
||||
|
||||
interaction.channel.send({embeds:[bot.embeds.commands.deleteEmbed(interaction.user)]})
|
||||
await interaction.message.edit({components:[bot.buttons.close.openRowDisabled]})
|
||||
await require("../../../ticketActions/ticketCloser").NEWcloseTicket(interaction.member,interaction.channel,prefix,"delete",false,true)
|
||||
await interaction.channel.send({embeds:[bot.embeds.commands.deleteEmbed(interaction.user)]})
|
||||
await require("../../../ticketActions/ticketCloser").closeManager(interaction.member,interaction.channel,prefix,"delete",false,true)
|
||||
deleteTicketButtonChecker = false
|
||||
})
|
||||
|
||||
@@ -62,14 +66,18 @@ module.exports = () => {
|
||||
if (!interaction.isButton()) return
|
||||
if (interaction.customId != "OTdeleteTicketTrue1") return
|
||||
|
||||
interaction.deferUpdate()
|
||||
await interaction.deferUpdate()
|
||||
|
||||
if (deleteTicketButtonChecker1 == true) return
|
||||
deleteTicketButtonChecker1 = true
|
||||
|
||||
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)
|
||||
}
|
||||
@@ -90,8 +98,10 @@ module.exports = () => {
|
||||
}
|
||||
})
|
||||
|
||||
interaction.channel.send({embeds:[bot.embeds.commands.deleteEmbed(interaction.user)]})
|
||||
await require("../../../ticketActions/ticketCloser").NEWcloseTicket(interaction.member,interaction.channel,prefix,"deletenotranscript",false,true)
|
||||
await interaction.message.edit({components:[bot.buttons.close.closeCommandRowDisabled]})
|
||||
await interaction.channel.send({embeds:[bot.embeds.commands.deleteEmbed(interaction.user)]})
|
||||
await require("../../../ticketActions/ticketCloser").closeManager(interaction.member,interaction.channel,prefix,"delete",false,true)
|
||||
deleteTicketButtonChecker1 = false
|
||||
|
||||
})
|
||||
}
|
||||
@@ -9,7 +9,7 @@ const permissionChecker = require("../../../utils/permisssionChecker")
|
||||
const storage = bot.storage
|
||||
const hiddendata = bot.hiddenData
|
||||
const embed = discord.EmbedBuilder
|
||||
const mc = config.main_color
|
||||
const mc = config.color
|
||||
|
||||
const button = discord.ButtonBuilder
|
||||
const arb = discord.ActionRowBuilder
|
||||
@@ -17,11 +17,11 @@ const bs = discord.ButtonStyle
|
||||
|
||||
module.exports = () => {
|
||||
//REOPEN
|
||||
client.on("interactionCreate",(interaction) => {
|
||||
client.on("interactionCreate",async (interaction) => {
|
||||
if (!interaction.isButton()) return
|
||||
if (interaction.customId != "OTreopenTicket") return
|
||||
|
||||
interaction.deferUpdate()
|
||||
await interaction.deferUpdate()
|
||||
interaction.message.edit({embeds:[bot.embeds.commands.reopenEmbed(interaction.user)],components:[bot.buttons.close.openRowNormal]})
|
||||
require("../../../ticketActions/ticketReopener").reopenTicket(interaction.guild,interaction.channel,interaction.user)
|
||||
})
|
||||
|
||||
@@ -8,7 +8,7 @@ const log = bot.errorLog.log
|
||||
const storage = bot.storage
|
||||
const hiddendata = bot.hiddenData
|
||||
const embed = discord.EmbedBuilder
|
||||
const mc = config.main_color
|
||||
const mc = config.color
|
||||
|
||||
const button = discord.ButtonBuilder
|
||||
const arb = discord.ActionRowBuilder
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
module.exports = () => {
|
||||
require("./firstmsg")()
|
||||
require("./sendTranscript")()
|
||||
require("./verifyBars")()
|
||||
|
||||
//accepted
|
||||
@@ -8,4 +7,5 @@ module.exports = () => {
|
||||
require("./accepted/reopening")()
|
||||
require("./accepted/deleting")()
|
||||
require("./accepted/closingReason")()
|
||||
require("./accepted/claiming")()
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
const discord = require('discord.js')
|
||||
const bot = require('../../../index')
|
||||
const client = bot.client
|
||||
const config = bot.config
|
||||
const l = bot.language
|
||||
const log = bot.errorLog.log
|
||||
|
||||
const storage = bot.storage
|
||||
const hiddendata = bot.hiddenData
|
||||
const embed = discord.EmbedBuilder
|
||||
const mc = config.main_color
|
||||
|
||||
const button = discord.ButtonBuilder
|
||||
const arb = discord.ActionRowBuilder
|
||||
const bs = discord.ButtonStyle
|
||||
|
||||
|
||||
module.exports = () => {
|
||||
client.on("interactionCreate",async (interaction) => {
|
||||
if (!interaction.isButton()) return
|
||||
if (interaction.customId != "OTsendTranscript") return
|
||||
|
||||
interaction.deferUpdate()
|
||||
const tsmsg = await interaction.channel.send({embeds:[bot.embeds.commands.sendTranscriptEmbed(false,interaction.channel,interaction.user)]})
|
||||
|
||||
const channelmessages = await interaction.channel.messages.fetch()
|
||||
|
||||
channelmessages.sweep((msgSweep) => {
|
||||
return msgSweep.author.id == client.user.id
|
||||
})
|
||||
|
||||
var fileattachment = await require("../../transcript").createTranscript(channelmessages,interaction.channel)
|
||||
|
||||
if (fileattachment == false){
|
||||
log("system","internal error: transcript is not created!")
|
||||
tsmsg.edit({embeds:[bot.errorLog.serverError(l.errors.somethingWentWrongTranscript)]})
|
||||
return
|
||||
}
|
||||
|
||||
try {
|
||||
tsmsg.edit({embeds:[bot.embeds.commands.sendTranscriptEmbed(true,interaction.channel,interaction.user)],files:[fileattachment]})
|
||||
}catch{}
|
||||
})
|
||||
}
|
||||
@@ -8,7 +8,7 @@ const log = bot.errorLog.log
|
||||
const storage = bot.storage
|
||||
const hiddendata = bot.hiddenData
|
||||
const embed = discord.EmbedBuilder
|
||||
const mc = config.main_color
|
||||
const mc = config.color
|
||||
|
||||
const button = discord.ButtonBuilder
|
||||
const arb = discord.ActionRowBuilder
|
||||
@@ -16,53 +16,85 @@ const bs = discord.ButtonStyle
|
||||
|
||||
module.exports = () => {
|
||||
//CLOSE
|
||||
client.on("interactionCreate",interaction => {
|
||||
client.on("interactionCreate",async interaction => {
|
||||
if (!interaction.isButton()) return
|
||||
if (interaction.customId != "OTcloseTicket") return
|
||||
|
||||
interaction.deferUpdate()
|
||||
try {
|
||||
await interaction.deferUpdate()
|
||||
} catch{}
|
||||
interaction.message.edit({components:[bot.buttons.verifybars.closeVerifyBar]})
|
||||
|
||||
})
|
||||
client.on("interactionCreate",interaction => {
|
||||
client.on("interactionCreate",async interaction => {
|
||||
if (!interaction.isButton()) return
|
||||
if (interaction.customId != "OTcloseTicketFalse") return
|
||||
|
||||
interaction.deferUpdate()
|
||||
try {
|
||||
await interaction.deferUpdate()
|
||||
} catch{}
|
||||
|
||||
if (interaction.message.pinned && interaction.message.author.id == client.user.id){
|
||||
const claimdata = storage.get("claimData",interaction.channel.id)
|
||||
if (claimdata && claimdata != "false"){
|
||||
interaction.message.edit({components:[bot.buttons.firstmsg.firstmsgRowNormalNoClaim]})
|
||||
}else{
|
||||
interaction.message.edit({components:[bot.buttons.firstmsg.firstmsgRowNormal]})
|
||||
}
|
||||
}else{
|
||||
interaction.message.edit({components:[bot.buttons.close.openRowNormal]})
|
||||
}
|
||||
})
|
||||
|
||||
//DELETE
|
||||
client.on("interactionCreate",interaction => {
|
||||
client.on("interactionCreate",async interaction => {
|
||||
if (!interaction.isButton()) return
|
||||
if (interaction.customId != "OTdeleteTicket") return
|
||||
|
||||
interaction.deferUpdate()
|
||||
try {
|
||||
await interaction.deferUpdate()
|
||||
} catch{}
|
||||
interaction.message.edit({components:[bot.buttons.verifybars.deleteVerifyBar]})
|
||||
|
||||
})
|
||||
client.on("interactionCreate",interaction => {
|
||||
client.on("interactionCreate",async interaction => {
|
||||
if (!interaction.isButton()) return
|
||||
if (interaction.customId != "OTdeleteTicketFalse") return
|
||||
|
||||
interaction.deferUpdate()
|
||||
try {
|
||||
await interaction.deferUpdate()
|
||||
} catch{}
|
||||
|
||||
if (interaction.message.pinned && interaction.message.author.id == client.user.id){
|
||||
const claimdata = storage.get("claimData",interaction.channel.id)
|
||||
if (claimdata && claimdata != "false"){
|
||||
interaction.message.edit({components:[bot.buttons.firstmsg.firstmsgRowNormalNoClaim]})
|
||||
}else{
|
||||
interaction.message.edit({components:[bot.buttons.firstmsg.firstmsgRowNormal]})
|
||||
}
|
||||
}else{
|
||||
interaction.message.edit({components:[bot.buttons.close.openRowNormal]})
|
||||
}
|
||||
})
|
||||
|
||||
//DELETE NO TRANSCRIPT
|
||||
client.on("interactionCreate",interaction => {
|
||||
client.on("interactionCreate",async interaction => {
|
||||
if (!interaction.isButton()) return
|
||||
if (interaction.customId != "OTdeleteTicket1") return
|
||||
|
||||
interaction.deferUpdate()
|
||||
try {
|
||||
await interaction.deferUpdate()
|
||||
} catch{}
|
||||
interaction.message.edit({components:[bot.buttons.verifybars.delete1VerifyBar]})
|
||||
|
||||
})
|
||||
client.on("interactionCreate",interaction => {
|
||||
client.on("interactionCreate",async interaction => {
|
||||
if (!interaction.isButton()) return
|
||||
if (interaction.customId != "OTdeleteTicketFalse1") return
|
||||
|
||||
interaction.deferUpdate()
|
||||
try {
|
||||
await interaction.deferUpdate()
|
||||
} catch{}
|
||||
interaction.message.edit({components:[bot.buttons.close.closeCommandRow]})
|
||||
})
|
||||
}
|
||||
+13
-16
@@ -1,33 +1,30 @@
|
||||
const index = require("../index")
|
||||
|
||||
if (index.developerConfig){
|
||||
var config = require("../devConfig.json")
|
||||
var config = require("../devconfig.json")
|
||||
}else{var config = require("../config.json")}
|
||||
|
||||
|
||||
var localLanguage = require("../language/english.json")
|
||||
if (config.languagefile.startsWith("custom")) localLanguage = require("../language/custom.json")
|
||||
else if (config.languagefile.startsWith("dutch")) localLanguage = require("../language/dutch.json")
|
||||
else if (config.languagefile.startsWith("english")) localLanguage = require("../language/english.json")
|
||||
else if (config.languagefile.startsWith("german")) localLanguage = require("../language/german.json")
|
||||
else if (config.languagefile.startsWith("french")) localLanguage = require("../language/french.json")
|
||||
else if (config.languagefile.startsWith("romanian")) localLanguage = require("../language/romanian.json")
|
||||
else if (config.languagefile.startsWith("arabic")) localLanguage = require("../language/arabic.json")
|
||||
else if (config.languagefile.startsWith("spanish")) localLanguage = require("../language/spanish.json")
|
||||
else if (config.languagefile.startsWith("portuguese")) localLanguage = require("../language/portuguese.json")
|
||||
else if (config.languagefile.startsWith("italian")) localLanguage = require("../language/italian.json")
|
||||
|
||||
const fs = require("fs")
|
||||
const lfexists = fs.existsSync("./language/"+config.languageFile+".json")
|
||||
if (lfexists) localLanguage = require("../language/"+config.languageFile+".json")
|
||||
|
||||
const errorLog = async () => {
|
||||
const chalk = await (await import("chalk")).default
|
||||
|
||||
console.log(chalk.red("Something went wrong when loading the language!")+"\nCheck the config file or create a ticket in our server!")
|
||||
require("./startscreen").headerDataLanguage("Something went wrong when loading the language!",true)
|
||||
}
|
||||
|
||||
const successLog = async (language) => {
|
||||
const chalk = await (await import("chalk")).default
|
||||
|
||||
console.log(chalk.green("loaded language "+language+"..."))
|
||||
require("./startscreen").headerDataLanguage("sucessfully loaded language "+language,false)
|
||||
index.actionRecorder.push({
|
||||
category:"ot.managers.language",
|
||||
file:"./core/languageManager.js",
|
||||
time:new Date().getTime(),
|
||||
type:"language.success"
|
||||
})
|
||||
}
|
||||
|
||||
if (!localLanguage){
|
||||
@@ -38,5 +35,5 @@ if (!localLanguage){
|
||||
runError()
|
||||
}else{
|
||||
exports.language = localLanguage
|
||||
successLog(config.languagefile)
|
||||
successLog(config.languageFile)
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
|
||||
██████╗ ██████╗ ███████╗███╗ ██╗ ████████╗██╗ ██████╗██╗ ██╗███████╗████████╗
|
||||
██╔═══██╗██╔══██╗██╔════╝████╗ ██║ ╚══██╔══╝██║██╔════╝██║ ██╔╝██╔════╝╚══██╔══╝
|
||||
██║ ██║██████╔╝█████╗ ██╔██╗ ██║ ██║ ██║██║ █████╔╝ █████╗ ██║
|
||||
██║ ██║██╔═══╝ ██╔══╝ ██║╚██╗██║ ██║ ██║██║ ██╔═██╗ ██╔══╝ ██║
|
||||
╚██████╔╝██║ ███████╗██║ ╚████║ ██║ ██║╚██████╗██║ ██╗███████╗ ██║
|
||||
╚═════╝ ╚═╝ ╚══════╝╚═╝ ╚═══╝ ╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚══════╝ ╚═╝
|
||||
+43
-14
@@ -11,17 +11,29 @@ const APIEvents = require("./api/modules/events")
|
||||
module.exports = async () => {
|
||||
const chalk = await (await import("chalk")).default
|
||||
|
||||
client.on("interactionCreate",(interaction) => {
|
||||
if (!interaction.isButton()) return
|
||||
if (!interaction.customId.startsWith("newR")) return
|
||||
client.on("interactionCreate",async (interaction) => {
|
||||
if (!interaction.isButton() && !interaction.isStringSelectMenu()) return
|
||||
if (interaction.isButton() && !interaction.customId.startsWith("newR")) return
|
||||
if (interaction.isStringSelectMenu() && !(interaction.customId == "OTdropdownMenu")) return
|
||||
|
||||
interaction.deferUpdate()
|
||||
bot.actionRecorder.push({
|
||||
category:"ot.managers.reactionroles",
|
||||
file:"./core/reactionRoles.js",
|
||||
time:new Date().getTime(),
|
||||
type:"reactionRoles.interactionCreated"
|
||||
})
|
||||
|
||||
if (interaction.customId.startsWith("newR")){
|
||||
const optionid = interaction.customId.split("newR")[1]
|
||||
|
||||
const optionidRaw = interaction.isStringSelectMenu() ? interaction.values[0] : interaction.customId
|
||||
if (!optionidRaw.includes("newR")) return
|
||||
const optionid = optionidRaw.split("newR")[1]
|
||||
if (!optionid){
|
||||
interaction.reply({embeds:[bot.errorLog.serverError(l.errors.roleDoesntExist)]})
|
||||
return
|
||||
}else{
|
||||
try {
|
||||
await interaction.deferUpdate()
|
||||
} catch{}
|
||||
}
|
||||
|
||||
try {
|
||||
@@ -32,35 +44,53 @@ module.exports = async () => {
|
||||
const user = interaction.member
|
||||
|
||||
if (mode == "add"){
|
||||
bot.actionRecorder.push({
|
||||
category:"ot.managers.reactionroles",
|
||||
file:"./core/reactionRoles.js",
|
||||
time:new Date().getTime(),
|
||||
type:"reactionRoles.type.add"
|
||||
})
|
||||
option.roles.forEach((role) => {
|
||||
interaction.guild.members.cache.find(u => u.id == user.id).roles.add(role)
|
||||
|
||||
log("system","added role (reaction roles)",[{key:"user",value:interaction.user.tag},{key:"role",value:role}])
|
||||
log("system","added role (reaction roles)",[{key:"user",value:interaction.user.username},{key:"role",value:role}])
|
||||
const apirole = interaction.guild.roles.cache.find(r => r.id == role)
|
||||
APIEvents.onReactionRole("add","add",apirole,interaction.user,interaction.channel,interaction.guild,new Date())
|
||||
})
|
||||
|
||||
}else if (mode == "remove"){
|
||||
bot.actionRecorder.push({
|
||||
category:"ot.managers.reactionroles",
|
||||
file:"./core/reactionRoles.js",
|
||||
time:new Date().getTime(),
|
||||
type:"reactionRoles.type.remove"
|
||||
})
|
||||
option.roles.forEach((role) => {
|
||||
interaction.guild.members.cache.find(u => u.id == user.id).roles.remove(role)
|
||||
|
||||
log("system","removed role (reaction roles)",[{key:"user",value:interaction.user.tag},{key:"role",value:role}])
|
||||
log("system","removed role (reaction roles)",[{key:"user",value:interaction.user.username},{key:"role",value:role}])
|
||||
const apirole = interaction.guild.roles.cache.find(r => r.id == role)
|
||||
APIEvents.onReactionRole("remove","remove",apirole,interaction.user,interaction.channel,interaction.guild,new Date())
|
||||
})
|
||||
|
||||
}else if (mode == "add&remove"){
|
||||
bot.actionRecorder.push({
|
||||
category:"ot.managers.reactionroles",
|
||||
file:"./core/reactionRoles.js",
|
||||
time:new Date().getTime(),
|
||||
type:"reactionRoles.type.add&remove"
|
||||
})
|
||||
option.roles.forEach((role) => {
|
||||
if (interaction.guild.members.cache.find(u => u.id == user.id).roles.cache.has(role)){
|
||||
interaction.guild.members.cache.find(u => u.id == user.id).roles.remove(role)
|
||||
if (!interaction.guild.members.cache.find(u => u.id == user.id).roles.cache.has(role)){
|
||||
interaction.guild.members.cache.find(u => u.id == user.id).roles.add(role)
|
||||
|
||||
log("system","added role (reaction roles)",[{key:"user",value:interaction.user.tag},{key:"role",value:role}])
|
||||
log("system","added role (reaction roles)",[{key:"user",value:interaction.user.username},{key:"role",value:role}])
|
||||
const apirole = interaction.guild.roles.cache.find(r => r.id == role)
|
||||
APIEvents.onReactionRole("add","add&remove",apirole,interaction.user,interaction.channel,interaction.guild,new Date())
|
||||
}else {
|
||||
interaction.guild.members.cache.find(u => u.id == user.id).roles.add(role)
|
||||
interaction.guild.members.cache.find(u => u.id == user.id).roles.remove(role)
|
||||
|
||||
log("system","removed role (reaction roles)",[{key:"user",value:interaction.user.tag},{key:"role",value:role}])
|
||||
log("system","removed role (reaction roles)",[{key:"user",value:interaction.user.username},{key:"role",value:role}])
|
||||
const apirole = interaction.guild.roles.cache.find(r => r.id == role)
|
||||
APIEvents.onReactionRole("remove","add&remove",apirole,interaction.user,interaction.channel,interaction.guild,new Date())
|
||||
}
|
||||
@@ -70,6 +100,5 @@ module.exports = async () => {
|
||||
}catch{
|
||||
interaction.channel.send({embeds:[bot.errorLog.serverError(l.errors.somethingWentWrong)]})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
const discord = require("discord.js")
|
||||
const bot = require("../../index")
|
||||
const client = require("../../index").client
|
||||
const config = bot.config
|
||||
const configParser = require("../utils/configParser")
|
||||
|
||||
const act = discord.ApplicationCommandType
|
||||
const acot = discord.ApplicationCommandOptionType
|
||||
|
||||
module.exports = async () => {
|
||||
const sid = config.serverId
|
||||
|
||||
const ids = configParser.getTicketValuesArray("id")
|
||||
/**@type {[{name:String,value:String}]} */
|
||||
var choices = []
|
||||
ids.forEach((id) => {
|
||||
const option = configParser.getTicketById(id)
|
||||
if (option){
|
||||
choices.push({name:option.name,value:option.id})
|
||||
}
|
||||
})
|
||||
|
||||
/**@type {[{name:String,value:String}]} */
|
||||
var msgchoices = []
|
||||
config.messages.forEach((msg) => {
|
||||
msgchoices.push({name:msg.id,value:msg.id})
|
||||
})
|
||||
|
||||
//slashtranslation
|
||||
const ST = require("../../language/slashcmds/slash.json").data
|
||||
|
||||
//create a ticket (/new or /ticket)
|
||||
client.application.commands.create({
|
||||
name:"ticket",
|
||||
description:"Create a ticket!",
|
||||
descriptionLocalizations:ST.newticket,
|
||||
defaultPermission:true,
|
||||
type:act.ChatInput,
|
||||
options:[
|
||||
{
|
||||
type:acot.String,
|
||||
name:"type",
|
||||
description:"The type of ticket.",
|
||||
required:true,
|
||||
choices:choices
|
||||
}
|
||||
]
|
||||
},sid)
|
||||
|
||||
client.application.commands.create({
|
||||
name:"new",
|
||||
description:"Create a ticket!",
|
||||
defaultPermission:true,
|
||||
type:act.ChatInput,
|
||||
descriptionLocalizations:ST.newticket,
|
||||
options:[
|
||||
{
|
||||
type:acot.String,
|
||||
name:"type",
|
||||
description:"The type of ticket.",
|
||||
required:true,
|
||||
choices:choices
|
||||
|
||||
}
|
||||
]
|
||||
},sid)
|
||||
|
||||
//msg
|
||||
client.application.commands.create({
|
||||
name:"message",
|
||||
description:"Create a ticket message.",
|
||||
defaultPermission:true,
|
||||
descriptionLocalizations:ST.message,
|
||||
type:act.ChatInput,
|
||||
options:[
|
||||
{
|
||||
type:acot.String,
|
||||
name:"id",
|
||||
description:"The message id.",
|
||||
required:true,
|
||||
choices:msgchoices,
|
||||
max_length:30
|
||||
|
||||
}
|
||||
]
|
||||
},sid)
|
||||
}
|
||||
@@ -7,9 +7,10 @@ const configParser = require("../utils/configParser")
|
||||
const act = discord.ApplicationCommandType
|
||||
const acot = discord.ApplicationCommandOptionType
|
||||
|
||||
module.exports = async () => {
|
||||
/**@param {Boolean|undefined} invisible*/
|
||||
module.exports = async (invisible) => {
|
||||
const chalk = (await import("chalk")).default
|
||||
const sid = config.server_id
|
||||
const sid = config.serverId
|
||||
|
||||
const ids = configParser.getTicketValuesArray("id")
|
||||
/**@type {[{name:String,value:String}]} */
|
||||
@@ -30,15 +31,20 @@ module.exports = async () => {
|
||||
var readystats = 0
|
||||
|
||||
//process.stdout.write("[status] there are "+chalk.blue("0 out of 10")+" commands ready! (this can take up to 40 seconds)")
|
||||
if (!invisible){
|
||||
setInterval(() => {
|
||||
process.stdout.cursorTo(0)
|
||||
process.stdout.write("[status] there are "+chalk.blue(readystats+" out of 12")+" commands ready! (this can take up to 40 seconds)")
|
||||
if (readystats >= 12){
|
||||
if (process.stdout && process.stdout.cursorTo) process.stdout.cursorTo(0)
|
||||
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)
|
||||
}
|
||||
},100)
|
||||
}
|
||||
|
||||
const fs = require("fs")
|
||||
fs.writeFileSync("./storage/slashcmdEnabled.txt",require("../../package.json").version)
|
||||
|
||||
//slashtranslation
|
||||
const ST = require("../../language/slashcmds/slash.json").data
|
||||
@@ -243,4 +249,57 @@ module.exports = async () => {
|
||||
readystats++
|
||||
})
|
||||
|
||||
//category
|
||||
client.application.commands.create({
|
||||
name:"change",
|
||||
description:"Change ticket type.",
|
||||
defaultPermission:true,
|
||||
type:act.ChatInput,
|
||||
options:[
|
||||
{
|
||||
type:acot.String,
|
||||
name:"type",
|
||||
description:"The new ticket type.",
|
||||
required:true,
|
||||
choices:choices
|
||||
}
|
||||
]
|
||||
},sid).then(() => {
|
||||
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++
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
const discord = require('discord.js')
|
||||
const bot = require('../index')
|
||||
const client = bot.client
|
||||
const config = bot.config
|
||||
const l = bot.language
|
||||
const log = bot.errorLog.log
|
||||
|
||||
const logo = require("fs").readFileSync("./core/logo.txt").toString()
|
||||
|
||||
/**@param {import('chalk').ChalkInstance} chalk */
|
||||
const showFlags = async (chalk) => {
|
||||
var isFlag = false
|
||||
if (process.argv.some((v) => v == "--devconfig")) console.log(chalk.blue("[FLAGS] => used dev config instead of normal config")); isFlag = true
|
||||
if (process.argv.some((v) => v == "--nochecker")) console.log(chalk.blue("[FLAGS] => disabled checker.js")); isFlag = true
|
||||
if (process.argv.some((v) => v == "--tsoffline")) console.log(chalk.blue("[FLAGS] => offline check for html transcripts disabled!")); isFlag = true
|
||||
if (process.argv.some((v) => v == "--debug")) console.log(chalk.blue("[FLAGS] => enabled DEBUG mode")); isFlag = true
|
||||
if (process.argv.some((v) => v == "--noslash")) console.log(chalk.blue("[FLAGS] => slash commands disabled")); isFlag = true
|
||||
if (process.argv.some((v) => v == "--localstatus")) console.log(chalk.blue("[FLAGS] => using local livestatus.json")); isFlag = true
|
||||
if (process.argv.some((v) => v == "--noerrorupload")) console.log(chalk.blue("[FLAGS] => not uploading errors to liveStatus")); isFlag = true
|
||||
|
||||
if (!isFlag) console.log(chalk.blue("no flags!"))
|
||||
}
|
||||
|
||||
exports.run = async () => {
|
||||
const chalk = await (await import("chalk")).default
|
||||
console.log(chalk.hex("f8ba00")(logo))
|
||||
const version = require("../package.json").version
|
||||
var headertext = "v"+version+" - Support: https://discord.dj-dj.be - Language: "+config.languageFile
|
||||
const spaceamount = (84-headertext.length)/2
|
||||
var i = 0
|
||||
while (i < spaceamount){
|
||||
headertext = " "+headertext
|
||||
i++
|
||||
}
|
||||
console.log(chalk.bold(headertext+"\n"))
|
||||
console.log(chalk.bold(chalk.underline("FLAGS:")))
|
||||
showFlags(chalk)
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {import('chalk').ChalkInstance} chalk
|
||||
* @param {{type:String,text:String,enabled:Boolean}} status
|
||||
* @param {Boolean} updatingslash
|
||||
* @param {Boolean} slashmode
|
||||
*
|
||||
*/
|
||||
exports.headerDataReady = (chalk,status,updatingslash,slashmode) => {
|
||||
console.log("\n"+chalk.bold(chalk.underline("STARTUP INFO:")))
|
||||
if (status.enabled) console.log(chalk.hex("f8ba00")("status: ")+chalk.bold(status.type.toLowerCase())+" "+status.text)
|
||||
if (slashmode){
|
||||
console.log("\n\n"+chalk.red(chalk.underline("STARTING IN SLASH CMD CONFIGURATION MODE!")))
|
||||
return
|
||||
}
|
||||
console.log(chalk.hex("f8ba00")("updating slash cmds: ")+chalk.bold(updatingslash))
|
||||
}
|
||||
|
||||
var languageMSG = ""
|
||||
var languageErr = false
|
||||
/**
|
||||
* @param {String} message
|
||||
* @param {Boolean} err
|
||||
*/
|
||||
exports.headerDataLanguage = async (message,err) => {
|
||||
languageMSG = message
|
||||
languageErr = err
|
||||
}
|
||||
|
||||
/**@param {{total:Number,error:Number,success:Number}} plugins*/
|
||||
exports.headerDataPlugins = async (plugins) => {
|
||||
const chalk = await (await import("chalk")).default
|
||||
const lmsg = languageErr ? chalk.red(languageMSG) : languageMSG
|
||||
console.log(chalk.hex("f8ba00")("language: ")+lmsg)
|
||||
console.log(chalk.hex("f8ba00")("plugins loaded: ")+chalk.bold(plugins.total+" total ")+"("+plugins.success+"✅ "+plugins.error+"❌)")
|
||||
|
||||
console.log("\n"+chalk.bold(chalk.underline("LIVESTATUS:")))
|
||||
await require("./utils/liveStatus").run(plugins)
|
||||
|
||||
console.log("\n"+chalk.bold(chalk.underline("LOGS:")))
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
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 storage = bot.storage
|
||||
|
||||
module.exports = () => {
|
||||
setInterval(async () => {
|
||||
try{
|
||||
const tickets = storage.getCategory("autocloseTickets")
|
||||
if (!tickets) return
|
||||
tickets.forEach(async (t) => {
|
||||
if (t.value == "false" || t.value == 0 || typeof t.value != "number") return
|
||||
try{
|
||||
|
||||
const channel = await client.channels.fetch(t.key,{cache:true})
|
||||
if (!channel || !channel.isTextBased()) return
|
||||
|
||||
const message = (await channel.messages.fetch({limit:10})).first()
|
||||
if (!message) return
|
||||
|
||||
const secondsSLM = Math.round((new Date().getTime() - message.createdTimestamp)/1000)
|
||||
const hoursSLM = secondsSLM/3600
|
||||
|
||||
if (hoursSLM > t.value){
|
||||
/**@type {discord.Guild|false} */
|
||||
const guild = client.guilds.cache.find((g) => g.id == channel.guild.id)
|
||||
if (!guild) return
|
||||
const clientMember = guild.members.cache.find((m) => m.id == client.user.id)
|
||||
if (!clientMember) return
|
||||
|
||||
var name = channel.name
|
||||
var prefix = ""
|
||||
const tickets = config.options
|
||||
tickets.forEach((ticket) => {
|
||||
if (name.startsWith(ticket.channelprefix)){
|
||||
prefix = ticket.channelprefix
|
||||
}
|
||||
})
|
||||
|
||||
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]})
|
||||
}
|
||||
|
||||
}catch{
|
||||
log("system","can't find autoclose channel with ID: "+t.key)
|
||||
storage.delete("autocloseTickets",t.key)
|
||||
}
|
||||
})
|
||||
}catch{}
|
||||
},120000)
|
||||
}
|
||||
@@ -18,11 +18,10 @@ const pendingDelete = []
|
||||
* @param {Boolean} nomessage
|
||||
* @param {String} reason only when closing, not when deleting!
|
||||
*/
|
||||
exports.NEWcloseTicket = async (member,channel,prefix,mode,reason,nomessage) => {
|
||||
exports.closeManager = async (member,channel,prefix,mode,reason,nomessage) => {
|
||||
const guild = channel.guild
|
||||
const user = member.user
|
||||
const chalk = await (await import("chalk")).default
|
||||
const channelmessages = await channel.messages.fetch()
|
||||
|
||||
const newReason = reason ? reason : l.messages.none
|
||||
|
||||
@@ -31,15 +30,12 @@ exports.NEWcloseTicket = async (member,channel,prefix,mode,reason,nomessage) =>
|
||||
//FIX CHANNEL COULD BE CLOSED AFTER DELETE:
|
||||
if (pendingDelete.includes(channel.id)) return false
|
||||
|
||||
//remove ot bot from transcript
|
||||
channelmessages.sweep((msgSweep) => {return msgSweep.author.id == client.user.id})
|
||||
|
||||
/**@type {String}*/
|
||||
const channelname = channel.name
|
||||
const ticketOpenerChannelName = channelname.split(prefix)[1]
|
||||
|
||||
//get user that opened the ticket
|
||||
var getuserID = storage.get("userTicketStorage",channel.id)
|
||||
var getuserID = storage.get("userFromChannel",channel.id)
|
||||
try {
|
||||
var ticketOpener = client.users.cache.find(u => u.id === getuserID)
|
||||
var isDatabaseError = false
|
||||
@@ -53,11 +49,16 @@ exports.NEWcloseTicket = async (member,channel,prefix,mode,reason,nomessage) =>
|
||||
var enableTranscript = true
|
||||
var deleteRequired = false
|
||||
|
||||
if (mode == "delete"){
|
||||
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
|
||||
}
|
||||
@@ -67,45 +68,44 @@ exports.NEWcloseTicket = async (member,channel,prefix,mode,reason,nomessage) =>
|
||||
if (!nomessage){
|
||||
await channel.send({content:"**"+l.messages.gettingdeleted+"**"})
|
||||
}
|
||||
log("system","deleted a ticket",[{key:"user",value:user.tag},{key:"ticket",value:channel.name}])
|
||||
log("system","deleted a ticket",[{key:"user",value:user.username},{key:"ticket",value:channel.name}])
|
||||
pendingDelete.push(channel.id)
|
||||
|
||||
if (!isDatabaseError) storage.set("ticketStorage",getuserID,Number(storage.get("ticketStorage",getuserID)) - 1)
|
||||
|
||||
//getID & send DM & send api event
|
||||
await channel.messages.fetchPinned().then(async msglist => {
|
||||
var firstmsg = msglist.last()
|
||||
if (firstmsg == undefined || firstmsg.author.id != client.user.id) return false
|
||||
const hiddendata = bot.hiddenData.readHiddenData(firstmsg.embeds[0].description)
|
||||
const ticketId = hiddendata.data.find(d => d.key == "type").value.value
|
||||
const ticketData = require("../utils/configParser").getTicketById(ticketId,true)
|
||||
if (!isDatabaseError) storage.set("amountOfUserTickets",getuserID,Number(storage.get("amountOfUserTickets",getuserID)) - 1)
|
||||
storage.delete("userFromChannel",channel.id)
|
||||
storage.delete("claimData",channel.id)
|
||||
storage.delete("autocloseTickets",channel.id)
|
||||
if (Number(storage.get("amountOfUserTickets",getuserID)) < 0) storage.set("amountOfUserTickets",getuserID,0)
|
||||
|
||||
require("../api/modules/events").onTicketDelete(user,channel,guild,new Date(),{name:channel.name,status:"deleted",ticketOptions:ticketData})
|
||||
|
||||
const id = hiddendata.data.find(d => d.key == "openerid").value
|
||||
|
||||
const sphd = bot.hiddenData.removeHiddenData(firstmsg.embeds[0].description)
|
||||
sphd.hiddenData.data.push({key:"pendingdelete",value:"true"})
|
||||
const newEmbed = new discord.EmbedBuilder(firstmsg.embeds[0].data)
|
||||
newEmbed.setDescription(sphd.description + bot.hiddenData.writeHiddenData(sphd.hiddenData.type,sphd.hiddenData.data))
|
||||
await firstmsg.edit({embeds:[newEmbed]})
|
||||
|
||||
if (!id) return false
|
||||
|
||||
try{
|
||||
if (config.system.enable_DM_Messages){
|
||||
member.send({embeds:[bot.errorLog.custom(l.messages.deletedTicketDmTitle,l.messages.deletedTicketDmDescription,":ticket:",config.main_color)]})
|
||||
}
|
||||
}
|
||||
catch{log("system","can't send DM to member, member doesn't allow dm's")}
|
||||
//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,7 +129,7 @@ exports.NEWcloseTicket = async (member,channel,prefix,mode,reason,nomessage) =>
|
||||
})
|
||||
|
||||
//add main adminroles
|
||||
config.main_adminroles.forEach((role,index) => {
|
||||
config.adminRoles.forEach((role,index) => {
|
||||
try {
|
||||
const adminrole = guild.roles.cache.find(r => r.id == role)
|
||||
if (!adminrole) return
|
||||
@@ -137,23 +137,15 @@ exports.NEWcloseTicket = async (member,channel,prefix,mode,reason,nomessage) =>
|
||||
permissionArray.push({
|
||||
id:adminrole,
|
||||
type:"role",
|
||||
allow:[pfb.AddReactions,pfb.AttachFiles,pfb.EmbedLinks,pfb.SendMessages,pfb.ViewChannel]
|
||||
allow:[pfb.AddReactions,pfb.AttachFiles,pfb.EmbedLinks,pfb.SendMessages,pfb.ViewChannel],
|
||||
deny:[]
|
||||
})
|
||||
}catch{
|
||||
log("system","invalid role! At 'config.json => main_adminroles:"+index)
|
||||
}
|
||||
})
|
||||
|
||||
//add ticket adminroles
|
||||
await channel.messages.fetchPinned().then(msglist => {
|
||||
var firstmsg = msglist.last()
|
||||
if (firstmsg == undefined || firstmsg.author.id != client.user.id) return false
|
||||
const hiddendata = bot.hiddenData.readHiddenData(firstmsg.embeds[0].description)
|
||||
const ticketId = hiddendata.data.find(d => d.key == "type").value
|
||||
const ticketData = require("../utils/configParser").getTicketById(ticketId,true)
|
||||
|
||||
if (!ticketData) return
|
||||
|
||||
if (ticketData.closedCategory.enable){
|
||||
/**@type {discord.CategoryChannel} */
|
||||
const category = guild.channels.cache.find(c => c.id == ticketData.closedCategory.id && c.type == discord.ChannelType.GuildCategory)
|
||||
@@ -164,12 +156,8 @@ exports.NEWcloseTicket = async (member,channel,prefix,mode,reason,nomessage) =>
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @type {String[]}
|
||||
*/
|
||||
const ticketadmin = ticketData.adminroles
|
||||
ticketadmin.forEach((role,index) => {
|
||||
if (!config.main_adminroles.includes(role)){
|
||||
ticketData.adminroles.forEach((role,index) => {
|
||||
if (!config.adminRoles.includes(role)){
|
||||
try {
|
||||
const adminrole = guild.roles.cache.find(r => r.id == role)
|
||||
if (!adminrole) return
|
||||
@@ -177,169 +165,89 @@ exports.NEWcloseTicket = async (member,channel,prefix,mode,reason,nomessage) =>
|
||||
permissionArray.push({
|
||||
id:adminrole,
|
||||
type:"role",
|
||||
allow:[pfb.AddReactions,pfb.ViewChannel],
|
||||
deny:[pfb.AttachFiles,pfb.EmbedLinks,pfb.SendMessages]
|
||||
allow:[pfb.AddReactions,pfb.ViewChannel,pfb.AttachFiles,pfb.EmbedLinks,pfb.SendMessages],
|
||||
deny:[]
|
||||
})
|
||||
}catch{
|
||||
log("system","invalid role! At 'config.json => options/ticket/...:"+index)
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
channel.permissionOverwrites.set(permissionArray)
|
||||
|
||||
if (!nomessage){
|
||||
//message
|
||||
var closeButtonRow = new discord.ActionRowBuilder()
|
||||
.addComponents(
|
||||
new discord.ButtonBuilder()
|
||||
.setCustomId("OTdeleteTicket1")
|
||||
.setDisabled(false)
|
||||
.setStyle(discord.ButtonStyle.Danger)
|
||||
.setLabel(l.buttons.delete)
|
||||
.setEmoji("✖️")
|
||||
)
|
||||
.addComponents(
|
||||
new discord.ButtonBuilder()
|
||||
.setCustomId("OTsendTranscript")
|
||||
.setDisabled(false)
|
||||
.setStyle(discord.ButtonStyle.Secondary)
|
||||
.setLabel(l.buttons.sendTranscript)
|
||||
.setEmoji("📄")
|
||||
)
|
||||
.addComponents(
|
||||
new discord.ButtonBuilder()
|
||||
.setCustomId("OTreopenTicket")
|
||||
.setDisabled(false)
|
||||
.setStyle(discord.ButtonStyle.Success)
|
||||
.setLabel(l.buttons.reopen)
|
||||
.setEmoji("✔")
|
||||
)
|
||||
|
||||
const embed = new discord.EmbedBuilder()
|
||||
.setColor(config.main_color)
|
||||
.setTitle(":lock: "+l.messages.closedTitle+" :lock:")
|
||||
.setColor(config.color)
|
||||
.setTitle(":lock: "+l.commands.closeTitle+" :lock:")
|
||||
.setDescription(l.messages.closedDescription)
|
||||
channel.send({embeds:[embed],components:[closeButtonRow]})
|
||||
channel.send({embeds:[embed],components:[bot.buttons.close.closeCommandRow]})
|
||||
}
|
||||
|
||||
log("system","closed a ticket",[{key:"user",value:user.tag},{key:"ticket",value:channel.name}])
|
||||
log("system","closed a ticket",[{key:"user",value:user.username},{key:"ticket",value:channel.name}])
|
||||
|
||||
|
||||
//getID & send DM & send api event
|
||||
await channel.messages.fetchPinned().then(msglist => {
|
||||
var firstmsg = msglist.last()
|
||||
if (firstmsg == undefined || firstmsg.author.id != client.user.id) return false
|
||||
const hiddendata = bot.hiddenData.readHiddenData(firstmsg.embeds[0].description)
|
||||
const ticketId = hiddendata.data.find(d => d.key == "type").value
|
||||
const ticketData = require("../utils/configParser").getTicketById(ticketId,true)
|
||||
|
||||
//send api event
|
||||
require("../api/modules/events").onTicketClose(user,channel,guild,new Date(),{name:channel.name,status:"closed",ticketOptions:ticketData},newReason)
|
||||
|
||||
const id = hiddendata.data.find(d => d.key == "openerid").value
|
||||
|
||||
if (!id) return false
|
||||
|
||||
try{
|
||||
if (config.system.enable_DM_Messages){
|
||||
member.send({embeds:[bot.errorLog.custom(l.messages.closedTicketDmTitle,l.messages.closedTicketDmDescription+"\n\n**reason:** "+newReason,":ticket:",config.main_color)]})
|
||||
}
|
||||
}
|
||||
catch{log("system","can't send DM to member, member doesn't allow dm's")}
|
||||
//STATS
|
||||
bot.statsManager.updateGlobalStats("TICKETS_CLOSED",(current) => {
|
||||
if (typeof current != "undefined") return current+1
|
||||
return 1
|
||||
})
|
||||
|
||||
|
||||
}else if (mode == "deletenotranscript"){
|
||||
//delete with no transcript
|
||||
//check perms
|
||||
if (!guild) return
|
||||
if (!permsChecker.command(user.id,guild.id)){
|
||||
permsChecker.sendUserNoPerms(user)
|
||||
return
|
||||
}
|
||||
|
||||
//start delete proccess
|
||||
enableTranscript = false
|
||||
deleteRequired = true
|
||||
if (!nomessage){
|
||||
await channel.send({content:"**"+l.messages.gettingdeleted+"**"})
|
||||
}
|
||||
log("system","deleted a ticket",[{key:"user",value:user.tag},{key:"ticket",value:channel.name}])
|
||||
|
||||
if (!isDatabaseError) storage.set("ticketStorage",getuserID,Number(storage.get("ticketStorage",getuserID)) - 1)
|
||||
|
||||
//getID & send DM & send api event
|
||||
await channel.messages.fetchPinned().then(msglist => {
|
||||
var firstmsg = msglist.last()
|
||||
if (firstmsg == undefined || firstmsg.author.id != client.user.id) return false
|
||||
const hiddendata = bot.hiddenData.readHiddenData(firstmsg.embeds[0].description)
|
||||
const ticketId = hiddendata.data.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})
|
||||
|
||||
const id = hiddendata.data.find(d => d.key == "openerid").value
|
||||
|
||||
if (!id) return false
|
||||
|
||||
try{
|
||||
if (config.system.enable_DM_Messages){
|
||||
member.send({embeds:[bot.errorLog.custom(l.messages.deletedTicketDmTitle,l.messages.deletedTicketDmDescription,":ticket:",config.main_color)]})
|
||||
}
|
||||
}
|
||||
catch{log("system","can't send DM to member, member doesn't allow dm's")}
|
||||
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 {Promise<discord.Message[]>}
|
||||
*/
|
||||
const getmessages = async (channel,limit) => {
|
||||
const final = []
|
||||
var lastId = ""
|
||||
|
||||
if (enableTranscript == true && mode != "deletenotranscript"){
|
||||
while (true) {
|
||||
const options = {limit:100}
|
||||
if (lastId) options.before = lastId
|
||||
|
||||
const transcriptReason = (mode == "close") ? "**"+l.messages.reason+":** "+newReason : "**"+l.messages.reason+":** "+l.messages.none
|
||||
const closedByPrefix = (mode.startsWith("delete")) ? l.messages.deletedby : l.messages.closedby
|
||||
const messages = await channel.messages.fetch(options)
|
||||
messages.forEach(msg => {final.push(msg)})
|
||||
lastId = messages.last().id
|
||||
|
||||
if (config.system.enable_transcript || config.system.enable_DM_transcript){
|
||||
var fileattachment = await require("../transcript").createTranscript(channelmessages,channel)
|
||||
|
||||
if (fileattachment == false){log("system","internal error: transcript is not created!");return}
|
||||
}
|
||||
|
||||
if (config.system.enable_transcript && !require("../api/api.json").disable.transcripts.server){
|
||||
const transcriptEmbed = new discord.EmbedBuilder()
|
||||
.setColor(config.main_color)
|
||||
.setTitle("📄 "+l.messages.newTranscriptTitle)
|
||||
.setDescription(transcriptReason)
|
||||
.setFooter({text:closedByPrefix+": "+user.tag+" | ticket: "+channelname,iconURL:user.displayAvatarURL()})
|
||||
|
||||
guild.channels.cache.find(c => c.id == config.system.transcript_channel).send({
|
||||
embeds:[transcriptEmbed],
|
||||
files:[fileattachment]
|
||||
})
|
||||
}
|
||||
|
||||
if (config.system.enable_DM_transcript && !require("../api/api.json").disable.transcripts.dm){
|
||||
const transcriptEmbed = new discord.EmbedBuilder()
|
||||
.setColor(config.main_color)
|
||||
.setTitle("📄 "+l.messages.newTranscriptTitle)
|
||||
.setDescription(transcriptReason)
|
||||
.setFooter({text:closedByPrefix+": "+user.tag+" | ticket: "+channelname,iconURL:user.displayAvatarURL()})
|
||||
|
||||
if (!isDatabaseError) ticketOpener.send({
|
||||
embeds:[transcriptEmbed],
|
||||
files:[fileattachment]
|
||||
})
|
||||
if (messages.size != 100 || final >= limit) {
|
||||
break
|
||||
}
|
||||
}
|
||||
return final
|
||||
}
|
||||
|
||||
|
||||
const transcriptHandler = async () => {
|
||||
if (!bot.tsconfig.sendTranscripts.enableChannel && !bot.tsconfig.sendTranscripts.enableDM) return false
|
||||
|
||||
const APIEvents = require("../api/modules/events")
|
||||
const messages = await getmessages(channel,5000)
|
||||
await require("../transcriptSystem/manager")(messages,guild,channel,user,reason)
|
||||
APIEvents.onTranscriptCreation(messages,channel,guild,new Date())
|
||||
}
|
||||
const deleteHandler = async () => {
|
||||
if (deleteRequired){
|
||||
//const timer = () => {return new Promise((resolve,reject) => {
|
||||
// setTimeout(() => {resolve(true)},7000)
|
||||
//})}
|
||||
//await timer()
|
||||
|
||||
setTimeout(async () => {
|
||||
pendingDelete.shift()
|
||||
//delete HIDDENDATA
|
||||
storage.delete("HIDDENDATA",channel.id)
|
||||
|
||||
await channel.delete()
|
||||
},6000)
|
||||
}
|
||||
}
|
||||
if (mode == "delete" || mode == "deletenotranscript") await transcriptHandler()
|
||||
deleteHandler()
|
||||
}
|
||||
@@ -10,11 +10,12 @@ const storage = bot.storage
|
||||
|
||||
module.exports = () => {
|
||||
//dropdown placeholder
|
||||
client.on("interactionCreate",(interaction) => {
|
||||
if (!interaction.isSelectMenu()) return
|
||||
client.on("interactionCreate",async (interaction) => {
|
||||
if (!interaction.isStringSelectMenu()) return
|
||||
if (interaction.customId != "OTdropdownMenu") return
|
||||
if (interaction.values.includes("OTChooseTicket")) interaction.deferUpdate()
|
||||
|
||||
if (interaction.values.includes("OTChooseTicket")){
|
||||
await interaction.deferUpdate()
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -26,7 +27,7 @@ module.exports = () => {
|
||||
var customId = "OTnewT"+interaction.options.getString("type")
|
||||
}else if (interaction.isButton()){
|
||||
var customId = interaction.customId
|
||||
}else if (interaction.isSelectMenu() && (interaction.customId == "OTdropdownMenu")){
|
||||
}else if (interaction.isStringSelectMenu() && (interaction.customId == "OTdropdownMenu")){
|
||||
var customId = interaction.values[0]
|
||||
|
||||
}else return
|
||||
@@ -35,7 +36,7 @@ module.exports = () => {
|
||||
if (interaction.customId.startsWith("OTnewT")){
|
||||
const optionid = interaction.customId.split("OTnewT")[1]
|
||||
if (!optionid){
|
||||
interaction.reply({embeds:[bot.errorLog.serverError(l.errors.ticketDoesntExist)]})
|
||||
await interaction.reply({embeds:[bot.errorLog.serverError(l.errors.ticketDoesntExist)]})
|
||||
return
|
||||
}
|
||||
}
|
||||
@@ -46,29 +47,26 @@ module.exports = () => {
|
||||
|
||||
//ticketoptions from config
|
||||
const currentTicketOptions = configParser.getTicketById(customId)
|
||||
|
||||
if (currentTicketOptions == false) return interaction.reply({embeds:[bot.errorLog.serverError(l.errors.anotherOption)]})
|
||||
|
||||
if (interaction.isButton()){
|
||||
interaction.deferUpdate()
|
||||
try {
|
||||
await interaction.deferReply({ephemeral:config.system.answerInEphemeralOnOpen})
|
||||
} catch{}
|
||||
}else if (interaction.isChatInputCommand()){
|
||||
interaction.reply({embeds:[bot.errorLog.success(l.messages.createdTitle,l.messages.createdDescription)]})
|
||||
}else if (interaction.isSelectMenu()){
|
||||
try {
|
||||
await interaction.deferReply({ephemeral:config.system.answerInEphemeralOnOpen})
|
||||
} catch{}
|
||||
}else if (interaction.isStringSelectMenu()){
|
||||
try {
|
||||
await interaction.deferUpdate()
|
||||
} catch{}
|
||||
}
|
||||
|
||||
if (storage.get("ticketStorage",interaction.member.id) == null || storage.get("ticketStorage",interaction.member.id) == "false"|| Number(storage.get("ticketStorage",interaction.member.id)) < config.system.max_allowed_tickets){
|
||||
|
||||
try{
|
||||
if (config.system.enable_DM_Messages){
|
||||
interaction.member.send({embeds:[bot.errorLog.custom(l.messages.newTicketDmTitle,currentTicketOptions.message,":ticket:",config.main_color)]})
|
||||
}
|
||||
}
|
||||
catch{log("system","can't send DM to member, member doesn't allow dm's")}
|
||||
|
||||
if (storage.get("amountOfUserTickets",interaction.member.id) == null || storage.get("amountOfUserTickets",interaction.member.id) == "false"|| Number(storage.get("amountOfUserTickets",interaction.member.id)) < config.system.maxAmountOfTickets){
|
||||
|
||||
//update storage
|
||||
storage.set("ticketStorage",interaction.member.id,Number(storage.get("ticketStorage",interaction.member.id))+1)
|
||||
storage.set("amountOfUserTickets",interaction.member.id,Number(storage.get("amountOfUserTickets",interaction.member.id))+1)
|
||||
var ticketNumber = interaction.member.user.username
|
||||
|
||||
//set ticketName
|
||||
@@ -86,19 +84,12 @@ module.exports = () => {
|
||||
const pfb = discord.PermissionFlagsBits
|
||||
const guild = client.guilds.cache.find(g => g.id == interaction.guild.id)
|
||||
|
||||
//set everyone allowed
|
||||
if (config.system['has@everyoneaccess']){
|
||||
var everyoneAllowPerms = [pfb.AddReactions,pfb.AttachFiles,pfb.EmbedLinks,pfb.SendMessages,pfb.ViewChannel]
|
||||
var everyoneDenyPerms = []
|
||||
}else{
|
||||
var everyoneAllowPerms = []
|
||||
var everyoneDenyPerms = [pfb.ViewChannel]
|
||||
}
|
||||
//set @everyone no ticket access
|
||||
permissionsArray.push({
|
||||
id:interaction.guild.roles.everyone,
|
||||
type:"role",
|
||||
allow:everyoneAllowPerms,
|
||||
deny:everyoneDenyPerms
|
||||
allow:[],
|
||||
deny:[pfb.ViewChannel]
|
||||
})
|
||||
|
||||
//add the user that created the ticket
|
||||
@@ -109,7 +100,7 @@ module.exports = () => {
|
||||
})
|
||||
|
||||
//add main adminroles
|
||||
config.main_adminroles.forEach((role,index) => {
|
||||
config.adminRoles.forEach((role,index) => {
|
||||
try {
|
||||
const adminrole = guild.roles.cache.find(r => r.id == role)
|
||||
if (!adminrole) return
|
||||
@@ -119,9 +110,7 @@ module.exports = () => {
|
||||
type:"role",
|
||||
allow:[pfb.AddReactions,pfb.AttachFiles,pfb.EmbedLinks,pfb.SendMessages,pfb.ViewChannel]
|
||||
})
|
||||
}catch{
|
||||
log("system","invalid role! At 'config.json => main_adminroles:"+index)
|
||||
}
|
||||
}catch{}
|
||||
})
|
||||
|
||||
//add ticket adminroles
|
||||
@@ -130,7 +119,7 @@ module.exports = () => {
|
||||
*/
|
||||
const ticketadmin = currentTicketOptions.adminroles
|
||||
ticketadmin.forEach((role,index) => {
|
||||
if (!config.main_adminroles.includes(role)){
|
||||
if (!config.adminRoles.includes(role)){
|
||||
try {
|
||||
const adminrole = guild.roles.cache.find(r => r.id == role)
|
||||
if (!adminrole) return
|
||||
@@ -140,25 +129,41 @@ module.exports = () => {
|
||||
type:"role",
|
||||
allow:[pfb.AddReactions,pfb.AttachFiles,pfb.EmbedLinks,pfb.SendMessages,pfb.ViewChannel]
|
||||
})
|
||||
}catch{
|
||||
log("system","invalid role! At 'config.json => options/ticket/...:"+index)
|
||||
}
|
||||
}catch{}
|
||||
}
|
||||
})
|
||||
|
||||
//add member role
|
||||
if (config.system.member_role != "" && config.system.member_role != " " && config.system.member_role != "false" && config.system.member_role != "null" && config.system.member_role != "0"){
|
||||
//add ticket adminroles
|
||||
if (currentTicketOptions.readonlyAdminroles){
|
||||
currentTicketOptions.readonlyAdminroles.forEach((role,index) => {
|
||||
if (!config.adminRoles.includes(role) && !currentTicketOptions.adminroles.includes(role)){
|
||||
try {
|
||||
const userrole = guild.roles.cache.find(r => r.id == config.system.member_role)
|
||||
if (!userrole) return
|
||||
const adminrole = guild.roles.cache.find(r => r.id == role)
|
||||
if (!adminrole) return
|
||||
|
||||
permissionsArray.push({
|
||||
id:adminrole,
|
||||
type:"role",
|
||||
allow:[pfb.AddReactions,pfb.ViewChannel],
|
||||
deny:[pfb.SendMessages,pfb.AttachFiles,pfb.EmbedLinks]
|
||||
})
|
||||
}catch{}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
//add member role
|
||||
if (config.system.memberRole && ![" ","0","false","null","undefined"].includes(config.system.memberRole)){
|
||||
try {
|
||||
const userrole = guild.roles.cache.find(r => r.id == config.system.memberRole)
|
||||
if (userrole){
|
||||
permissionsArray.push({
|
||||
id:userrole,
|
||||
type:"role",
|
||||
deny:[pfb.ViewChannel]
|
||||
})
|
||||
}catch{
|
||||
log("system","invalid role! At 'config.json => system/member_role")
|
||||
}
|
||||
}catch{}
|
||||
}
|
||||
|
||||
//create the channel
|
||||
@@ -170,25 +175,35 @@ module.exports = () => {
|
||||
permissionOverwrites:permissionsArray
|
||||
|
||||
}).then((ticketChannel) => {
|
||||
storage.set("userTicketStorage",ticketChannel.id,interaction.member.id)
|
||||
storage.set("userFromChannel",ticketChannel.id,interaction.member.id)
|
||||
if (currentTicketOptions.autoclose.enable) storage.set("autocloseTickets",ticketChannel.id,currentTicketOptions.autoclose.inactiveHours)
|
||||
|
||||
const hiddendata = bot.hiddenData.writeHiddenData("ticketdata",[{key:"type",value:currentTicketOptions.id},{key:"openerid",value:interaction.user.id},{key:"createdms",value:new Date().getTime()}])
|
||||
bot.hiddenData.writeHiddenData(ticketChannel.id,[{key:"type",value:currentTicketOptions.id},{key:"openerid",value:interaction.user.id},{key:"createdms",value:new Date().getTime()}])
|
||||
|
||||
var ticketEmbed = new discord.EmbedBuilder()
|
||||
//.setAuthor({name:interaction.user.id})
|
||||
.setColor(config.main_color)
|
||||
.setColor(config.color)
|
||||
.setTitle(currentTicketOptions.name)
|
||||
//.setFooter({text:"Ticket Type: "+currentTicketOptions.id})
|
||||
if (currentTicketOptions.autoclose.enable){
|
||||
const footerText = l.commands.autocloseTitle.replace("{0}",currentTicketOptions.autoclose.inactiveHours+"h")
|
||||
ticketEmbed.setFooter({text:footerText})
|
||||
}
|
||||
|
||||
if (currentTicketOptions.ticketmessage.length > 0){
|
||||
ticketEmbed.setDescription(currentTicketOptions.ticketmessage+hiddendata)
|
||||
}else{
|
||||
ticketEmbed.setDescription(hiddendata)
|
||||
ticketEmbed.setDescription(currentTicketOptions.ticketmessage)
|
||||
}
|
||||
|
||||
if (currentTicketOptions.thumbnail.enable) ticketEmbed.setThumbnail(currentTicketOptions.thumbnail.url)
|
||||
if (currentTicketOptions.image.enable) ticketEmbed.setImage(currentTicketOptions.image.url)
|
||||
|
||||
const herePing = currentTicketOptions.ping['@here'] ? " @here" : ""
|
||||
const everyonePing = currentTicketOptions.ping['@everyone'] ? " @everyone" : ""
|
||||
const customPing = currentTicketOptions.ping.custom.enable ? " <@&"+currentTicketOptions.ping.custom.roleId+">" : ""
|
||||
|
||||
|
||||
ticketChannel.send({
|
||||
content:"<@"+interaction.member.id+"> @here",
|
||||
content:"<@"+interaction.member.id+">"+herePing+everyonePing+customPing,
|
||||
embeds:[ticketEmbed],
|
||||
components:[closeButton]
|
||||
|
||||
@@ -196,12 +211,55 @@ module.exports = () => {
|
||||
firstmsg.pin()
|
||||
})
|
||||
|
||||
log("system","created new ticket",[{key:"ticket",value:ticketName},{key:"user",value:interaction.user.tag}])
|
||||
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()
|
||||
.setStyle(discord.ButtonStyle.Link)
|
||||
.setDisabled(false)
|
||||
.setEmoji("🎫")
|
||||
.setLabel(l.commands.goToTicket)
|
||||
.setURL(ticketChannel.url)
|
||||
])
|
||||
|
||||
try{
|
||||
if (currentTicketOptions.enableDmOnOpen) interaction.member.send({embeds:[bot.errorLog.custom(l.messages.newTicketDmTitle,currentTicketOptions.message,":ticket:",config.color)],components:[channelbutton]})
|
||||
}
|
||||
catch{log("system","failed to send DM")}
|
||||
|
||||
if ((interaction.isButton() && config.system.answerInEphemeralOnOpen) || interaction.isChatInputCommand()){
|
||||
if (interaction.deferred){
|
||||
interaction.editReply({embeds:[bot.errorLog.success(l.messages.createdTitle,l.messages.createdDescription)],components:[channelbutton]})
|
||||
}else{
|
||||
interaction.reply({embeds:[bot.errorLog.success(l.messages.createdTitle,l.messages.createdDescription)],components:[channelbutton]})
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
}else{
|
||||
try {
|
||||
if (config.system.enable_DM_Messages){
|
||||
if (config.system.dmMessages){
|
||||
interaction.member.send({embeds:[bot.errorLog.warning(l.errors.maxAmountTitle,l.errors.maxAmountDescription)]})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,23 +15,16 @@ const pfb = discord.PermissionFlagsBits
|
||||
* @returns
|
||||
*/
|
||||
const reopenTicket = (guild,channel,user) => {
|
||||
log("system","re-opened a ticket",[{key:"ticket",value:channel.name},{key:"user",value:user.tag}])
|
||||
log("system","re-opened a ticket",[{key:"ticket",value:channel.name},{key:"user",value:user.username}])
|
||||
|
||||
var permissionsArray = []
|
||||
|
||||
//set everyone allowed
|
||||
if (config.system['has@everyoneaccess']){
|
||||
var everyoneAllowPerms = [pfb.AddReactions,pfb.AttachFiles,pfb.EmbedLinks,pfb.SendMessages,pfb.ViewChannel]
|
||||
var everyoneDenyPerms = []
|
||||
}else{
|
||||
var everyoneAllowPerms = []
|
||||
var everyoneDenyPerms = [pfb.ViewChannel]
|
||||
}
|
||||
//set @everyone no ticket access
|
||||
permissionsArray.push({
|
||||
id:guild.roles.everyone,
|
||||
type:"role",
|
||||
allow:everyoneAllowPerms,
|
||||
deny:everyoneDenyPerms
|
||||
allow:[],
|
||||
deny:[pfb.ViewChannel]
|
||||
})
|
||||
|
||||
channel.permissionOverwrites.cache.forEach((p) => {
|
||||
@@ -42,11 +35,32 @@ const reopenTicket = (guild,channel,user) => {
|
||||
allow:[pfb.AddReactions,pfb.AttachFiles,pfb.EmbedLinks,pfb.SendMessages,pfb.ViewChannel],
|
||||
deny:[]
|
||||
})
|
||||
}else{
|
||||
if (p.id != guild.roles.everyone){
|
||||
permissionsArray.push({
|
||||
id:p.id,
|
||||
type:"role",
|
||||
allow:[pfb.AddReactions,pfb.AttachFiles,pfb.EmbedLinks,pfb.SendMessages,pfb.ViewChannel],
|
||||
deny:[]
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
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
|
||||
@@ -1,75 +0,0 @@
|
||||
const discord = require('discord.js')
|
||||
const bot = require('../index')
|
||||
const client = bot.client
|
||||
const config = bot.config
|
||||
const l = bot.language
|
||||
|
||||
/** @param {discord.TextBasedChannel} channel @returns {Promise<{ticketname:String,ticketopener:{discordjsuser:discord.User,name:String,id:String}>} */
|
||||
const getUserInfo = (channel) => {
|
||||
return new Promise((promiseresolve,reject) => {
|
||||
//getID
|
||||
var result = {
|
||||
ticketopener:{
|
||||
discordjsuser:"",
|
||||
id:"/",
|
||||
name:"/"
|
||||
},
|
||||
ticketname:"/"
|
||||
}
|
||||
channel.messages.fetchPinned().then(msglist => {
|
||||
var firstmsg = msglist.last()
|
||||
if (firstmsg == undefined || firstmsg.author.id != client.user.id) return false
|
||||
const hiddendata = bot.hiddenData.readHiddenData(firstmsg.embeds[0].description)
|
||||
const ticketId = hiddendata.data.find(d => d.key == "type")
|
||||
|
||||
const id = hiddendata.data.find(d => d.key == "openerid").value
|
||||
|
||||
result.ticketopener.id = id
|
||||
|
||||
const ticketopener = client.users.cache.find(u => u.id == id)
|
||||
const name = ticketopener.tag
|
||||
|
||||
const channelname = channel.name
|
||||
|
||||
promiseresolve({ticketname:channelname,ticketopener:{discordjsuser:ticketopener,name:name,id:id}})
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {discord.Message[]} messagecollection
|
||||
* @param {discord.Channel} channel
|
||||
* @returns new `discord.attachmentBuilder`
|
||||
*/
|
||||
|
||||
exports.createTranscript = async (messagecollection,channel) => {
|
||||
const ticketuserdata = await getUserInfo(channel)
|
||||
|
||||
require("./api/modules/events").onTranscriptCreation(messagecollection,channel,channel.guild,new Date())
|
||||
try {
|
||||
const cd = new Date()
|
||||
const months = ["January","February","March","April","May","June","July","August","September","October","November","December"]
|
||||
const dateString = cd.getDate()+" "+months[cd.getMonth()-1]+" "+cd.getFullYear()+" - "+cd.getHours()+":"+cd.getMinutes()+":"+cd.getSeconds()
|
||||
const filearray = ["open ticket transcript:\ntranscript creation: "+dateString+"\nticket name: "+ticketuserdata.ticketname+"\nticket opener: "+ticketuserdata.ticketopener.name,"\nTRANSCRIPT START:"]
|
||||
|
||||
messagecollection.reverse()
|
||||
|
||||
messagecollection.forEach((msg) => {
|
||||
const timestamp = new Date(msg.createdTimestamp)
|
||||
|
||||
if (msg.content){var content = msg.content}else{var content = "*empty message*"}
|
||||
|
||||
const msgstats = "files: "+msg.attachments.size+", embeds: "+msg.embeds.length
|
||||
filearray.push("["+timestamp.getDate()+"/"+timestamp.getMonth()+"/"+timestamp.getFullYear()+", "+timestamp.getHours()+":"+timestamp.getMinutes()+":"+timestamp.getSeconds()+"|"+msg.author.tag+"] ["+msgstats+"]\n"+content+"\n")
|
||||
})
|
||||
|
||||
if (filearray.length < 2) filearray.push("transcript is empty")
|
||||
const filestring = filearray.join("\n")
|
||||
const filebuff = Buffer.from(filestring,"utf-8")
|
||||
return new discord.AttachmentBuilder(filebuff,{name:"transcript_"+ticketuserdata.ticketname+".txt",description:"An Open Ticket transcript"})
|
||||
}catch(err){
|
||||
console.log("[error] "+err)
|
||||
return false
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
const discord = require('discord.js')
|
||||
|
||||
const bot = require("../../../index")
|
||||
const tsconfig = bot.tsconfig
|
||||
const tsembeds = require("../embeds")
|
||||
const tsdb = require("../tsdb")
|
||||
|
||||
const otversion = require("../../../package.json").version
|
||||
const version = require("../info.json").version
|
||||
|
||||
/**@typedef {{style:{enableCustomBackground:Boolean, backgroundModus:"color"|"image", backgroundData:String, titleColor:String}, bot:{name:String, id:Number, pfp:String}, ticket:{creatorname:String, creatorid:Number, closedtime:Number, openedtime:Number}}} OThtsDataOption */
|
||||
|
||||
|
||||
/**==========================================================
|
||||
=============================================================
|
||||
================THIS FILE ISN'T USED ANYMORE!!===============
|
||||
This file is for html transcripts V1!
|
||||
Visit compileJsonV2.js for the current version!
|
||||
=============================================================
|
||||
===========================================================*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {discord.Guild} guild
|
||||
* @param {discord.Channel} channel
|
||||
* @param {discord.User} user
|
||||
* @param {discord.Message[]} messagesInv
|
||||
* @param {OThtsDataOption} data
|
||||
*/
|
||||
exports.compile = (guild,channel,user,messagesInv,data) => {
|
||||
const messages = messagesInv.reverse()
|
||||
var invisibleMessages = 0
|
||||
|
||||
const rawfiles = messages.filter((m) => Array.from(m.attachments).length > 0)
|
||||
var fileAmount = 0
|
||||
rawfiles.forEach((msg) => {
|
||||
fileAmount = fileAmount + Array.from(msg.attachments).length
|
||||
})
|
||||
|
||||
const messagesArray = []
|
||||
messages.forEach((msg) => {
|
||||
if (msg.content || msg.embeds.length > 0 || msg.attachments.toJSON().length > 0){
|
||||
|
||||
const embedArray = []
|
||||
const fileArray = []
|
||||
|
||||
msg.attachments.forEach((file) => {
|
||||
fileArray.push({
|
||||
name:file.name,
|
||||
type:file.contentType,
|
||||
size:file.size.toString()+" bytes",
|
||||
url:file.url
|
||||
})
|
||||
})
|
||||
|
||||
msg.embeds.forEach((embed) => {
|
||||
embedArray.push({
|
||||
title:embed.title || false,
|
||||
description:embed.description ? embed.description : false,
|
||||
authorimg:((embed.author && embed.author.iconURL) ? embed.author.iconURL : false),
|
||||
authortext:(embed.author ? embed.author.name : false),
|
||||
footerimg:((embed.footer && embed.footer.iconURL) ? embed.footer.iconURL : false),
|
||||
footertext:(embed.footer ? embed.footer.text : false),
|
||||
color:embed.hexColor,
|
||||
image:((embed.image && embed.image.url) ? embed.image.url : false),
|
||||
thumbnail:((embed.thumbnail && embed.thumbnail.url) ? embed.thumbnail.url : false),
|
||||
url:(embed.url ? embed.url : false)
|
||||
})
|
||||
})
|
||||
|
||||
const memberColor = msg.member ? msg.member.displayHexColor : "#ffffff"
|
||||
messagesArray.push({
|
||||
author:{
|
||||
name:msg.author.username,
|
||||
id:Number(msg.author.id),
|
||||
color:memberColor,
|
||||
pfp:msg.author.displayAvatarURL()
|
||||
},
|
||||
content:msg.content || "",
|
||||
timestamp:msg.createdTimestamp,
|
||||
embeds:embedArray,
|
||||
files:fileArray
|
||||
})
|
||||
}else {invisibleMessages++}
|
||||
})
|
||||
|
||||
const result = {
|
||||
version,otversion,
|
||||
style:{
|
||||
backgroundData:data.style.backgroundData || "",
|
||||
backgroundModus:data.style.backgroundModus || "",
|
||||
enableCustomBackground:data.style.enableCustomBackground || false,
|
||||
titleColor:data.style.titleColor || "#F8BA00"
|
||||
},
|
||||
bot:{
|
||||
name:data.bot.name || "Open Ticket",
|
||||
id:Number(data.bot.id) || 0,
|
||||
pfp:data.bot.pfp || "dj-dj.be/wp-content/uploads/2022/07/profielfoto-blauw-wit.png?size=128"
|
||||
},
|
||||
ticket:{
|
||||
name:channel.name,
|
||||
id:Number(channel.id),
|
||||
|
||||
guildname:guild.name,
|
||||
guildid:Number(guild.id),
|
||||
|
||||
creatorname:data.ticket.creatorname,
|
||||
creatorid:Number(data.ticket.creatorid),
|
||||
closedbyname:user.username,
|
||||
closedbyid:Number(user.id),
|
||||
|
||||
closedtime:data.ticket.closedtime,
|
||||
openedtime:data.ticket.openedtime,
|
||||
|
||||
messages:Array.from(messages).length-invisibleMessages,
|
||||
files:fileAmount
|
||||
},
|
||||
messages:messagesArray
|
||||
}
|
||||
|
||||
|
||||
return result
|
||||
}
|
||||
@@ -0,0 +1,395 @@
|
||||
const discord = require('discord.js')
|
||||
|
||||
const bot = require("../../../index")
|
||||
const tsconfig = bot.tsconfig
|
||||
const tsembeds = require("../embeds")
|
||||
const tsdb = require("../tsdb")
|
||||
|
||||
const otversion = require("../../../package.json").version
|
||||
const version = require("../info.json").version
|
||||
|
||||
const mentions = require("./mentions").replacementions
|
||||
|
||||
/**@typedef {{background:{enableCustomBackground:Boolean, backgroundModus:"color"|"image", backgroundData:String}, header:{enableCustomHeader:Boolean, decoColor:String, backgroundColor:String, textColor:String}, stats:{enableCustomStats:Boolean, backgroundColor:String, keyTextColor:String, valueTextColor:String, hideBackgroundColor:String, hideTextColor:String}, 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 */
|
||||
/**@typedef {{enabled:Boolean,premiumToken:String, customCredits:{enable:Boolean, replaceText:String, replaceURL:String, enableReportBug:Boolean},customHeaderUrl:{enabled:Boolean, url:String, text:String}, customTranscriptUrl:{enabled:Boolean, name:String}, customFavicon:{enabled:Boolean, image:String},additionalFlags:String[]}} OTTranscriptPremium */
|
||||
|
||||
/**@typedef {{version:"2", otversion:String, language:String, style:OTTranscriptStyle, bot:OTTranscriptBot, ticket:OTTranscriptTicket, messages:OTTranscriptMessage[], premium:OTTranscriptPremium}} OTTranscriptCompileInput */
|
||||
|
||||
/**@typedef {{style:OTTranscriptStyle,bot:OTTranscriptBot,ticket:OTTranscriptTicket,premium:OTTranscriptPremium}} OTHTMLDataOption */
|
||||
|
||||
|
||||
/**@param {discord.ButtonStyle} buttonstyle */
|
||||
const buttonStyleToColor = (buttonstyle) => {
|
||||
if (buttonstyle == discord.ButtonStyle.Primary){
|
||||
return "blue"
|
||||
}else if (buttonstyle == discord.ButtonStyle.Secondary){
|
||||
return "gray"
|
||||
}else if (buttonstyle == discord.ButtonStyle.Danger){
|
||||
return "red"
|
||||
}else if (buttonstyle == discord.ButtonStyle.Success){
|
||||
return "green"
|
||||
}else{
|
||||
return "gray"
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {discord.Guild} guild
|
||||
* @param {discord.Channel} channel
|
||||
* @param {discord.User} user
|
||||
* @param {discord.Message[]} messagesInv
|
||||
* @param {OTHTMLDataOption} data
|
||||
*/
|
||||
exports.compile = (guild,channel,user,messagesInv,data) => {
|
||||
const messages = messagesInv.reverse()
|
||||
var invisibleMessages = 0
|
||||
|
||||
//MESSAGE STATS COUNTS
|
||||
var messageAmount = messages.length
|
||||
var fileAmount = 0
|
||||
var embedAmount = 0
|
||||
var reactionsAmount = 0
|
||||
var interactionAmount = 0
|
||||
messages.forEach((msg) => {
|
||||
fileAmount = fileAmount + Array.from(msg.attachments).length
|
||||
embedAmount = embedAmount + msg.embeds.length
|
||||
|
||||
msg.reactions.cache.forEach(reaction => {
|
||||
reactionsAmount = reactionsAmount + reaction.count
|
||||
})
|
||||
if (msg.components && msg.components.length > 0){
|
||||
msg.components.forEach((component) => {
|
||||
if (component.components.length > 0){
|
||||
interactionAmount = interactionAmount + component.components.length
|
||||
}else{
|
||||
interactionAmount = interactionAmount+1
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
/**@type {OTTranscriptMessage[]} */
|
||||
const messagesArray = []
|
||||
messages.forEach((msg) => {
|
||||
if (msg.content || msg.embeds.length > 0 || msg.attachments.toJSON().length > 0 || msg.components.length > 0 || msg.reactions.cache.size > 0){
|
||||
|
||||
const embedArray = []
|
||||
const attachmentArray = []
|
||||
const componentsArray = []
|
||||
|
||||
msg.attachments.forEach((file) => {
|
||||
attachmentArray.push({
|
||||
type:"FILE",
|
||||
name:file.name,
|
||||
fileType:file.contentType,
|
||||
size:Math.round(file.size/1000)+" kb",
|
||||
url:file.url
|
||||
})
|
||||
})
|
||||
|
||||
msg.embeds.forEach((embed) => {
|
||||
embedArray.push({
|
||||
title:embed.title || false,
|
||||
description:embed.description ? mentions(embed.description,guild) : false,
|
||||
authorimg:((embed.author && embed.author.iconURL) ? embed.author.iconURL : false),
|
||||
authortext:(embed.author ? embed.author.name : false),
|
||||
footerimg:((embed.footer && embed.footer.iconURL) ? embed.footer.iconURL : false),
|
||||
footertext:(embed.footer ? embed.footer.text : false),
|
||||
color:embed.hexColor,
|
||||
image:((embed.image && embed.image.url) ? embed.image.url : false),
|
||||
thumbnail:((embed.thumbnail && embed.thumbnail.url) ? embed.thumbnail.url : false),
|
||||
url:(embed.url ? embed.url : false),
|
||||
fields:embed.fields
|
||||
})
|
||||
})
|
||||
|
||||
const tempreactions = []
|
||||
msg.reactions.cache.forEach((reaction) => {
|
||||
const count = reaction.count
|
||||
const emoji = reaction.emoji
|
||||
|
||||
if (emoji instanceof discord.GuildEmoji){
|
||||
//custom emoji
|
||||
tempreactions.push({
|
||||
amount:count,
|
||||
emoji:(emoji.url) ? emoji.url : "",
|
||||
type:(emoji.animated) ? "gif" : "image"
|
||||
})
|
||||
}else if (emoji instanceof discord.ReactionEmoji){
|
||||
//build-in emoji
|
||||
tempreactions.push({
|
||||
amount:count,
|
||||
emoji:emoji.name,
|
||||
type:"svg"
|
||||
})
|
||||
}
|
||||
})
|
||||
componentsArray.push({
|
||||
type: "reactions",
|
||||
reactions:tempreactions
|
||||
})
|
||||
|
||||
msg.components.forEach((actionrow) => {
|
||||
var isdropdown = false
|
||||
var actioncomponents = []
|
||||
actionrow.components.forEach((comp) => {
|
||||
if (comp.type == discord.ComponentType.ActionRow || comp.type == discord.ComponentType.TextInput) return
|
||||
|
||||
/**
|
||||
* type: "buttons";
|
||||
buttons: [{
|
||||
type: "interaction" | "url";
|
||||
label: string | false;
|
||||
icon: string | false;
|
||||
color: "gray" | "green" | "red" | "blue";
|
||||
id: string | false;
|
||||
url: string | false;
|
||||
disabled: boolean;
|
||||
}];
|
||||
}, {
|
||||
type: "dropdown";
|
||||
placeholder: string | false;
|
||||
options: [{
|
||||
label: string | false;
|
||||
icon: string | false;
|
||||
description: string | false;
|
||||
id: string | false;
|
||||
}];
|
||||
},
|
||||
*/
|
||||
if (comp.type == discord.ComponentType.Button){
|
||||
actioncomponents.push({
|
||||
type: (comp.style == discord.ButtonStyle.Link) ? "url" : "interaction",
|
||||
label: (comp.label) ? comp.label : false,
|
||||
icon: (comp.emoji) ? comp.emoji.name : false,
|
||||
color: buttonStyleToColor(comp.style),
|
||||
id: comp.customId ? comp.customId : false,
|
||||
url: (comp.url) ? comp.url : false,
|
||||
disabled: false
|
||||
})
|
||||
}else{
|
||||
isdropdown = true
|
||||
var drpdwnoptions = []
|
||||
/**@type {discord.APISelectMenuOption[]} */
|
||||
const dropdownoptions = comp.options
|
||||
dropdownoptions.forEach((opt) => {
|
||||
drpdwnoptions.push({
|
||||
label: opt.label,
|
||||
icon: (opt.emoji) ? opt.emoji : false,
|
||||
description: (opt.description) ? opt.description : false,
|
||||
id: "hello world :)"
|
||||
})
|
||||
})
|
||||
|
||||
componentsArray.push({
|
||||
type:"dropdown",
|
||||
placeholder:false,
|
||||
options:drpdwnoptions
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
if (!isdropdown){
|
||||
componentsArray.push({
|
||||
type:"buttons",
|
||||
buttons:actioncomponents
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
const important = msg.guild ? (msg.content.includes("<@"+msg.guild.id+">") || msg.content.includes("<@everyone") || msg.content.includes("@here")): false
|
||||
|
||||
const replytype = (msg.interaction) ? "command" : ((msg.reference) ? "reply" : false)
|
||||
if (replytype == "command"){
|
||||
const replycolorRAW = msg.guild.members.cache.find((m) => m.id == msg.interaction.user.id)
|
||||
const replycolor = (replycolorRAW) ? replycolorRAW.displayHexColor.replace("#000000","#ffffff") : "#ffffff"
|
||||
var reply = {
|
||||
type:replytype,
|
||||
commandOptions:{
|
||||
interactionId:msg.interaction.id,
|
||||
interactionName:msg.interaction.commandName
|
||||
},
|
||||
user:{
|
||||
name:msg.interaction.user.username,
|
||||
id:msg.interaction.user.id,
|
||||
color:replycolor,
|
||||
pfp:msg.interaction.user.displayAvatarURL(),
|
||||
bot:msg.interaction.user.bot,
|
||||
system:msg.interaction.user.system,
|
||||
verifiedBot:msg.interaction.user.flags.has(discord.UserFlags.VerifiedBot)
|
||||
}
|
||||
}
|
||||
}else if (replytype == "reply"){
|
||||
|
||||
var replycontentRAW = messages.find((msg2) => msg2.id == msg.reference.messageId)
|
||||
var replycontent = (replycontentRAW && replycontentRAW.content) ? replycontentRAW.content.slice(0,(60-replycontentRAW.author.username.length)) : "deleted this message"
|
||||
const replycolorRAW = (replycontentRAW) ? msg.guild.members.cache.find((m) => m.id == replycontentRAW.author.id) : false
|
||||
const replycolor = (replycolorRAW) ? replycolorRAW.displayHexColor.replace("#000000","#ffffff") : "#ffffff"
|
||||
|
||||
var user = (replycontentRAW && replycontentRAW.content) ? {
|
||||
name:(replycontentRAW) ? replycontentRAW.author.username : "undefined",
|
||||
id:(replycontentRAW) ? replycontentRAW.author.id : "undefined",
|
||||
color:replycolor,
|
||||
pfp:(replycontentRAW) ? replycontentRAW.author.username : "",
|
||||
bot:(replycontentRAW) ? replycontentRAW.author.bot : false,
|
||||
system:(replycontentRAW) ? replycontentRAW.author.system : false,
|
||||
verifiedBot:(replycontentRAW) ? replycontentRAW.author.flags.has(discord.UserFlags.VerifiedBot) : false,
|
||||
} : {
|
||||
name:"someone",
|
||||
id:"undefined",
|
||||
color:"#ffffff",
|
||||
pfp:"https://raw.githubusercontent.com/twitter/twemoji/master/assets/72x72/1f5d1.png",
|
||||
bot:false,
|
||||
system:false,
|
||||
verifiedBot:false,
|
||||
}
|
||||
|
||||
var reply = {
|
||||
type:replytype,
|
||||
replyOptions:{
|
||||
content:replycontent,
|
||||
messageId: msg.reference.messageId,
|
||||
channelId: msg.reference.channelId,
|
||||
guildId: msg.reference.guildId
|
||||
},
|
||||
user:user
|
||||
}
|
||||
}else{var reply = {type:replytype}}
|
||||
|
||||
const authorColor = msg.member ? msg.member.displayHexColor.replace("#000000","#ffffff") : "#ffffff"
|
||||
messagesArray.push({
|
||||
author:{
|
||||
name:msg.author.username,
|
||||
id:msg.author.id,
|
||||
color:authorColor,
|
||||
pfp:msg.author.displayAvatarURL(),
|
||||
bot:msg.author.bot,
|
||||
system:msg.author.system,
|
||||
verifiedBot:msg.author.flags.has(discord.UserFlags.VerifiedBot)
|
||||
},
|
||||
content:mentions(msg.content,guild) || "",
|
||||
timestamp:msg.createdTimestamp,
|
||||
embeds:embedArray,
|
||||
attachments:attachmentArray,
|
||||
edited: (typeof msg.editedTimestamp == "number"),
|
||||
type:"normal",
|
||||
important:important,
|
||||
reply:reply,
|
||||
components:componentsArray
|
||||
})
|
||||
}else {invisibleMessages++}
|
||||
})
|
||||
|
||||
const dsb = data.style.background
|
||||
const dsh = data.style.header
|
||||
const dss = data.style.stats
|
||||
const dsf = data.style.favicon
|
||||
|
||||
/**@type {OTTranscriptCompileInput} */
|
||||
const result = {
|
||||
version,otversion,
|
||||
language:bot.config.languageFile,
|
||||
style:{
|
||||
background:{
|
||||
backgroundData:dsb.backgroundData || "",
|
||||
backgroundModus:dsb.backgroundModus || "",
|
||||
enableCustomBackground:dsb.enableCustomBackground || false,
|
||||
},
|
||||
header:{
|
||||
backgroundColor:dsh.backgroundColor || "#202225",
|
||||
decoColor:dsh.decoColor || "#F8BA00",
|
||||
textColor:dsh.textColor || "#ffffff",
|
||||
enableCustomHeader:dsh.enableCustomHeader || false
|
||||
},
|
||||
stats:{
|
||||
backgroundColor:dss.backgroundColor || "#202225",
|
||||
keyTextColor:dss.keyTextColor || "#737373",
|
||||
valueTextColor:dss.valueTextColor || "#ffffff",
|
||||
hideBackgroundColor:dss.hideBackgroundColor || "#40444a",
|
||||
hideTextColor:dss.hideTextColor || "#ffffff",
|
||||
enableCustomStats:dss.enableCustomStats || false
|
||||
}
|
||||
},
|
||||
bot:{
|
||||
name:data.bot.name || "Open Ticket",
|
||||
id:data.bot.id || 0,
|
||||
pfp:data.bot.pfp || "transcripts.dj-dj.be/favicon.png"
|
||||
},
|
||||
ticket:{
|
||||
name:channel.name,
|
||||
id:channel.id,
|
||||
|
||||
guildname:guild.name,
|
||||
guildid:guild.id,
|
||||
guildinvite:"",
|
||||
|
||||
creatorname:data.ticket.creatorname,
|
||||
creatorid:data.ticket.creatorid,
|
||||
creatorpfp:data.ticket.creatorpfp,
|
||||
|
||||
closedbyname:user.username,
|
||||
closedbyid:user.id,
|
||||
closedbypfp:user.displayAvatarURL(),
|
||||
|
||||
claimedid:"",
|
||||
claimedname:"",
|
||||
claimedpfp:"",
|
||||
|
||||
closedtime:data.ticket.closedtime,
|
||||
openedtime:data.ticket.openedtime,
|
||||
|
||||
roleColors:[],
|
||||
components:{
|
||||
messages:messageAmount,
|
||||
embeds:embedAmount,
|
||||
files:fileAmount,
|
||||
interactions:{
|
||||
buttons:0,
|
||||
dropdowns:0,
|
||||
total:interactionAmount
|
||||
},
|
||||
reactions:reactionsAmount,
|
||||
attachments:{
|
||||
gifs:0,
|
||||
images:0,
|
||||
stickers:0,
|
||||
invites:0
|
||||
}
|
||||
}
|
||||
},
|
||||
messages:messagesArray,
|
||||
premium:{
|
||||
enabled:false,
|
||||
premiumToken:"",
|
||||
|
||||
customCredits:{
|
||||
enable:false,
|
||||
replaceText:"Powered By Open Ticket!",
|
||||
replaceURL:"https://openticket.dj-dj.be",
|
||||
enableReportBug:true
|
||||
},
|
||||
customHeaderUrl:{
|
||||
enabled:false,
|
||||
url:"https://openticket.dj-dj.be",
|
||||
text:"Hello!"
|
||||
},
|
||||
customTranscriptUrl:{
|
||||
enabled:false,
|
||||
name:"test-server"
|
||||
},
|
||||
customFavicon:{
|
||||
enabled:dsf.enableCustomFavicon,
|
||||
image:(dsf.imageUrl) ? dsf.imageUrl : "https://openticket.dj-dj.be"
|
||||
},
|
||||
additionalFlags:[]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return result
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
const axios = require("axios").default
|
||||
const discord = require('discord.js')
|
||||
|
||||
const bot = require("../../../index")
|
||||
const tsconfig = bot.tsconfig
|
||||
const tsembeds = require("../embeds")
|
||||
const tsdb = require("../tsdb")
|
||||
|
||||
/**@typedef {{status:"success"|"error", id:String, time:Number, estimated:{lastdump: Number, processtime:Number,waittime:Number}, transcriptstatus:{value:2, data:{fetchedmsgs:true, uploaded:true, inqueue:true, processed:false, waiting:false, available:false}}}} OTuploadResponse */
|
||||
|
||||
/**
|
||||
* @param {Object} json
|
||||
* @returns {Promise<OTuploadResponse|false>}
|
||||
*/
|
||||
exports.upload = async (json) => {
|
||||
return new Promise(async (resolve,reject) => {
|
||||
const data = encodeURIComponent(JSON.stringify(json))
|
||||
|
||||
try {
|
||||
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)
|
||||
}catch(err){
|
||||
console.log("failed transcript upload!",err.response)
|
||||
resolve(false)
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
const discord = require('discord.js')
|
||||
|
||||
const bot = require("../../../index")
|
||||
const tsconfig = bot.tsconfig
|
||||
const tsembeds = require("../embeds")
|
||||
const tsdb = require("../tsdb")
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {String} text
|
||||
* @param {discord.Guild} guild
|
||||
*/
|
||||
exports.replacementions = (text,guild) => {
|
||||
const userregex = /<@([0-9]+)>(\s)?/g
|
||||
const usertext = text.replace(userregex,(x) => {
|
||||
var res = userregex.exec(x)
|
||||
userregex.lastIndex = 0
|
||||
|
||||
var member = guild.members.cache.find((m) => m.id == res[1])
|
||||
var text = member ? member.user.username.replace(/\s/g," ") : res[1]
|
||||
return "<@"+text+"> "
|
||||
})
|
||||
|
||||
const channelregex = /<#([0-9]+)>(\s)?/g
|
||||
const channeltext = usertext.replace(channelregex,(x) => {
|
||||
var res = channelregex.exec(x)
|
||||
channelregex.lastIndex = 0
|
||||
|
||||
var channel = guild.channels.cache.find((c) => c.id == res[1])
|
||||
var text = channel ? channel.name.replace(/\s/g," ") : res[1]
|
||||
return "<#"+text+"> "
|
||||
})
|
||||
|
||||
const roleregex = /<@&([0-9]+)>(\s)?/g
|
||||
const roletext = channeltext.replace(roleregex,(x) => {
|
||||
var res = roleregex.exec(x)
|
||||
roleregex.lastIndex = 0
|
||||
|
||||
var role = guild.roles.cache.find((r) => r.id == res[1])
|
||||
var text = role ? role.name.replace(/\s/g," ") : res[1]
|
||||
|
||||
var color = role ? ((role.hexColor == "#000000") ? "regular" : role.hexColor) : "regular"
|
||||
|
||||
return "<@&"+text+"::"+color+"> "
|
||||
})
|
||||
|
||||
const defaultroleregex = /@(everyone|here)(\s)?/g
|
||||
const defaultroletext = roletext.replace(defaultroleregex,(x) => {
|
||||
var res = defaultroleregex.exec(x)
|
||||
defaultroleregex.lastIndex = 0
|
||||
|
||||
var text = res[1]
|
||||
return "<@&"+text+"::regular> "
|
||||
})
|
||||
|
||||
return defaultroletext
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
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 storage = bot.storage
|
||||
const tsconfig = bot.tsconfig
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {String} name
|
||||
* @param {String} id
|
||||
* @param {Number} rawprocesstime milliseconds
|
||||
* @param {discord.User} user
|
||||
*/
|
||||
exports.beingprocessed = (name,id,rawprocesstime,user) => {
|
||||
|
||||
const newtime = rawprocesstime
|
||||
|
||||
const processtime = "<t:"+newtime.getTime().toString().substring(0,newtime.getTime().toString().length-3)+":R>"
|
||||
|
||||
const embed = new discord.EmbedBuilder()
|
||||
.setTitle("🧾 "+l.transcripts.title)
|
||||
.setColor(config.color)
|
||||
.setAuthor({name:user.username,iconURL:user.displayAvatarURL()})
|
||||
.setFooter({text:name})
|
||||
|
||||
.setDescription("`"+l.transcripts.processed+"...`\n"+l.transcripts.wait+"\n\n"+l.transcripts.estimated+": "+processtime)
|
||||
|
||||
return embed
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {String} name
|
||||
* @param {String} id
|
||||
* @param {String} url
|
||||
* @param {discord.User} user
|
||||
*/
|
||||
exports.tsready = (name,id,url,user) => {
|
||||
const embed = new discord.EmbedBuilder()
|
||||
.setTitle("🧾 "+l.transcripts.title)
|
||||
.setColor(config.color)
|
||||
.setAuthor({name:user.username,iconURL:user.displayAvatarURL()})
|
||||
.setFooter({text:name})
|
||||
|
||||
if (url){
|
||||
embed.setURL(url)
|
||||
embed.setDescription("\n["+l.transcripts.available+"]("+url+")\n")
|
||||
}else{
|
||||
embed.setDescription("\n"+l.transcripts.available+"\n")
|
||||
}
|
||||
|
||||
return embed
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {String} name
|
||||
* @param {String} id
|
||||
* @param {discord.User} user
|
||||
* @param {undefined|String} err
|
||||
*/
|
||||
exports.tserror = (name,id,user,err) => {
|
||||
const embed = new discord.EmbedBuilder()
|
||||
.setTitle("❌ "+l.transcripts.title)
|
||||
.setColor(discord.Colors.Red)
|
||||
.setAuthor({name:user.username,iconURL:user.displayAvatarURL()})
|
||||
.setFooter({text:name})
|
||||
|
||||
const errDesc = (typeof err == "string") ? "\n"+err : ""
|
||||
|
||||
embed.setDescription("Something went wrong while creating the HTML transcript.\n\n[possible reasons](https://docs.openticket.dj-dj.be/the-system/transcripts/transcript-errors)"+errDesc)
|
||||
|
||||
return embed
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"version":"2"
|
||||
}
|
||||
@@ -0,0 +1,203 @@
|
||||
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 storage = bot.storage
|
||||
|
||||
const tsconfig = bot.tsconfig
|
||||
const tsembeds = require("./embeds")
|
||||
const tsdb = require("./tsdb")
|
||||
|
||||
|
||||
const checkAvailability = async () => {
|
||||
if (process.argv.some((v) => v == "--tsoffline")) return true
|
||||
const axios = require("axios").default
|
||||
try{
|
||||
const res = await axios.get("https://transcripts.dj-dj.be/api/status.json")
|
||||
if (!res || !(res.status == 200) || !res.data) return false
|
||||
|
||||
if (res.data && res.data["v2"] == "online") return true
|
||||
else return false
|
||||
}catch{
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {discord.Message[]} messages
|
||||
* @param {discord.Guild} guild
|
||||
* @param {discord.TextChannel} channel
|
||||
* @param {discord.User} user
|
||||
* @param {String|false} reason
|
||||
*/
|
||||
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
|
||||
const chId = channel.id
|
||||
|
||||
const asyncmanager = async () => {
|
||||
const hiddendata = bot.hiddenData.readHiddenData(channel.id)
|
||||
if (hiddendata.length < 1) return
|
||||
const ticketId = hiddendata.find(d => d.key == "type").value
|
||||
const ticketData = require("../utils/configParser").getTicketById(ticketId,true)
|
||||
|
||||
const id = hiddendata.find(d => d.key == "openerid").value
|
||||
const opentime = new Date(Number(hiddendata.find(d => d.key == "createdms").value))
|
||||
|
||||
const ticketopener = client.users.cache.find(u => u.id == id)
|
||||
|
||||
if (tsconfig.sendTranscripts.useHTMLtranscripts){
|
||||
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:{
|
||||
enableCustomBackground:tsb.enableCustomBackground,
|
||||
backgroundModus:tsb.backgroundModus,
|
||||
backgroundData:tsb.backgroundData
|
||||
},
|
||||
header:{
|
||||
enableCustomHeader:tsh.enableCustomHeader,
|
||||
backgroundColor:tsh.backgroundColor,
|
||||
decoColor:tsh.decoColor,
|
||||
textColor:tsh.textColor
|
||||
},
|
||||
stats:{
|
||||
enableCustomStats:tss.enableCustomStats,
|
||||
backgroundColor:tss.backgroundColor,
|
||||
keyTextColor:tss.keyTextColor,
|
||||
valueTextColor:tss.valueTextColor,
|
||||
hideBackgroundColor:tss.hideBackgroundColor,
|
||||
hideTextColor:tss.hideTextColor
|
||||
},
|
||||
favicon:{
|
||||
enableCustomFavicon:tsf.enableCustomFavicon,
|
||||
imageUrl:tsf.imageUrl
|
||||
}
|
||||
|
||||
},
|
||||
bot:{
|
||||
name:client.user.username,
|
||||
id:client.user.id,
|
||||
pfp:client.user.displayAvatarURL(),
|
||||
},
|
||||
ticket:{
|
||||
creatorid:ticketopener.id,
|
||||
creatorname:ticketopener.username,
|
||||
creatorpfp:ticketopener.displayAvatarURL(),
|
||||
|
||||
openedtime:opentime.getTime(),
|
||||
closedtime:new Date().getTime()
|
||||
}
|
||||
})
|
||||
|
||||
if (!await checkAvailability()){
|
||||
const attachment = await require("./oldTranscript").createTranscript(messages,channel)
|
||||
const errembed = tsembeds.tserror(chName,chId,user)
|
||||
|
||||
if (tsconfig.sendTranscripts.enableChannel){
|
||||
/**@type {discord.TextChannel|undefined} */
|
||||
const tc = guild.channels.cache.find((c) => c.id == tsconfig.sendTranscripts.channel)
|
||||
|
||||
if (!tc) return
|
||||
tc.send({embeds:[errembed],files:[attachment]})
|
||||
}
|
||||
if (tsconfig.sendTranscripts.enableDM && user){
|
||||
const embed = tsembeds.tsready(chName,chId,null,user)
|
||||
try {
|
||||
ticketopener.send({embeds:[embed],files:[attachment]})
|
||||
}catch{}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
const TSdata = await require("./communication/index").upload(JSONDATA)
|
||||
if (!TSdata) return false
|
||||
|
||||
if (TSdata.status == "success"){
|
||||
//MAKE THIS COMPATIBLE WITH PREMIUM "customTranscriptUrl" IN FUTURE VERSIONS!!
|
||||
const url = "https://transcripts.dj-dj.be/v2/"+TSdata.time+"_"+TSdata.id+".html"
|
||||
|
||||
//calculate estimated time
|
||||
//const lastDumpTime = (new Date(TSdata.estimated.lastdump).getTime())
|
||||
//const dumpLoopTime = 15000
|
||||
//const nextDump = new Date(lastDumpTime+dumpLoopTime)
|
||||
//const processtime = TSdata.estimated.processtime+6000 //6sec extra time for overflow
|
||||
|
||||
const duration = TSdata.estimated.waittime
|
||||
const finaltime = new Date(new Date().getTime()+duration)
|
||||
|
||||
//waiting
|
||||
if (tsconfig.sendTranscripts.enableChannel){
|
||||
/**@type {discord.TextChannel|undefined} */
|
||||
const tc = guild.channels.cache.find((c) => c.id == tsconfig.sendTranscripts.channel)
|
||||
|
||||
if (!tc) return
|
||||
const embed = tsembeds.beingprocessed(chName,chId,finaltime,user)
|
||||
var msg = await tc.send({embeds:[embed]})
|
||||
}else {var msg = false}
|
||||
|
||||
//ready
|
||||
setTimeout(() => {
|
||||
if (msg){
|
||||
msg.edit({embeds:[tsembeds.tsready(chName,chId,url,user)]})
|
||||
}
|
||||
|
||||
if (tsconfig.sendTranscripts.enableDM){
|
||||
if (!user) return
|
||||
const embed = tsembeds.tsready(chName,chId,url,user)
|
||||
try {
|
||||
ticketopener.send({embeds:[embed]})
|
||||
}catch{}
|
||||
}
|
||||
},duration)
|
||||
}else{
|
||||
const attachment = await require("./oldTranscript").createTranscript(messages,channel)
|
||||
const errembed = tsembeds.tserror(chName,chId,user,"`error type: transcript API error`")
|
||||
|
||||
if (tsconfig.sendTranscripts.enableChannel){
|
||||
/**@type {discord.TextChannel|undefined} */
|
||||
const tc = guild.channels.cache.find((c) => c.id == tsconfig.sendTranscripts.channel)
|
||||
|
||||
if (!tc) return
|
||||
tc.send({embeds:[errembed],files:[attachment]})
|
||||
}
|
||||
if (tsconfig.sendTranscripts.enableDM && user){
|
||||
const embed = tsembeds.tsready(chName,chId,null,user)
|
||||
try {
|
||||
ticketopener.send({embeds:[embed],files:[attachment]})
|
||||
}catch{}
|
||||
}
|
||||
}
|
||||
}else{
|
||||
const attachment = await require("./oldTranscript").createTranscript(messages,channel)
|
||||
const embed = tsembeds.tsready(chName,chId,false,user)
|
||||
|
||||
if (tsconfig.sendTranscripts.enableChannel){
|
||||
/**@type {discord.TextChannel|undefined} */
|
||||
const tc = guild.channels.cache.find((c) => c.id == tsconfig.sendTranscripts.channel)
|
||||
|
||||
if (!tc) return
|
||||
tc.send({embeds:[embed],files:[attachment]})
|
||||
}
|
||||
if (tsconfig.sendTranscripts.enableDM && user){
|
||||
const embed = tsembeds.tsready(chName,chId,null,user)
|
||||
try {
|
||||
ticketopener.send({embeds:[embed],files:[attachment]})
|
||||
}catch{}
|
||||
}
|
||||
}
|
||||
}
|
||||
asyncmanager()
|
||||
}
|
||||
Executable
+60
@@ -0,0 +1,60 @@
|
||||
const discord = require('discord.js')
|
||||
const bot = require('../../index')
|
||||
const client = bot.client
|
||||
const config = bot.config
|
||||
const l = bot.language
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {discord.Message[]} messagecollection
|
||||
* @param {discord.TextChannel} channel
|
||||
* @param {Boolean} backup
|
||||
* @returns new `discord.attachmentBuilder`
|
||||
*/
|
||||
|
||||
exports.createTranscript = async (messagecollection,channel,backup) => {
|
||||
try {
|
||||
const cd = new Date()
|
||||
const months = ["January","February","March","April","May","June","July","August","September","October","November","December"]
|
||||
const dateString = cd.getDate()+" "+months[cd.getMonth()-1]+" "+cd.getFullYear()+" - "+cd.getHours()+":"+cd.getMinutes()+":"+cd.getSeconds()
|
||||
let backuptitle = backup ? "BACKUP " : ""
|
||||
let backupfilename = backup ? "backup" : ""
|
||||
const filearray = [backuptitle+"TRANSCRIPT:\n"]
|
||||
|
||||
messagecollection.reverse()
|
||||
|
||||
messagecollection.forEach((msg) => {
|
||||
const timestamp = new Date(msg.createdTimestamp)
|
||||
|
||||
//empty message handling
|
||||
if (msg.content){
|
||||
var content = msg.content
|
||||
}else if (msg.embeds.length > 0 && msg.attachments.length > 0){
|
||||
var content = "*this message only has embeds & files*"
|
||||
}else if (msg.embeds.length > 0){
|
||||
var content = "*this message only has embeds*"
|
||||
}else if (msg.attachments.length > 0){
|
||||
var content = "*this message only has files*"
|
||||
}else{
|
||||
var content = "*empty message*"
|
||||
}
|
||||
|
||||
|
||||
const fileurls = []
|
||||
const rawfiles = Array.from(msg.attachments)
|
||||
rawfiles.forEach((file) => {
|
||||
fileurls.push("attachment: "+file[1].url)
|
||||
})
|
||||
const filestring = fileurls.length > 0 ? fileurls.join("\n")+"\n" : ""
|
||||
const msgstats = "files: "+msg.attachments.size+", embeds: "+msg.embeds.length
|
||||
filearray.push("["+timestamp.getDate()+"/"+timestamp.getMonth()+"/"+timestamp.getFullYear()+", "+timestamp.getHours()+":"+timestamp.getMinutes()+":"+timestamp.getSeconds()+"|"+msg.author.username+"] ["+msgstats+"]\n"+content+"\n"+filestring)
|
||||
})
|
||||
|
||||
if (filearray.length < 2) filearray.push("transcript is empty")
|
||||
const filestring = filearray.join("\n")
|
||||
const filebuff = Buffer.from(filestring,"utf-8")
|
||||
return new discord.AttachmentBuilder(filebuff,{name:backupfilename+"transcript.txt",description:"Open Ticket transcript"})
|
||||
}catch{
|
||||
return false
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
const fs = require("fs")
|
||||
const location = "./storage/tsdatabase.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"))
|
||||
}
|
||||
|
||||
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|false}
|
||||
*/
|
||||
exports.get = (category,key) => {
|
||||
const currentData = getData()
|
||||
const tempresult = currentData.find((d) => (d.category == category) && (d.key == key))
|
||||
const result = tempresult ? tempresult.value : false
|
||||
return result
|
||||
}
|
||||
/**
|
||||
* @param {String} category
|
||||
* @param {String} key
|
||||
* @param {String} value
|
||||
*/
|
||||
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
|
||||
}
|
||||
@@ -6,7 +6,7 @@ const l = bot.language
|
||||
//==================
|
||||
|
||||
//OTTicketOptions
|
||||
/**@typedef {{id: String,name: String,description: String,icon: String,label: String,type: "ticket"|"role"|"website",color: "red"|"green"|"blue"|"gray",adminroles: String[],channelprefix: String,category: String,message: String,enableDmOnOpen: Boolean,ticketmessage: String, thumbnail:{enable:Boolean,url:String}, closedCategory:{enable:Boolean,id:String}}} OTTicketOptions */
|
||||
/**@typedef {{id: String,name: String,description: String,icon: String,label: String,type: "ticket"|"role"|"website",color: "red"|"green"|"blue"|"gray",adminroles: String[], readonlyAdminroles: String[], channelprefix: String,category: String,message: String,enableDmOnOpen: Boolean,ticketmessage: String, thumbnail:{enable:Boolean,url:String}, image:{enable:Boolean,url:String}, closedCategory:{enable:Boolean,id:String}, autoclose:{enable:Boolean,inactiveHours:Number}, ping:{"@here":Boolean, "@everyone":Boolean, custom:{enable:Boolean, roleId:String}} }} OTTicketOptions */
|
||||
|
||||
//OTRoleOptions
|
||||
/**@typedef {{id: String,name: String,description: String,icon: String,label: String,type: "ticket"|"role"|"website",color:"red"|"green"|"blue"|"gray"|"none",roles:String[],mode:"add&remove"|"remove"|"add",enableDmOnOpen:Boolean}} OTRoleOptions */
|
||||
@@ -16,10 +16,13 @@ const l = bot.language
|
||||
|
||||
|
||||
//OTConfigMessage
|
||||
/**@typedef {{id: string, name: string, description: string, dropdown: boolean, enableFooter: boolean, footer: string, enableThumbnail: boolean, thumbnail: string, enableCustomColor: boolean, color: string, options: string[], enableTicketExplaination: boolean, enableMaxTicketsWarning: boolean}} OTConfigMessage*/
|
||||
/**@typedef {{id: string, name: string, description: string, dropdown: boolean, enableFooter: boolean, footer: string, enableFooterImage: boolean, footerImage: string, enableThumbnail: boolean, thumbnail: string, enableImage: boolean, image: string, enableCustomColor: boolean, color: string, options: string[], other:{enableTicketExplaination: boolean, enableMaxTicketsWarning: boolean, customDropdownPlaceholder:{enable:Boolean,text:String}, customCategoryText:{enable:Boolean,text:String}, embedTitleURL:{enable:Boolean,url:String} } }} OTConfigMessage*/
|
||||
|
||||
//OTAllOptions
|
||||
/**@typedef {{id: String,name: String,description: String,icon: String,label: String,type: "ticket"|"role"|"website",color:"red"|"green"|"blue"|"gray"|"none",roles:String[],mode:"add&remove"|"remove"|"add",adminroles: String[],channelprefix: String,category: String,message: String,enableDmOnOpen: Boolean,ticketmessage: String, thumbnail:{enable:Boolean,url:String}, image:{enable:Boolean,url:String}, url:String, closedCategory:{enable:Boolean,id:String}, autoclose:{enable:Boolean,inactiveHours:Number}, readonlyAdminroles: String[]}} OTAllOptions */
|
||||
|
||||
//StringOptions
|
||||
/**@typedef {"id"|"name"|"description"|"icon"|"label"|"type"|"color"|"adminroles"|"channelprefix"|"category"|"message"|"enableDmOnOpen"|"ticketmessage"|"thumbnail"|"closedCategory"} OTTicketStringOptions */
|
||||
/**@typedef {"id"|"name"|"description"|"icon"|"label"|"type"|"color"|"adminroles"|"channelprefix"|"category"|"message"|"enableDmOnOpen"|"ticketmessage"|"thumbnail"|"image"|"closedCategory"|"adminroles"|"autoclose"|"ping"} OTTicketStringOptions */
|
||||
/**@typedef {"id"|"name"|"description"|"icon"|"label"|"type"|"color"|"roles"|"mode"|"enableDmOnOpen"} OTRoleStringOptions */
|
||||
/**@typedef {"id"|"name"|"description"|"icon"|"label"|"type"|"url"} OTWebsiteStringOptions */
|
||||
|
||||
@@ -168,8 +171,6 @@ this.websiteType = {}
|
||||
this.messageType = {}
|
||||
|
||||
|
||||
//OTAllOptions
|
||||
/**@typedef {{id: String,name: String,description: String,icon: String,label: String,type: "ticket"|"role"|"website",color:"red"|"green"|"blue"|"gray"|"none",roles:String[],mode:"add&remove"|"remove"|"add",adminroles: String[],channelprefix: String,category: String,message: String,enableDmOnOpen: Boolean,ticketmessage: String, thumbnail:{enable:Boolean,url:String}, url:String, closedCategory:{enable:Boolean,id:String}}} OTAllOptions */
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
+13
-27
@@ -2,10 +2,13 @@ const discord = require("discord.js")
|
||||
const bot = require("../../index")
|
||||
const config = bot.config
|
||||
const l = bot.language
|
||||
const b = discord.ButtonStyle
|
||||
|
||||
/**@returns {"DANGER"|"SUCCESS"|"PRIMARY"|"SECONDARY"} */
|
||||
/**
|
||||
* @param {String} color
|
||||
* @returns {"DANGER"|"SUCCESS"|"PRIMARY"|"SECONDARY"} */
|
||||
const getColor = (color) => {
|
||||
const b = discord.ButtonStyle
|
||||
if (color){
|
||||
if (color.toLowerCase() == "red"){
|
||||
return b.Danger
|
||||
}else if (color.toLowerCase() == "green"){
|
||||
@@ -14,11 +17,12 @@ const getColor = (color) => {
|
||||
return b.Primary
|
||||
}else if (color.toLowerCase() == "black" || color.toLowerCase() == "gray" || color.toLowerCase() == "grey"){
|
||||
return b.Secondary
|
||||
}else if (color == "DANGER" || color == "SECONDARY" || color == "SUCCESS" || color == "PRIMARY"){
|
||||
}else if (color.toUpperCase() == "DANGER" || color.toUpperCase() == "SECONDARY" || color.toUpperCase() == "SUCCESS" || color.toUpperCase() == "PRIMARY"){
|
||||
return color
|
||||
}else if (color.toLowerCase() == "none" || color.toLowerCase() == "false" || color.toLowerCase() == ""){
|
||||
return b.Secondary
|
||||
}else return b.Secondary
|
||||
}else return b.Secondary
|
||||
}
|
||||
|
||||
const getOption = (id) => {
|
||||
@@ -32,6 +36,12 @@ exports.getOption = getOption
|
||||
* @returns {discord.ButtonBuilder|false}
|
||||
*/
|
||||
exports.getButton = (id) => {
|
||||
bot.actionRecorder.push({
|
||||
category:"ot.managers.utils",
|
||||
file:"./core/utils/getButton.js",
|
||||
time:new Date().getTime(),
|
||||
type:"getbutton"
|
||||
})
|
||||
const option = getOption(id)
|
||||
if (!option) return false
|
||||
if (option.type == "ticket"){
|
||||
@@ -68,27 +78,3 @@ exports.getButton = (id) => {
|
||||
|
||||
return button
|
||||
}
|
||||
|
||||
|
||||
exports.rawButtonData = class {
|
||||
constructor() {
|
||||
this.id = ""
|
||||
this.name = ""
|
||||
this.description = ""
|
||||
this.icon = ""
|
||||
this.label = ""
|
||||
this.type = ""
|
||||
|
||||
this.color = ""
|
||||
this.enableDmOnOpen = true
|
||||
this.url = ""
|
||||
this.roles = ["",""]
|
||||
this.mode = ""
|
||||
this.adminroles = ["",""]
|
||||
this.channelprefix = ""
|
||||
this.category = ""
|
||||
this.message = ""
|
||||
this.ticketmessage = ""
|
||||
|
||||
}
|
||||
}
|
||||
@@ -7,26 +7,34 @@ const configParser = require("./configParser")
|
||||
/**
|
||||
*
|
||||
* @param {String[]} ids
|
||||
* @returns {discord.SelectMenuBuilder|false}
|
||||
* @param {String|undefined|false} placeholder
|
||||
* @returns {discord.StringSelectMenuBuilder|false}
|
||||
*/
|
||||
exports.getDropdown = (ids) => {
|
||||
const dropdown = new discord.SelectMenuBuilder()
|
||||
exports.getDropdown = (ids,placeholder) => {
|
||||
bot.actionRecorder.push({
|
||||
category:"ot.managers.utils",
|
||||
file:"./core/utils/getDropdown.js",
|
||||
time:new Date().getTime(),
|
||||
type:"getdropdown"
|
||||
})
|
||||
const dropdown = new discord.StringSelectMenuBuilder()
|
||||
.setCustomId("OTdropdownMenu")
|
||||
.setDisabled(false)
|
||||
.setMaxValues(1)
|
||||
.setMinValues(1)
|
||||
.setPlaceholder(l.messages.chooseATicket)
|
||||
.setPlaceholder(placeholder || l.messages.chooseATicket)
|
||||
.addOptions(
|
||||
new discord.SelectMenuOptionBuilder()
|
||||
new discord.StringSelectMenuOptionBuilder()
|
||||
.setDefault(true)
|
||||
.setLabel(l.messages.chooseATicket)
|
||||
.setLabel(placeholder || l.messages.chooseATicket)
|
||||
.setValue("OTChooseTicket")
|
||||
)
|
||||
|
||||
ids.forEach((id) => {
|
||||
const option = configParser.getTicketById(id,true)
|
||||
const roleoption = configParser.getRoleById(id,true)
|
||||
if (option){
|
||||
const selectComponent = new discord.SelectMenuOptionBuilder()
|
||||
const selectComponent = new discord.StringSelectMenuOptionBuilder()
|
||||
.setDefault(false)
|
||||
.setValue("OTnewT"+option.id)
|
||||
|
||||
@@ -35,10 +43,26 @@ exports.getDropdown = (ids) => {
|
||||
}else{
|
||||
if (option.label) selectComponent.setLabel(option.label)
|
||||
if (option.icon) selectComponent.setEmoji(option.icon)
|
||||
if (option.description && option.description.length < 100) selectComponent.setDescription(option.description)
|
||||
}
|
||||
|
||||
dropdown.addOptions(selectComponent)
|
||||
|
||||
}else if (roleoption){
|
||||
const selectComponent = new discord.StringSelectMenuOptionBuilder()
|
||||
.setDefault(false)
|
||||
.setValue("OTnewR"+roleoption.id)
|
||||
|
||||
if (!roleoption.label && !roleoption.icon){
|
||||
selectComponent.setLabel("OT ERROR: no description/emoji")
|
||||
}else{
|
||||
if (roleoption.label) selectComponent.setLabel(roleoption.label)
|
||||
if (roleoption.icon) selectComponent.setEmoji(roleoption.icon)
|
||||
}
|
||||
|
||||
dropdown.addOptions(selectComponent)
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
||||
+35
-8
@@ -14,12 +14,18 @@ const l = bot.language
|
||||
|
||||
|
||||
exports.createEmbed = (id) => {
|
||||
bot.actionRecorder.push({
|
||||
category:"ot.managers.utils",
|
||||
file:"./core/utils/getEmbed.js",
|
||||
time:new Date().getTime(),
|
||||
type:"getembed"
|
||||
})
|
||||
//-----------------------------------
|
||||
//general importing
|
||||
const data = require("./configParser").getConfigMessage(id)
|
||||
/**@type {discord.ButtonBuilder[]}*/
|
||||
var buttons = []
|
||||
/**@type {getButton.rawButtonData[]} */
|
||||
/**@type {import('./configParser').OTAllOptions[]} */
|
||||
var buttonData = []
|
||||
|
||||
data.options.forEach((option) => {
|
||||
@@ -34,18 +40,38 @@ exports.createEmbed = (id) => {
|
||||
//create the embed
|
||||
const embed = new discord.EmbedBuilder()
|
||||
.setTitle(data.name)
|
||||
if (data.enableFooter) embed.setFooter({text:data.footer})
|
||||
|
||||
try {
|
||||
const footerimg = (data.enableFooter && data.enableFooterImage) ? data.footerImage : undefined
|
||||
if (data.enableFooter) embed.setFooter({text:data.footer,iconURL:footerimg})
|
||||
}catch{
|
||||
bot.errorLog.log("info","FOOTER FAILED TO LOAD, probably invalid url!")
|
||||
}
|
||||
|
||||
try {
|
||||
if (data.enableThumbnail) embed.setThumbnail(data.thumbnail)
|
||||
}catch{
|
||||
bot.errorLog.log("info","THUMBNAIL FAILED TO LOAD, probably invalid url!")
|
||||
}
|
||||
|
||||
try {
|
||||
if (data.enableImage) embed.setImage(data.image)
|
||||
}catch{
|
||||
bot.errorLog.log("info","IMAGE FAILED TO LOAD, probably invalid url!")
|
||||
}
|
||||
|
||||
if (data.enableCustomColor){
|
||||
embed.setColor(data.color)
|
||||
}else{
|
||||
embed.setColor(config.main_color)
|
||||
embed.setColor(config.color)
|
||||
}
|
||||
|
||||
if (data.other.embedTitleURL.enable) embed.setURL(data.other.embedTitleURL.url)
|
||||
|
||||
var description = data.description
|
||||
if (data.enableTicketExplaination){
|
||||
description = description+"\n\n__"+l.messages.chooseCategory+"__\n"
|
||||
if (data.other.enableTicketExplaination){
|
||||
const chooseCategoryMSG = data.other.customCategoryText.enable ? data.other.customCategoryText.text : l.messages.chooseATicket
|
||||
description = description+"\n\n__"+chooseCategoryMSG+"__\n"
|
||||
|
||||
var ticketExplainations = []
|
||||
buttonData.forEach((button) => {
|
||||
@@ -56,8 +82,8 @@ exports.createEmbed = (id) => {
|
||||
description = description+ticketExplainations.join("\n\n")
|
||||
}
|
||||
|
||||
if (data.enableMaxTicketsWarning){
|
||||
description = description+"\n\n"+l.commands.maxTicketWarning.replace("{0}",config.system.max_allowed_tickets)
|
||||
if (data.other.enableMaxTicketsWarning){
|
||||
description = description+"\n\n"+l.commands.maxTicketWarning.replace("{0}",config.system.maxAmountOfTickets)
|
||||
}
|
||||
|
||||
if (description) embed.setDescription(description)
|
||||
@@ -92,7 +118,8 @@ exports.createEmbed = (id) => {
|
||||
//create the component IF DROPDOWN is true
|
||||
}else{
|
||||
const ids = data.options
|
||||
const dropdown = require("./getDropdown").getDropdown(ids)
|
||||
const customPlaceholder = data.other.customDropdownPlaceholder.enable ? data.other.customDropdownPlaceholder.text : false
|
||||
const dropdown = require("./getDropdown").getDropdown(ids,customPlaceholder)
|
||||
var componentRows = [
|
||||
new discord.ActionRowBuilder()
|
||||
.setComponents(dropdown)
|
||||
|
||||
+29
-46
@@ -1,66 +1,49 @@
|
||||
const storage = require("../../index").storage
|
||||
|
||||
/**@typedef {{type:String,data:[{key:String,value:String}]}} hiddenData */
|
||||
/**@typedef {[{key:String,value:String}]} hiddenData */
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {String} messageContent
|
||||
* @param {String} channelid
|
||||
* @returns {hiddenData}
|
||||
*/
|
||||
|
||||
exports.readHiddenData = (messageContent) => {
|
||||
//ticketdata//type:123|userid:456)
|
||||
const rawhidden = messageContent.split("[ ](OTDATA|")[1]
|
||||
const rawhidden2 = rawhidden.split("//")
|
||||
exports.readHiddenData = (channelid) => {
|
||||
const content = storage.get("HIDDENDATA",channelid)
|
||||
if (!content) return []
|
||||
|
||||
const datatype = rawhidden2[0]
|
||||
var rawhiddendata = rawhidden2[1]
|
||||
var rawhiddendataArray = rawhiddendata.split("")
|
||||
rawhiddendataArray.pop()
|
||||
|
||||
rawhiddendata = rawhiddendataArray.join("")
|
||||
|
||||
const splittedData = rawhiddendata.split("|")
|
||||
|
||||
const resultData = []
|
||||
splittedData.forEach((data) => {
|
||||
// type:123
|
||||
const dataresult = data.split(":")
|
||||
|
||||
resultData.push({key:dataresult[0],value:dataresult[1]})
|
||||
})
|
||||
|
||||
return {type:datatype,data:resultData}
|
||||
try {
|
||||
return JSON.parse(content)
|
||||
} catch {
|
||||
return []
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {String} type
|
||||
* @param {String} channelid
|
||||
* @param {[{key:String,value:String}]} data
|
||||
* @returns {String}
|
||||
* @returns {Boolean}
|
||||
*/
|
||||
exports.writeHiddenData = (type,data) => {
|
||||
const dataValues = []
|
||||
data.forEach((d) => {
|
||||
dataValues.push(d.key+":"+d.value)
|
||||
})
|
||||
|
||||
const datastring = dataValues.join("|")
|
||||
|
||||
const result = "[ ](OTDATA|"+type+"//"+datastring+")"
|
||||
|
||||
return result
|
||||
exports.writeHiddenData = (channelid,data) => {
|
||||
try {
|
||||
storage.set("HIDDENDATA",channelid,JSON.stringify(data))
|
||||
return true
|
||||
} catch {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {String} description
|
||||
* @returns {{description:String,hiddenData:hiddenData}}
|
||||
* @param {String} channelid
|
||||
* @returns {Boolean}
|
||||
*/
|
||||
exports.removeHiddenData = (description) => {
|
||||
const hiddenData = this.readHiddenData(description)
|
||||
|
||||
const splitted = description.split("[ ](OTDATA")
|
||||
const original = splitted[0]
|
||||
|
||||
return {description:original,hiddenData:hiddenData}
|
||||
exports.deleteHiddenData = (channelid) => {
|
||||
try {
|
||||
storage.delete("HIDDENDATA",channelid)
|
||||
return true
|
||||
} catch {
|
||||
return false
|
||||
}
|
||||
}
|
||||
+125
-3
@@ -3,13 +3,135 @@ const bot = require('../../index')
|
||||
const client = bot.client
|
||||
const config = bot.config
|
||||
const log = bot.errorLog.log
|
||||
const axios = require("axios").default
|
||||
const fs = require("fs")
|
||||
|
||||
const loadChalk = async () => {
|
||||
return await (await import("chalk")).default
|
||||
}
|
||||
|
||||
module.exports = async () => {
|
||||
const chalk = await loadChalk()
|
||||
//OTLiveStatus
|
||||
/**@typedef {[{style:[{title:String,titleColor:"normal"|"red"|"green"|"blue"|"yellow"|"white"|"gray"|"magenta"|"cyan",description:String,descriptionColor:"normal"|"red"|"green"|"blue"|"yellow"|"white"|"gray"|"magenta"|"cyan"}],active:{versions:String[],languages:String[],usingPlugins:["yes"|"no"|"both"],usingSlashCommands:["yes"|"no"|"both"],transcripts:["html"|"text"|"both"]}}]} OTLiveStatus */
|
||||
|
||||
//LIVESTATUS SOON
|
||||
//OTLiveStatusError
|
||||
/**@typedef {{bot:{id:String,pfp:String,name:String}, openticket:{version:String,language:String, slashcmds:Boolean,transcripts:false|"text"|"html",config:{system:{},options:{},messages:{},transcripts:{}},plugins:String[],pluginload:{success:Number,error:Number,total:Number}}, details:{actions:[{type:String,category:String,file:String,time:Number}],errortime:Number}, error:String}} OTLiveStatusError */
|
||||
|
||||
/**@type {[{type:String, category:String, file:String, time:Number}]} */
|
||||
exports.actionRecorder = []
|
||||
|
||||
//================================================================
|
||||
//=========================FUNCTIONS==============================
|
||||
//================================================================
|
||||
|
||||
const getSlashEnabled = () => {
|
||||
if (!fs.existsSync("./storage/slashcmdEnabled.txt")) return false
|
||||
if (fs.readFileSync("./storage/slashcmdEnabled.txt").toString() == require("../../package.json").version){
|
||||
return true
|
||||
}else return false
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Boolean} [local=false]
|
||||
* @returns {Promise<OTLiveStatus|false>}
|
||||
*/
|
||||
const getLivestatus = (local) => {
|
||||
return new Promise((resolve,reject) => {
|
||||
if (local){
|
||||
try {
|
||||
const livestatus = require("../../livestatus.json")
|
||||
if (!livestatus) return resolve(false)
|
||||
resolve(livestatus)
|
||||
}catch{
|
||||
return resolve(false)
|
||||
}
|
||||
}else{
|
||||
try {
|
||||
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)
|
||||
resolve(livestatus)
|
||||
})
|
||||
}catch{
|
||||
return resolve(false)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
var globalPluginData = {total:0,error:0,success:0}
|
||||
|
||||
//announcer
|
||||
/**@param {{total:Number,error:Number,success:Number}} pluginData*/
|
||||
exports.run = async (pluginData) => {
|
||||
const chalk = await loadChalk()
|
||||
globalPluginData = pluginData
|
||||
const res = await getLivestatus(process.argv.some((v) => v == "--localstatus"))
|
||||
if (!res) return false
|
||||
if (res.length == 0) return
|
||||
|
||||
/**@type {[{title:String,titleColor:"normal"|"red"|"green"|"blue"|"yellow"|"white"|"gray"|"magenta"|"cyan",description:String,descriptionColor:"normal"|"red"|"green"|"blue"|"yellow"|"white"|"gray"|"magenta"|"cyan"}]} */
|
||||
const activeStyles = []
|
||||
res.forEach((announcement) => {
|
||||
const a = announcement.active
|
||||
|
||||
const isLanguage = a.languages.includes(config.languageFile) || a.languages.includes("all")
|
||||
const isVersion = a.versions.includes(require("../../package.json").version)
|
||||
|
||||
var tsenabled = (bot.tsconfig.sendTranscripts.enableChannel || bot.tsconfig.sendTranscripts.enableDM)
|
||||
var tsmode = bot.tsconfig.sendTranscripts.useHTMLtranscripts ? "html" : "text"
|
||||
const isTranscript = (a.transcripts.includes("html") && tsmode == "html" && tsenabled) || (a.transcripts.includes("text") && tsmode == "text" && tsenabled) || (a.transcripts.includes("both") && tsenabled)
|
||||
const isPlugins = (a.usingPlugins.includes("yes") && pluginData.total > 0) || (a.usingPlugins.includes("no") && pluginData.total == 0) || (a.usingPlugins.includes("both"))
|
||||
const isSlashCMD = (a.usingSlashCommands.includes("yes") && getSlashEnabled()) || (a.usingSlashCommands.includes("no") && !getSlashEnabled()) || (a.usingSlashCommands.includes("both"))
|
||||
|
||||
if (!isLanguage || !isVersion || !isTranscript || !isPlugins || !isSlashCMD) return
|
||||
announcement.style.forEach((s) => activeStyles.push(s))
|
||||
})
|
||||
const final = []
|
||||
activeStyles.forEach((style) => {
|
||||
const dc = style.descriptionColor
|
||||
const tempd = style.description.split("\n")
|
||||
const tc = style.titleColor
|
||||
const t = "["+style.title+"]"
|
||||
const tempd2 = []
|
||||
tempd.forEach((tmpd,i) => {
|
||||
if (i > 0){
|
||||
var newtext = tmpd
|
||||
var i2 = 0
|
||||
while(i2 < t.length+1){
|
||||
newtext = " "+newtext
|
||||
i2++
|
||||
}
|
||||
tempd2.push(newtext)
|
||||
}else{
|
||||
tempd2.push(tmpd)
|
||||
}
|
||||
})
|
||||
const d = tempd2.join("\n")
|
||||
|
||||
|
||||
var fd = d
|
||||
if (dc == "normal" || dc == "white") fd = chalk.white(d)
|
||||
if (dc == "red") fd = chalk.red(d)
|
||||
if (dc == "yellow") fd = chalk.yellow(d)
|
||||
if (dc == "green") fd = chalk.green(d)
|
||||
if (dc == "blue") fd = chalk.blue(d)
|
||||
if (dc == "gray") fd = chalk.gray(d)
|
||||
if (dc == "magenta") fd = chalk.magenta(d)
|
||||
if (dc == "cyan") fd = chalk.cyan(d)
|
||||
|
||||
var ft = t
|
||||
if (tc == "normal" || tc == "white") ft = chalk.white(t)
|
||||
if (tc == "red") ft = chalk.red(t)
|
||||
if (tc == "yellow") ft = chalk.yellow(t)
|
||||
if (tc == "green") ft = chalk.green(t)
|
||||
if (tc == "blue") ft = chalk.blue(t)
|
||||
if (tc == "gray") ft = chalk.gray(t)
|
||||
if (tc == "magenta") ft = chalk.magenta(t)
|
||||
if (tc == "cyan") ft = chalk.cyan(t)
|
||||
|
||||
final.push(ft+" "+fd)
|
||||
})
|
||||
|
||||
console.log(final.join("\n\n"))
|
||||
}
|
||||
@@ -12,19 +12,58 @@ 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:"global"
|
||||
})
|
||||
const permsmember = client.guilds.cache.find(g => g.id == guildid).members.cache.find(m => m.id == memberid)
|
||||
if (config.main_adminroles.some((item)=>{return permsmember.roles.cache.has(item)}) == false && !permsmember.permissions.has("Administrator") && !permsmember.permissions.has("ManageGuild")){
|
||||
if (config.adminRoles.some((item)=>{return permsmember.roles.cache.has(item)}) == false && !permsmember.permissions.has("Administrator") && !permsmember.permissions.has("ManageGuild")){
|
||||
return false
|
||||
}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
|
||||
* @returns {Boolean}
|
||||
*/
|
||||
exports.sendUserNoPerms = (user) => {
|
||||
bot.actionRecorder.push({
|
||||
category:"ot.managers.permissionChecker",
|
||||
file:"./core/permissionChecker.js",
|
||||
time:new Date().getTime(),
|
||||
type:"sendusernoperms"
|
||||
})
|
||||
try {
|
||||
user.send({embeds:[bot.errorLog.noPermsMessage(user)]})
|
||||
return true
|
||||
@@ -39,6 +78,12 @@ exports.sendUserNoPerms = (user) => {
|
||||
* @returns {Boolean}
|
||||
*/
|
||||
exports.sendUserNoTicket = (user) => {
|
||||
bot.actionRecorder.push({
|
||||
category:"ot.managers.permissionChecker",
|
||||
file:"./core/permissionChecker.js",
|
||||
time:new Date().getTime(),
|
||||
type:"sendusernoticket"
|
||||
})
|
||||
try {
|
||||
user.send({embeds:[bot.errorLog.notInATicket]})
|
||||
return true
|
||||
@@ -53,6 +98,12 @@ exports.sendUserNoPerms = (user) => {
|
||||
* @returns {Boolean}
|
||||
*/
|
||||
exports.sendUserNoDelete = (user) => {
|
||||
bot.actionRecorder.push({
|
||||
category:"ot.managers.permissionChecker",
|
||||
file:"./core/permissionChecker.js",
|
||||
time:new Date().getTime(),
|
||||
type:"sendusernodelete"
|
||||
})
|
||||
try {
|
||||
user.send({embeds:[bot.errorLog.noPermsDelete(user)]})
|
||||
return true
|
||||
@@ -68,6 +119,12 @@ exports.sendUserNoPerms = (user) => {
|
||||
* @returns {Boolean}
|
||||
*/
|
||||
exports.sendChannelNoPerms = (channel,user) => {
|
||||
bot.actionRecorder.push({
|
||||
category:"ot.managers.permissionChecker",
|
||||
file:"./core/permissionChecker.js",
|
||||
time:new Date().getTime(),
|
||||
type:"sendchannelnoperms"
|
||||
})
|
||||
try {
|
||||
channel.send({embeds:[bot.errorLog.noPermsMessage(user)]})
|
||||
return true
|
||||
@@ -83,6 +140,12 @@ exports.sendUserNoPerms = (user) => {
|
||||
* @returns {Boolean}
|
||||
*/
|
||||
exports.sendChannelNoTicket = (channel,user) => {
|
||||
bot.actionRecorder.push({
|
||||
category:"ot.managers.permissionChecker",
|
||||
file:"./core/permissionChecker.js",
|
||||
time:new Date().getTime(),
|
||||
type:"sendchannelnoticket"
|
||||
})
|
||||
try {
|
||||
channel.send({embeds:[bot.errorLog.notInATicket]})
|
||||
return true
|
||||
@@ -98,6 +161,12 @@ exports.sendUserNoPerms = (user) => {
|
||||
* @returns {Boolean}
|
||||
*/
|
||||
exports.sendChannelNoDelete = (channel,user) => {
|
||||
bot.actionRecorder.push({
|
||||
category:"ot.managers.permissionChecker",
|
||||
file:"./core/permissionChecker.js",
|
||||
time:new Date().getTime(),
|
||||
type:"sendchannelnodelete"
|
||||
})
|
||||
try {
|
||||
channel.send({embeds:[bot.errorLog.noPermsDelete(user)]})
|
||||
return true
|
||||
|
||||
@@ -1,22 +1,48 @@
|
||||
// __________ __________ ___________ ____ ____
|
||||
// / ____ \ / ______ \ / | | \ | |
|
||||
// | / \ | | | | | | |_______| | \ | |
|
||||
// | | | | | |____| | | | | |\ \ | |
|
||||
// | | | | | ________/ | |______ | | \ \ | |
|
||||
// | | | | | | | _____| | | \ \ | |
|
||||
// | | | | | | | | | | \ \ | |
|
||||
// | | | | | | | |________ | | \ \| |
|
||||
// | \____/ | | | | | | | \ |
|
||||
// \__________/ |__| \__________| |__| \___|
|
||||
/**
|
||||
____ _____ ______ _ _ _______ _____ _____ _ ________ _______
|
||||
/ __ \| __ \| ____| \ | | |__ __|_ _/ ____| |/ / ____|__ __|
|
||||
| | | | |__) | |__ | \| | | | | || | | ' /| |__ | |
|
||||
| | | | ___/| __| | . ` | | | | || | | < | __| | |
|
||||
| |__| | | | |____| |\ | | | _| || |____| . \| |____ | |
|
||||
\____/|_| |______|_| \_| |_| |_____\_____|_|\_\______| |_|
|
||||
|
||||
Hey! we are looking for you!
|
||||
Do you speak a language that isn't yet in our /languages directory
|
||||
or do you speak one that isn't up-to-date? Open Ticket needs
|
||||
translators for lots of different languages!
|
||||
Feel free to join our translator team and help us improve Open Ticket!
|
||||
|
||||
|
||||
|
||||
|
||||
SUGGESTING NEW FEATURES:
|
||||
=====================
|
||||
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.5.3 - © DJdj Development
|
||||
|
||||
discord: https://discord.dj-dj.be
|
||||
website: https://www.dj-dj.be
|
||||
github: https://otgithub.dj-dj.be
|
||||
support e-mail: support@dj-dj.be
|
||||
|
||||
Config files:
|
||||
./config.json
|
||||
./transcriptconfig.json
|
||||
|
||||
Send ./openticketdebug.txt when there are errors!
|
||||
*/
|
||||
|
||||
const discord = require("discord.js")
|
||||
const fs = require('fs')
|
||||
const {GatewayIntentBits,Partials} = discord
|
||||
const APIBase = require("./core/api/modules/base")
|
||||
if (APIBase.embeddedMode){
|
||||
var tempClient = APIBase.clientLocation
|
||||
}else{
|
||||
var tempClient = new discord.Client({
|
||||
const client = new discord.Client({
|
||||
intents:[
|
||||
GatewayIntentBits.DirectMessages,
|
||||
GatewayIntentBits.GuildInvites,
|
||||
@@ -26,64 +52,55 @@ if (APIBase.embeddedMode){
|
||||
GatewayIntentBits.MessageContent
|
||||
],
|
||||
partials:[Partials.Channel,Partials.Message]
|
||||
})
|
||||
}
|
||||
/**@type {discord.Client} */
|
||||
const client = tempClient
|
||||
})
|
||||
exports.client = client
|
||||
client.setMaxListeners(50)
|
||||
client.setMaxListeners(100)
|
||||
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
|
||||
|
||||
if (process.argv.some((v) => v == "--devconfig")){
|
||||
async function logFLAGS(){
|
||||
const chalk = await (await import("chalk")).default
|
||||
console.log(chalk.blue("[FLAGS] => used dev config instead of normal config"))
|
||||
}; logFLAGS()
|
||||
isDevConfig = true
|
||||
try{
|
||||
tempconfig = require("./devConfig.json")
|
||||
tempconfig = require("./devconfig.json")
|
||||
}catch{tempconfig = require("./config.json")}
|
||||
}else{
|
||||
tempconfig = require("./config.json")
|
||||
}
|
||||
if (process.argv.some((v) => v == "--nochecker")){
|
||||
async function logFLAGS(){
|
||||
const chalk = await (await import("chalk")).default
|
||||
console.log(chalk.blue("[FLAGS] => disabled checker.js"))
|
||||
}; logFLAGS()
|
||||
}
|
||||
if (process.argv.some((v) => v == "--debug")){
|
||||
async function logFLAGS(){
|
||||
const chalk = await (await import("chalk")).default
|
||||
console.log(chalk.blue("[FLAGS] => enabled DEBUG mode"))
|
||||
}; logFLAGS()
|
||||
}
|
||||
if (process.argv.some((v) => v == "--debug")) console.log("[TEMP_DEBUG]","loaded flags")
|
||||
|
||||
exports.developerConfig = isDevConfig
|
||||
const language = require("./core/languageManager").language
|
||||
exports.language = language
|
||||
if (process.argv.some((v) => v == "--debug")) console.log("[TEMP_DEBUG]","loaded language")
|
||||
|
||||
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")
|
||||
const log = this.errorLog.log
|
||||
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")
|
||||
}
|
||||
@@ -94,92 +111,175 @@ 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")
|
||||
var statusSet = false
|
||||
this.actionRecorder.push({
|
||||
category:"ot.managers.djs",
|
||||
file:"index.js",
|
||||
time:new Date().getTime(),
|
||||
type:"client.loggedin.success"
|
||||
})
|
||||
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
|
||||
log("system","loaded status",[{key:"type",value:type},{key:"text",value:text}])
|
||||
client.user.setActivity({
|
||||
type:getTypeEnum(type),
|
||||
state:(text.toLowerCase() == "custom") ? text : undefined,
|
||||
name:text
|
||||
})
|
||||
}
|
||||
this.errorLog.log("debug","bot status loaded")
|
||||
this.actionRecorder.push({
|
||||
category:"ot.managers.djs",
|
||||
file:"index.js",
|
||||
time:new Date().getTime(),
|
||||
type:"client.setstatus.success"
|
||||
})
|
||||
|
||||
const chalk = await (await import("chalk")).default
|
||||
|
||||
if (!process.argv[2]){
|
||||
console.log(chalk.red("WELCOME TO OPEN TICKET!"))
|
||||
require("./core/startscreen").run()
|
||||
this.actionRecorder.push({
|
||||
category:"ot.managers.main",
|
||||
file:"index.js",
|
||||
time:new Date().getTime(),
|
||||
type:"startscreen.success"
|
||||
})
|
||||
|
||||
if (!process.argv[2] || (process.argv[2] && !process.argv[2].startsWith("slash"))){
|
||||
//normal start
|
||||
this.errorLog.log("debug","loaded console interface")
|
||||
log("info","open ticket ready",[{key:"version",value:require("./package.json").version},{key:"language",value:config.languagefile}])
|
||||
require("./core/utils/liveStatus")()
|
||||
|
||||
console.log(chalk.blue("\n\nlogs:")+"\n============")
|
||||
if (config.status.enabled){
|
||||
setStatus(config.status.type,config.status.text)
|
||||
}
|
||||
|
||||
log("system","bot logged in!")
|
||||
this.actionRecorder.push({
|
||||
category:"ot.managers.main",
|
||||
file:"index.js",
|
||||
time:new Date().getTime(),
|
||||
type:"startmode.normal"
|
||||
})
|
||||
|
||||
await client.guilds.cache.find((g) => g.id == config.server_id).members.fetch()
|
||||
return
|
||||
var updatingSlash = false
|
||||
if (fs.existsSync("./storage/slashcmdEnabled.txt")){
|
||||
/**@type {"true"|"false"|String} */
|
||||
const data = fs.readFileSync("./storage/slashcmdEnabled.txt").toString()
|
||||
if (data === require("./package.json").version){
|
||||
require("./core/slashSystem/autoSlashUpdate")()
|
||||
updatingSlash = true
|
||||
|
||||
}else if ((data != require("./package.json").version) && (data != "false")){
|
||||
require("./core/slashSystem/slashEnable")(true)
|
||||
updatingSlash = true
|
||||
}
|
||||
|
||||
if (process.argv[2] == "d"){
|
||||
if (config.status.enabled){
|
||||
setStatus(config.status.type,config.status.text)
|
||||
}
|
||||
}
|
||||
|
||||
if (!process.argv[2].startsWith("slash")){
|
||||
console.log(chalk.red("WELCOME TO OPEN TICKET!"))
|
||||
this.errorLog.log("debug","loaded console interface")
|
||||
log("info","open ticket ready",[{key:"version",value:require("./package.json").version},{key:"language",value:config.languagefile}])
|
||||
require("./core/utils/liveStatus")()
|
||||
|
||||
console.log(chalk.blue("\n\nlogs:")+"\n============")
|
||||
if (config.status.enabled){
|
||||
setStatus(config.status.type,config.status.text)
|
||||
}
|
||||
|
||||
log("system","bot logged in!")
|
||||
|
||||
await client.guilds.cache.find((g) => g.id == config.server_id).members.fetch()
|
||||
}else{
|
||||
console.log(chalk.red("STARTING IN ")+chalk.blue("SLASH MODE")+chalk.red("..."))
|
||||
if (process.argv.some((v) => v == "--noslash")){
|
||||
fs.writeFileSync("./storage/slashcmdEnabled.txt","false")
|
||||
}else{
|
||||
fs.writeFileSync("./storage/slashcmdEnabled.txt",require("./package.json").version)
|
||||
require("./core/slashSystem/slashEnable")(true)
|
||||
updatingSlash = true
|
||||
}
|
||||
}
|
||||
this.actionRecorder.push({
|
||||
category:"ot.managers.main",
|
||||
file:"index.js",
|
||||
time:new Date().getTime(),
|
||||
type:"slashcmd.autoupdate.success"
|
||||
})
|
||||
|
||||
try {
|
||||
await client.guilds.cache.find((g) => g.id == config.serverId).members.fetch()
|
||||
}catch{
|
||||
this.errorLog.log("info","tried to cache user information, failed!")
|
||||
}
|
||||
require("./core/startscreen").headerDataReady(chalk,config.status,updatingSlash,false)
|
||||
|
||||
}else{
|
||||
//slash command activation using node index.js slash (enable|disable)
|
||||
require("./core/startscreen").headerDataReady(chalk,config.status,updatingSlash,true)
|
||||
this.errorLog.log("debug","slashmode activated")
|
||||
console.log("logs:\n================")
|
||||
console.log("client logged in...")
|
||||
console.log("loading files...")
|
||||
if (process.argv[3] == "enable"){
|
||||
console.log(chalk.green("switching to slashEnable.js"))
|
||||
this.actionRecorder.push({
|
||||
category:"ot.managers.main",
|
||||
file:"index.js",
|
||||
time:new Date().getTime(),
|
||||
type:"startmode.slash.enable"
|
||||
})
|
||||
require("./core/slashSystem/slashEnable")()
|
||||
}else if (process.argv[3] == "disable"){
|
||||
console.log(chalk.green("switching to slashDisable.js"))
|
||||
this.actionRecorder.push({
|
||||
category:"ot.managers.main",
|
||||
file:"index.js",
|
||||
time:new Date().getTime(),
|
||||
type:"startmode.slash.disable"
|
||||
})
|
||||
require("./core/slashSystem/slashDisable")()
|
||||
}else{
|
||||
console.log(chalk.red("Internal Error: unknown slash mode!"))
|
||||
console.log(chalk.bgRed("[SLASH CMD MANAGER]: unknown slash command action!"))
|
||||
process.exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
//load plugins
|
||||
//LOAD PLUGINS (after client login)
|
||||
this.actionRecorder.push({
|
||||
category:"ot.managers.plugins",
|
||||
file:"./core/api/pluginlauncher.js",
|
||||
time:new Date().getTime(),
|
||||
type:"plugins.loading"
|
||||
})
|
||||
require("./core/api/pluginlauncher")()
|
||||
this.actionRecorder.push({
|
||||
category:"ot.managers.plugins",
|
||||
file:"./core/api/pluginlauncher.js",
|
||||
time:new Date().getTime(),
|
||||
type:"plugins.success"
|
||||
})
|
||||
this.errorLog.log("debug","loading plugins")
|
||||
})
|
||||
if (!require("./core/api/api.json").disable.checkerjs.all) require("./core/checker").checker()
|
||||
|
||||
//LOAD CHECKER.JS
|
||||
if (!require("./core/api/api.json").disable.checkerjs.all){
|
||||
this.actionRecorder.push({
|
||||
category:"ot.managers.main",
|
||||
file:"./core/checker.js",
|
||||
time:new Date().getTime(),
|
||||
type:"checker.loading"
|
||||
})
|
||||
require("./core/checker").checker()
|
||||
this.errorLog.log("debug","loading checker.js")
|
||||
this.errorLog.log("debug","checking config...")
|
||||
this.actionRecorder.push({
|
||||
category:"ot.managers.main",
|
||||
file:"./core/checker.js",
|
||||
time:new Date().getTime(),
|
||||
type:"checker.success"
|
||||
})
|
||||
}
|
||||
|
||||
//LOAD COMMANDS & CORE
|
||||
if (process.argv[2] && process.argv[2].startsWith("slash")){
|
||||
//do nothing
|
||||
}else{
|
||||
|
||||
this.actionRecorder.push({
|
||||
category:"ot.managers.loader",
|
||||
file:"./index.js",
|
||||
time:new Date().getTime(),
|
||||
type:"commands.loading"
|
||||
})
|
||||
this.errorLog.log("debug","LOADING COMMANDS")
|
||||
//commands
|
||||
require('./commands/ticket')()
|
||||
@@ -192,34 +292,79 @@ if (process.argv[2] && process.argv[2].startsWith("slash")){
|
||||
require("./commands/reopen")()
|
||||
require("./commands/claim")()
|
||||
require("./commands/unclaim")()
|
||||
require("./commands/change")()
|
||||
require("./commands/stats")()
|
||||
|
||||
this.actionRecorder.push({
|
||||
category:"ot.managers.loader",
|
||||
file:"./index.js",
|
||||
time:new Date().getTime(),
|
||||
type:"commands.success"
|
||||
})
|
||||
|
||||
this.actionRecorder.push({
|
||||
category:"ot.managers.loader",
|
||||
file:"./index.js",
|
||||
time:new Date().getTime(),
|
||||
type:"core.loading"
|
||||
})
|
||||
this.errorLog.log("debug","LOADING CORE")
|
||||
//core
|
||||
require('./core/ticketActions/ticketOpener')()
|
||||
require("./core/reactionRoles")()
|
||||
require("./core/ticketActions/ticketAutoclose")()
|
||||
|
||||
this.errorLog.log("debug","LOADING INTERACTION HANDLERS")
|
||||
//InteractionHandlers
|
||||
require("./core/interactionHandlers/handlers/handlers")()
|
||||
|
||||
//require("./test")()
|
||||
this.actionRecorder.push({
|
||||
category:"ot.managers.loader",
|
||||
file:"./index.js",
|
||||
time:new Date().getTime(),
|
||||
type:"core.success"
|
||||
})
|
||||
}
|
||||
|
||||
//LOAD API
|
||||
this.actionRecorder.push({
|
||||
category:"ot.managers.loader",
|
||||
file:"./index.js",
|
||||
time:new Date().getTime(),
|
||||
type:"api.loading"
|
||||
})
|
||||
this.errorLog.log("debug","loading api")
|
||||
const APIEvents = require("./core/api/modules/events")
|
||||
const APIConfig = require("./core/api/api.json")
|
||||
|
||||
this.actionRecorder.push({
|
||||
category:"ot.managers.loader",
|
||||
file:"./index.js",
|
||||
time:new Date().getTime(),
|
||||
type:"api.success"
|
||||
})
|
||||
|
||||
//ERROR SYSTEM
|
||||
this.actionRecorder.push({
|
||||
category:"ot.managers.loader",
|
||||
file:"./index.js",
|
||||
time:new Date().getTime(),
|
||||
type:"debugsystem.loading"
|
||||
})
|
||||
|
||||
const debugLog = (debugString) => {
|
||||
if (!APIConfig.disable.debug.all && !APIConfig.disable.debug.debuglogs){
|
||||
const content = fs.existsSync("./openticketdebug.txt") ? fs.readFileSync("./openticketdebug.txt").toString() : "==========================\n<OPEN TICKET DEBUG FILE:>\n=========================="
|
||||
fs.writeFileSync("./openticketdebug.txt",content+"\nDEBUG: "+debugString)
|
||||
}
|
||||
this.errorLog.clearDebugFile()
|
||||
}
|
||||
const errorLog = (errorString,stack) => {
|
||||
if (!APIConfig.disable.debug.all){
|
||||
const content = fs.existsSync("./openticketdebug.txt") ? fs.readFileSync("./openticketdebug.txt").toString() : "==========================\n<OPEN TICKET DEBUG FILE:>\n=========================="
|
||||
fs.writeFileSync("./openticketdebug.txt",content+"\nERROR: "+errorString+" STACK: "+stack)
|
||||
}
|
||||
this.errorLog.clearDebugFile()
|
||||
}
|
||||
this.errorLog.log("debug","OT error system loaded successfully")
|
||||
|
||||
@@ -239,5 +384,62 @@ process.on("uncaughtException",async (error,origin) => {
|
||||
APIEvents.onError(error.name+": "+error.message,new Date())
|
||||
})
|
||||
|
||||
if (!APIBase.embeddedMode) client.login(config.auth_token)
|
||||
this.actionRecorder.push({
|
||||
category:"ot.managers.loader",
|
||||
file:"./index.js",
|
||||
time:new Date().getTime(),
|
||||
type:"debugsystem.success"
|
||||
})
|
||||
|
||||
//PARSE .env FILE FROM DOTENV LIB
|
||||
//npm i dotenv
|
||||
//https://github.com/motdotla/dotenv
|
||||
/**@param {Buffer} src */
|
||||
const loadFromDotEnv = (src) => {
|
||||
const LINE = /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg
|
||||
|
||||
const obj = {}
|
||||
|
||||
// Convert buffer to string
|
||||
let lines = src.toString()
|
||||
|
||||
// Convert line breaks to same format
|
||||
lines = lines.replace(/\r\n?/mg, '\n')
|
||||
|
||||
let match
|
||||
while ((match = LINE.exec(lines)) != null) {
|
||||
const key = match[1]
|
||||
|
||||
// Default undefined or null to empty string
|
||||
let value = (match[2] || '')
|
||||
|
||||
// Remove whitespace
|
||||
value = value.trim()
|
||||
|
||||
// Check if double quoted
|
||||
const maybeQuote = value[0]
|
||||
|
||||
// Remove surrounding quotes
|
||||
value = value.replace(/^(['"`])([\s\S]*)\1$/mg, '$2')
|
||||
|
||||
// Expand newlines if double quoted
|
||||
if (maybeQuote === '"') {
|
||||
value = value.replace(/\\n/g, '\n')
|
||||
value = value.replace(/\\r/g, '\r')
|
||||
}
|
||||
|
||||
// Add to object
|
||||
obj[key] = value
|
||||
}
|
||||
process.env.TOKEN = obj.TOKEN
|
||||
}
|
||||
|
||||
//LOGIN SYSTEM
|
||||
if (config.token.fromENV){
|
||||
loadFromDotEnv(fs.readFileSync(".env"))
|
||||
client.login(process.env.TOKEN)
|
||||
}else{
|
||||
client.login(config.token.value)
|
||||
}
|
||||
|
||||
this.errorLog.log("debug","login with token")
|
||||
+93
-41
@@ -1,33 +1,43 @@
|
||||
{
|
||||
"_CREDITS":"deqressing",
|
||||
"_INFO":"This file is a translation for open ticket 3.5.3",
|
||||
|
||||
"errors": {
|
||||
"missingArgsTitle": "قيمة غير صالحة!",
|
||||
"missingArgsDescription": "قيمة مفقودة",
|
||||
"noPermsTitle": "ليس لديك برمشنات !",
|
||||
"noPermsDescription": "أنت بحاجة الى برمشن `ADMINISTRATOR` او أن تكون في قائمة المسموح بهم!",
|
||||
"noPermsDelete": "فقط الإداريين يمكنهم حذف التكت!",
|
||||
"chooseFromListTitle": "Invalid ID",
|
||||
"noPermsDelete": "فقط الإداريين يمكنهم حذف التيكت!",
|
||||
"chooseFromListTitle": "الايدي غير صحيح!",
|
||||
"chooseFromListDescription": "قم بأختيار أحد من الأيديات من الأسفل:",
|
||||
"boterror": "خلل في البوت !",
|
||||
"notInTicketTitle": "انت لست في تكت!",
|
||||
"notInTicketDescription": "هذا الأمر لا يعمل خارج التكت!",
|
||||
"ticketDoesntExist": "هذا التكت لم يعد فعال!",
|
||||
"notInTicketDescription": "هذا الأمر لا يعمل خارج التيكت!",
|
||||
"ticketDoesntExist": "هذا التيكت لم يعد فعال!",
|
||||
"roleDoesntExist": "خطاً ,لم تعد الرتبة موجوده!",
|
||||
"anotherOption": "هذا الخيار ليس التكت و لكنه شيء أخر!",
|
||||
"anotherOption": "هذا الخيار ليس التيكت و لكنه شيء أخر!",
|
||||
"maxAmountTitle": "خطأ , تم الوصول الى الحد الأقصى!",
|
||||
"maxAmountDescription": "لقد وصلت الى الحد الأقصى لعدد التكتات المسموحة بها!\nSo لا يمكنك فتح واحدة أخرى!",
|
||||
"somethingWentWrong": "**هناك خطاً!**\nأعد المحاولة لاحقاً!",
|
||||
"somethingWentWrongTranscript": "هناك خطاً في محاولة طبع التكت!**\nأعد المحاولة لاحقاً!"
|
||||
"maxAmountDescription": "لقد وصلت الى الحد الأقصى لعدد التيكتات المسموحة بها!\nSo لا يمكنك فتح واحدة أخرى!",
|
||||
"somethingWentWrong": "**هناك خطاً!**\nأعد المحاولة لاحقاً!"
|
||||
},
|
||||
"commands": {
|
||||
"userAddedTitle": "تم أضافة {0} من المستخدمين في التكت!",
|
||||
"userRemovedTitle": "تم أزالة {0} من المستخدمين من التكت!",
|
||||
"renameTitle": "تم تغيير أسم التكت الى {0}!",
|
||||
"closeTitle": "تم أغلاق التكت!",
|
||||
"deleteTitle": " جاري حذف التكت...",
|
||||
"reopenTitle": "إعادة فتح التكت!",
|
||||
"claimTitle":"This ticket is now claimed to {0}",
|
||||
"unclaimTitle":"This ticket isn't claimed anymore!",
|
||||
"userAddedTitle": "تم أضافة {0} من المستخدمين في التيكت!",
|
||||
"userRemovedTitle": "تم أزالة {0} من المستخدمين من التيكت!",
|
||||
"renameTitle": "تم تغيير أسم التيكت الى {0}!",
|
||||
"closeTitle": "تم أغلاق التيكت!",
|
||||
"deleteTitle": " جاري حذف التيكت...",
|
||||
"reopenTitle": "إعادة فتح التيكت!",
|
||||
|
||||
"claimTitle":"تم تعيين التيكت الى {0}",
|
||||
"unclaimTitle":"هذا التيكت لم يتم تعيينه لاحد",
|
||||
"changeTitle":"!تم تغيير نوع التيكت الى {0}",
|
||||
|
||||
"statsTitle":"ها هي احصائيات {0}",
|
||||
"autocloseTitle":"سيتم اغلاق التيكت تلقائيا في {0}",
|
||||
"autocloseRejectTitle":"تم الغاء اغلاق التيكت تلقائيا",
|
||||
"autocloseWarn":"هذا يؤثر فقط على التذاكر الغير نشطة",
|
||||
|
||||
"goToTicket":"الذهاب الى التيكت",
|
||||
"ticketWarning": "هذا الأمبد موجود بالفعل في الرسالة بالأسفل!",
|
||||
"maxTicketWarning": "**تحذير:** _يمكنك فقط فتح {0} تكت في الوقت!_"
|
||||
},
|
||||
@@ -37,47 +47,89 @@
|
||||
"header2": "**قم بكتابة أمر `/new` او `/ticket` لفتح تكت!**\n\n",
|
||||
|
||||
"msgCmd": "أنشاء أيمبد مع الأزرار. (الأداريين فقط)",
|
||||
"renameCmd": "إعادة تسمية التكت. (بدون مسافات)",
|
||||
"closeCmd": "أغلاق التكت.",
|
||||
"deleteCmd": "حذف التكت.",
|
||||
"addCmd": "إضافة مستخدم الى التكت.",
|
||||
"removeCmd": "إزالة مستخدم من التكت.",
|
||||
"reopenCmd": "إعادة فتح تكت بعد إغلاقة."
|
||||
"renameCmd": "إعادة تسمية التيكت. (بدون مسافات)",
|
||||
"closeCmd": "أغلاق التيكت.",
|
||||
"deleteCmd": "حذف التيكت.",
|
||||
"addCmd": "إضافة مستخدم الى التيكت.",
|
||||
"removeCmd": "إزالة مستخدم من التيكت.",
|
||||
"reopenCmd": "إعادة فتح تكت بعد إغلاقة.",
|
||||
"changeCmd":"تغيير نوع التيكت.",
|
||||
"claimCmd":"تعيينك لتيكت معين.",
|
||||
"unclaimCmd":"الغاء التغيين لتيكت معين",
|
||||
"statsCmd":"اضهار احصائيات التيكت",
|
||||
"autocloseCmd":"قم بضبط مؤقت لاغلاق التيكت تلقائياً"
|
||||
},
|
||||
"buttons": {
|
||||
"close": "إغلاق التكت",
|
||||
"delete": "حذف التكت",
|
||||
"reopen": "إعادة فتح التكت",
|
||||
"sendTranscript": "طبع التكت",
|
||||
"closeWithReason":"close with reason"
|
||||
"close": "إغلاق التيكت",
|
||||
"delete": "حذف التيكت",
|
||||
"reopen": "إعادة فتح التيكت",
|
||||
"closeWithReason":"اغلاق مع سبب"
|
||||
},
|
||||
"messages": {
|
||||
"reopenTitle": "تم إعادة فتح التكت بنجاح!",
|
||||
"reopenDescription": "لا تتردد في فتح التكت مرة أخرى , حظاً موفقاً!",
|
||||
"closedTitle": "تم إغلاق التكت!",
|
||||
"closedDescription": "فقط الأداريين يمكنهم التحدث في هذا التكت الأن!\n\n*أضغط على الزر بالأسفل لحذف التكت او إعادة فتحة مجدداً!*",
|
||||
"closedDescription": "فقط الأداريين يمكنهم التحدث في هذا التيكت الأن!\n\n*أضغط على الزر بالأسفل لحذف التيكت او إعادة فتحة مجدداً!*",
|
||||
"createdTitle": "تم إنشاء تكت!",
|
||||
"createdDescription": "تم أنشاء تكت , قم بأنتظار الدعم في الطريق!",
|
||||
|
||||
"newTicketDmTitle": "تكت جديد!",
|
||||
"closedTicketDmTitle": "تم إغلاق التكت!",
|
||||
"deletedTicketDmTitle": "تم حذف التكت!",
|
||||
"closedTicketDmTitle": "تم إغلاق التيكت!",
|
||||
"deletedTicketDmTitle": "تم حذف التيكت!",
|
||||
"closedTicketDmDescription": "تم أغلاق تذكرتك من قبل إداري",
|
||||
"deletedTicketDmDescription": "تم حذف تذكرتك من قبل إداري!",
|
||||
"reopenTicketDmTitle": "تم إعادة فتح تذكرتك!",
|
||||
"reopenTicketDmDescription": "تم إعادة فتح التكت!",
|
||||
"newTranscriptTitle": "توجد نسخة تكت جديدة هنا!",
|
||||
"hereIsTheTranscript": "هذا هي النسخة:",
|
||||
"reopenTicketDmDescription": "تم إعادة فتح التيكت!",
|
||||
|
||||
"chooseCategory": "أختر الكتقاجوري:",
|
||||
"gettingdeleted": "يتم حذف التكت...",
|
||||
"gettingdeleted": "يتم حذف التيكت...",
|
||||
|
||||
"none": "لا يوجد",
|
||||
"reason": "سبب",
|
||||
"createdat":"تم الانشاء في",
|
||||
"openedby":"تم الانشاء من قبل",
|
||||
"deletedby":"تم الحذف من قبل",
|
||||
"closedby":"تم الاغلاق من قبل",
|
||||
|
||||
"deletedby":"deleted by",
|
||||
"closedby":"closed by",
|
||||
"modalreason":"What is the reason for closing this ticket?",
|
||||
"chooseATicket": "Choose a ticket"
|
||||
"modalreason":"ماهو سببك لاغلاق التيكت؟",
|
||||
"chooseATicket": "اختار تيكت معين"
|
||||
},
|
||||
"transcripts":{
|
||||
"title":"سجل",
|
||||
"processed":"يتم معالجة هذا السجل...",
|
||||
"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":"هذا المستخدم لم يتم العثور عليه في قاعدة بياناتنا!"
|
||||
}
|
||||
}
|
||||
+64
-12
@@ -1,4 +1,7 @@
|
||||
{
|
||||
"_CREDITS":"DJdj Development",
|
||||
"_INFO":"This file is a translation for open ticket 3.5.3",
|
||||
|
||||
"errors":{
|
||||
"missingArgsTitle":"Invalid Arguments!",
|
||||
"missingArgsDescription":"Missing Argument",
|
||||
@@ -15,8 +18,7 @@
|
||||
"anotherOption":"This option is not a ticket but another type!",
|
||||
"maxAmountTitle":"Max amount reached!",
|
||||
"maxAmountDescription":"You reached the maximum number of tickets allowed!\nSo you can't create a new one!",
|
||||
"somethingWentWrong":"**Something went wrong!**\nPlease try again another time!",
|
||||
"somethingWentWrongTranscript":"Something went wrong while making the transcript!**\nPlease try again another time!"
|
||||
"somethingWentWrong":"**Something went wrong!**\nPlease try again another time!"
|
||||
},
|
||||
"commands":{
|
||||
"userAddedTitle":"Added {0} to this ticket!",
|
||||
@@ -25,9 +27,17 @@
|
||||
"closeTitle":"Closed this ticket!",
|
||||
"deleteTitle":"Deleting this ticket...",
|
||||
"reopenTitle":"Re-Opened this ticket!",
|
||||
"claimTitle":"This ticket is now claimed to {0}",
|
||||
"unclaimTitle":"This ticket isn't claimed anymore!",
|
||||
|
||||
"claimTitle":"This ticket is claimed to {0}",
|
||||
"unclaimTitle":"This ticket isn't claimed anymore!",
|
||||
"changeTitle":"Changed ticket type to {0}!",
|
||||
|
||||
"statsTitle":"Here are the stats for {0}!",
|
||||
"autocloseTitle":"This ticket will be closed automatically after {0}!",
|
||||
"autocloseRejectTitle":"This ticket will no longer be closed automatically!",
|
||||
"autocloseWarn":"This only affects inactive tickets!",
|
||||
|
||||
"goToTicket":"go to ticket",
|
||||
"ticketWarning":"The embed is in the message below!",
|
||||
"maxTicketWarning":"**Warning:** _You can only create {0} ticket(s) at a time!_"
|
||||
},
|
||||
@@ -42,19 +52,20 @@
|
||||
"deleteCmd":"Delete a ticket.",
|
||||
"addCmd":"Add a user to the ticket.",
|
||||
"removeCmd":"Remove a user from the ticket.",
|
||||
"reopenCmd":"Re-Open a ticket after it was closed."
|
||||
"reopenCmd":"Re-Open a ticket after it was closed.",
|
||||
"changeCmd":"Change ticket type.",
|
||||
"claimCmd":"Claim a ticket.",
|
||||
"unclaimCmd":"Unclaim a ticket.",
|
||||
"statsCmd":"View ticket stats.",
|
||||
"autocloseCmd":"Set timer to automatically close ticket"
|
||||
},
|
||||
"buttons":{
|
||||
"close":"Close Ticket",
|
||||
"delete":"Delete Ticket",
|
||||
"reopen":"Re-Open Ticket",
|
||||
"sendTranscript":"Transcript",
|
||||
"closeWithReason":"close with reason"
|
||||
},
|
||||
"messages":{
|
||||
"reopenTitle":"Re-Opened this ticket!",
|
||||
"reopenDescription":"Feel free to talk again!",
|
||||
"closedTitle":"Closed this ticket!",
|
||||
"closedDescription":"Only admins can talk in this ticket now!\n\n*Click on the button below to delete or to re-open this ticket!*",
|
||||
"createdTitle":"Ticket Created!",
|
||||
"createdDescription":"Your ticket is created, you can detect it by a ping!",
|
||||
@@ -66,18 +77,59 @@
|
||||
"deletedTicketDmDescription":"Your ticket is deleted!",
|
||||
"reopenTicketDmTitle":"Ticket Re-opened!",
|
||||
"reopenTicketDmDescription":"Your ticket is re-opened!",
|
||||
"newTranscriptTitle":"A new transcript is here!",
|
||||
"hereIsTheTranscript":"Here is the transcript:",
|
||||
|
||||
"chooseCategory":"choose a category:",
|
||||
"gettingdeleted":"Ticket is getting deleted...",
|
||||
|
||||
"none":"none",
|
||||
"reason":"reason",
|
||||
|
||||
"createdat":"created at",
|
||||
"openedby":"opened by",
|
||||
"deletedby":"deleted by",
|
||||
"closedby":"closed by",
|
||||
|
||||
"modalreason":"What is the reason for closing this ticket?",
|
||||
"chooseATicket": "Choose a ticket"
|
||||
},
|
||||
"transcripts":{
|
||||
"title":"Transcript",
|
||||
"processed":"This transcript is being processed",
|
||||
"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!"
|
||||
}
|
||||
}
|
||||
+114
-62
@@ -1,83 +1,135 @@
|
||||
{
|
||||
"_CREDITS":"spyeye_",
|
||||
"_INFO":"This file is a translation for open ticket 3.5.3",
|
||||
|
||||
"errors":{
|
||||
"missingArgsTitle":"Neplatné argumenty",
|
||||
"missingArgsDescription":"Chybí argumenty",
|
||||
"noPermsTitle":"Nemáš práva!",
|
||||
"noPermsDescription":"Nemáš dostatečné práva na tento příkaz!\n Potřebuješ ADMINISTRATOR aby jsi mohl provést příkaz!",
|
||||
"noPermsDelete":"Pouze admin může smazat ticket!",
|
||||
"missingArgsTitle":"Neplatný Argument!",
|
||||
"missingArgsDescription":"Chybí Argument",
|
||||
"noPermsTitle":"K tomuto nemáš práva!",
|
||||
"noPermsDescription":"Potřebuješ `ADMINISTRATOR`roli nebo být na seznamu povolených rolí!",
|
||||
"noPermsDelete":"Pouze Admin může vymazat ticket!",
|
||||
"chooseFromListTitle":"Neplatné ID",
|
||||
"chooseFromListDescription":"Vyber si z těchto ID:",
|
||||
"boterror":"Error!",
|
||||
"chooseFromListDescription":"Vyber si jedno z ID níže:",
|
||||
"boterror":"Chyba Bota!",
|
||||
"notInTicketTitle":"Nejsi v ticketu!",
|
||||
"notInTicketDescription":"Tento příkaz nefunguje mimo tickety!",
|
||||
"ticketDoesntExist":"Tento ticket už bohužel neexistuje!",
|
||||
"roleDoesntExist":"Tato role bohužel neexistuje!",
|
||||
"anotherOption":"Tato možnost není ticket ale něco jiného!",
|
||||
"maxAmountTitle":"Maximální počet ticketů dosažen!",
|
||||
"maxAmountDescription":"Dosáhl jsi maximálního povoleného počtu ticketů!\n Nemůžeš si vytvořit nový!",
|
||||
"somethingWentWrong":"**Něco je špatně**\nProsím zkus to příště znovu!",
|
||||
"somethingWentWrongTranscript":"Něco je špatně s transcriptem!**\nProsím zkus to příště znovu!"
|
||||
"notInTicketDescription":"Tento příkaz nefunguje mimo ticket!",
|
||||
"ticketDoesntExist":"Tento ticket už neexistuje!",
|
||||
"roleDoesntExist":"Tato role už neexistuje!",
|
||||
"anotherOption":"Tato možnost není ticket, ale jiná!",
|
||||
"maxAmountTitle":"Byl dosáhnut maximální počet",
|
||||
"maxAmountDescription":"Dosáhl jsi maximální počet povolených ticketů!\nTaže si nemůžeš vytvořit nový.",
|
||||
"somethingWentWrong":"**Něco se pokazilo!**\nProsíme zkuste to později!"
|
||||
},
|
||||
"commands":{
|
||||
"userAddedTitle":"{0} byl přidán do ticketu!",
|
||||
"userRemovedTitle":"{0} byl odebrám z ticketu!",
|
||||
"renameTitle":"Jméno bylo změněno!",
|
||||
"closeTitle":"Zavři tento ticket!",
|
||||
"deleteTitle":"Smaž tento ticket!",
|
||||
"reopenTitle":"Znovu otevři ticket!",
|
||||
"claimTitle":"This ticket is now claimed to {0}",
|
||||
"unclaimTitle":"This ticket isn't claimed anymore!",
|
||||
"userAddedTitle":"Přidat {0} do tohoto ticketu.",
|
||||
"userRemovedTitle":"Odstranit {0} z tohoto ticketu.",
|
||||
"renameTitle":"Změnit jméno na {0}!",
|
||||
"closeTitle":"Uzavřít tento ticket!",
|
||||
"deleteTitle":"Probíhá vymazání ticketu...",
|
||||
"reopenTitle":"Ticket byl znovu otevřen",
|
||||
|
||||
"ticketWarning":"The embed is in the message below!",
|
||||
"maxTicketWarning":"**Varovaní:** _Můžeš si vytvořit použe {0} ticket(s) v jednu chvíli!_"
|
||||
"claimTitle":"Ticket nyní převzal {0}",
|
||||
"unclaimTitle":"Ticket není nadále převzaný",
|
||||
"changeTitle":"Typ ticketu byl změněn {0}!",
|
||||
|
||||
"statsTitle":"Zde jsou informace o ticketu {0}!",
|
||||
"autocloseTitle":"Tento ticketu bude automaticky uzavřen za {0}!",
|
||||
"autocloseRejectTitle":"Tento ticket již nebude automaticky uzavřen!",
|
||||
"autocloseWarn":"Tato možnost uzavře pouze neaktivní tickety!",
|
||||
|
||||
"goToTicket":"Jít do ticketu",
|
||||
"ticketWarning":"Embed se náchází pod touto zprávou.",
|
||||
"maxTicketWarning":"**Warning:** _V tuto chvíli můžeš vytvořit pouze {0} ticketů_"
|
||||
},
|
||||
"helpMenu":{
|
||||
"title":"Příkazy:",
|
||||
"header1":"**Běž {0} vytvořit si ticket!**\n\n",
|
||||
"header2":"**Použij příkaz `/new` nebo `/ticket` k vytvoření ticketu!**\n\n",
|
||||
"title":"Zde jsou všechny dostupné příkazy:",
|
||||
"header1":"**Pro vytvoření ticketu bež do {0} **\n\n",
|
||||
"header2":"**Použíj příkaz `/nový` nebo `/ticket` pro vytvoření nového ticketu**\n\n",
|
||||
|
||||
"msgCmd":"Vytvoř možnost otevírat tickety přes tlačítko. (ADMIN)",
|
||||
"renameCmd":"Přejmenovat ticket. (Žádné mezery)",
|
||||
"closeCmd":"Zavři ticket.",
|
||||
"deleteCmd":"Smaž ticket.",
|
||||
"addCmd":"Přidej člena do ticketu.",
|
||||
"removeCmd":"Odebere člena z ticketu.",
|
||||
"reopenCmd":"Znovu otevři ticket po uzavření."
|
||||
"msgCmd":"Vytvoř embed s tlačíky. (Pouze Admin)",
|
||||
"renameCmd":"Přejmenovat ticket. (Bez mezer)",
|
||||
"closeCmd":"Zavřít ticket.",
|
||||
"deleteCmd":"Odstranit ticket.",
|
||||
"addCmd":"Pridat uživatele do ticketu.",
|
||||
"removeCmd":"Odebrat uživatele z ticketu.",
|
||||
"reopenCmd":"Znovu otevře ticket, který byl uzavřen.",
|
||||
"changeCmd":"Změnit typ ticketu.",
|
||||
"claimCmd":"Převzi ticket.",
|
||||
"unclaimCmd":"Uvolnit ticket.",
|
||||
"statsCmd":"Zobrazit info o ticketu.",
|
||||
"autocloseCmd":"Nastavit automatické uzavření ticketu"
|
||||
},
|
||||
"buttons":{
|
||||
"close":"Zavři ticket",
|
||||
"delete":"Smaž ticket",
|
||||
"reopen":"Znovu otevři ticket",
|
||||
"sendTranscript":"Odešli log ticketu",
|
||||
"closeWithReason":"close with reason"
|
||||
"close":"Uzavřít ticket",
|
||||
"delete":"Vymazat ticket",
|
||||
"reopen":"Znovu otevřít ticket",
|
||||
"closeWithReason":"Zzavřít s důvodem"
|
||||
},
|
||||
"messages":{
|
||||
"reopenTitle":"Ticket znovu otevřen!",
|
||||
"reopenDescription":"Cítím se skvěle že si můžeme zase povídat!",
|
||||
"closedTitle":"Zavřený ticket!",
|
||||
"closedDescription":"Pouze admin team zde může nyní komunikovat!\n\n*Klikni na tlačítko níže pro smazání nebo znovu otevření ticketu!*",
|
||||
"createdTitle":"Ticket vytvořen!",
|
||||
"createdDescription":"Váš tiket je vytvořen, můžete ho zjistit pomocí pingu!",
|
||||
"closedDescription":"Zde mohou psát pouze Admin uživatelé\n\n*Klikni na tlačítko níže pro smazání nebo pro znovu otevření tohoto ticketu!*",
|
||||
"createdTitle":"Ticket otevřen!",
|
||||
"createdDescription":"Tvůj ticket je vytvořem, můžeš si ho všimnout pomocí pingu!",
|
||||
|
||||
"newTicketDmTitle":"Nový ticket!",
|
||||
"closedTicketDmTitle":"Ticket uzavřen!",
|
||||
"deletedTicketDmTitle":"Ticket smazán!",
|
||||
"closedTicketDmDescription":"Tvůj ticket byl uzavřen!",
|
||||
"deletedTicketDmDescription":"Tvůj ticket byl smazán!",
|
||||
"reopenTicketDmTitle":"Ticket znovu otevřen!",
|
||||
"reopenTicketDmDescription":"Tvůj ticket byl znovu otevřen!",
|
||||
"newTranscriptTitle":"Nový log ticketu je zde!",
|
||||
"hereIsTheTranscript":"Zde je log:",
|
||||
"closedTicketDmTitle":"Ticket byl Uzavřen!",
|
||||
"deletedTicketDmTitle":"Ticket byl Odstraněn!",
|
||||
"closedTicketDmDescription":"Tvůj ticket je uzavřen!",
|
||||
"deletedTicketDmDescription":"Tvůj ticket byl vymazán!",
|
||||
"reopenTicketDmTitle":"Ticket je znovu otevřený!",
|
||||
"reopenTicketDmDescription":"Tvuj ticket byl znovu ovetřený!",
|
||||
|
||||
"chooseCategory":"Vyber kategorii:",
|
||||
"gettingdeleted":"Ticket bude smazán",
|
||||
"chooseCategory":"Vyber si kategorii:",
|
||||
"gettingdeleted":"Ticket bude vymazán...",
|
||||
|
||||
"none":"nic",
|
||||
"reason":"důvod",
|
||||
"none":"Žádný",
|
||||
"reason":"Důvod",
|
||||
"createdat":"Otevřeno v",
|
||||
"openedby":"Otevřel",
|
||||
"deletedby":"Vymázáno uživatelem",
|
||||
"closedby":"Uzavřeno uživatelem",
|
||||
|
||||
"deletedby":"deleted by",
|
||||
"closedby":"closed by",
|
||||
"modalreason":"What is the reason for closing this ticket?",
|
||||
"chooseATicket": "Choose a ticket"
|
||||
"modalreason":"Zde napiš důvod uzavření tohoto ticketu.",
|
||||
"chooseATicket": "Vyber si ticket"
|
||||
},
|
||||
"transcripts":{
|
||||
"title":"Záznam",
|
||||
"processed":"Tento záznam byl zpracován",
|
||||
"wait":"Prosím počkej!",
|
||||
"estimated":"Odhadovaný čas",
|
||||
"available":"Záloha je uložena zde!"
|
||||
},
|
||||
"stats":{
|
||||
"globalTitle":"Globální statistiky",
|
||||
"ticketTitle":"Ticket statistiky pro {0}",
|
||||
"userTitle":"Uživatelské statistiky pro {0}",
|
||||
"systemTitle":"Sytstémov= statistiky",
|
||||
"versionTitle":"Verze bota",
|
||||
|
||||
"ticketsCreated":"Ticketů vytvořeno:",
|
||||
"ticketsClosed":"Tickety zavřeno:",
|
||||
"ticketsDeleted":"Ticketu smazáno:",
|
||||
"ticketsReopened":"Ticketů znovuotevřených:",
|
||||
"ticketsAutoclosed":"Ticketů automaticky zavřeno:",
|
||||
"transcriptsCreated":"Záloh ticketů vytvořeno:",
|
||||
"startupDate":"Datum zapnutí",
|
||||
"latestUpdate":"Poslední aktualizace",
|
||||
"ticketCreatedOn":"Ticket založen na",
|
||||
"ticketCreatedBy":"Ticket vytvořil",
|
||||
"messagesSent":"Zpráva poslána",
|
||||
"status":"Status",
|
||||
"participants":"Účastníci",
|
||||
"role":"Role",
|
||||
|
||||
"switches":{
|
||||
"globalAdmin":"Globální Admin",
|
||||
"ticketAdmin":"Ticket Admin",
|
||||
"member":"Člen",
|
||||
"open":"Otevřený",
|
||||
"reopened":"Znovuotevřený",
|
||||
"closed":"Zavřený",
|
||||
"autoclosed":"Automaticky zavřený"
|
||||
},
|
||||
|
||||
"errorUserNotFound":"Tento uživatel nebyl nalezen v databázi statistik!"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,135 @@
|
||||
{
|
||||
"_CREDITS":"the_gamer#5095",
|
||||
"_INFO":"This file is a translation for open ticket 3.5.3",
|
||||
|
||||
"errors": {
|
||||
"missingArgsTitle": "Ugyldigt Argument!",
|
||||
"missingArgsDescription": "Manglende Argument",
|
||||
"noPermsTitle": "Ikke tilladelse!",
|
||||
"noPermsDescription": "Du skal have tilladelsen `ADMINISTRATOR` eller være på listen over tilladte roller!",
|
||||
"noPermsDelete": "Kun administratorer kan slette en ticket!",
|
||||
"chooseFromListTitle": "Ugyldigt ID",
|
||||
"chooseFromListDescription": "Vælg et af id'erne nedenfor:",
|
||||
"boterror": "Bot Fejl!",
|
||||
"notInTicketTitle": "Du er ikke i en ticket!",
|
||||
"notInTicketDescription": "Denne kommando virker ikke udenfor tickets!",
|
||||
"ticketDoesntExist": "Denne ticket findes ikke længere!",
|
||||
"roleDoesntExist": "Denne rolle eksisterer ikke længere!",
|
||||
"anotherOption": "Denne mulighed er ikke en ticket, men en anden type!",
|
||||
"maxAmountTitle": "Maks. mængde opnået!",
|
||||
"maxAmountDescription": "Du har nået det maksimale antal tilladte tickets!\nSå du kan ikke oprette en ny!",
|
||||
"somethingWentWrong": "**Noget gik galt!**\nPrøv venligst igen en anden gang!"
|
||||
},
|
||||
"commands": {
|
||||
"userAddedTitle": "Føjede {0} til denne ticket!",
|
||||
"userRemovedTitle": "Fjernede {0} fra denne ticket!",
|
||||
"renameTitle": "Ændrede navnet til {0}!",
|
||||
"closeTitle": "Lukket denne ticket!",
|
||||
"deleteTitle": "Sletter denne ticket...",
|
||||
"reopenTitle": "Genåbnede denne ticket!",
|
||||
|
||||
"claimTitle": "Denne ticket bliver nu håndteret af {0}",
|
||||
"unclaimTitle": "Denne ticket bliver ikke håndteret længere!",
|
||||
"changeTitle": "Ændrede ticket-type til {0}!",
|
||||
|
||||
"statsTitle": "Her er statestikerne til {0}!",
|
||||
"autocloseTitle": "Denne ticket lukker automatisk om {0}!",
|
||||
"autocloseRejectTitle": "Denne ticket lukker ikke længere automatisk!",
|
||||
"autocloseWarn": "Dette har kun effekt på inaktive tickets!",
|
||||
|
||||
"goToTicket": "gå til ticket",
|
||||
"ticketWarning": "Embedet er i meddelelsen nedenfor!",
|
||||
"maxTicketWarning": "**Warning:** _Du kan kun oprette {0} ticket(s) ad gangen!_"
|
||||
},
|
||||
"helpMenu": {
|
||||
"title": "Tilgængelige kommandoer:",
|
||||
"header1": "**Gå til {0} for at oprette en ticket!**\n\n",
|
||||
"header2": "**Kør kommandoen `/new` eller `/ticket` for at oprette en billet!**\n\n",
|
||||
|
||||
"msgCmd": "Lav et embed med buttons. (kun administratorer)",
|
||||
"renameCmd": "Omdøb en ticket. (Ingen Mellemrum!!)",
|
||||
"closeCmd": "Luk en ticket.",
|
||||
"deleteCmd": "Slet en ticket.",
|
||||
"addCmd": "Tilføj en bruger til ticketen.",
|
||||
"removeCmd": "Fjern en bruger fra ticketen.",
|
||||
"reopenCmd": "Genåbn en ticket, efter at den var lukket.",
|
||||
"changeCmd": "Skift ticket type.",
|
||||
"claimCmd": "Håndter en ticket.",
|
||||
"unclaimCmd": "Afhåndter en ticket.",
|
||||
"statsCmd": "Se ticket statestiker.",
|
||||
"autocloseCmd": "Angiv tiden til automatisk at lukke en ticket"
|
||||
},
|
||||
"buttons": {
|
||||
"close": "Luk Ticket",
|
||||
"delete": "Slet Ticket",
|
||||
"reopen": "Genåben Ticket",
|
||||
"closeWithReason": "Luk med grundlag"
|
||||
},
|
||||
"messages": {
|
||||
"closedDescription": "Kun administratorer kan tale i denne billet nu!\n\n*Klik på knappen nedenfor for at slette eller genåbne denne billet!",
|
||||
"createdTitle": "Ticket Oprettet!",
|
||||
"createdDescription": "Din ticket er oprettet, du kan registrere den ved et ping!",
|
||||
|
||||
"newTicketDmTitle": "Nt Ticket!",
|
||||
"closedTicketDmTitle": "Ticket Lukket!",
|
||||
"deletedTicketDmTitle": "Ticket Slettet!",
|
||||
"closedTicketDmDescription": "Din ticket er lukket!",
|
||||
"deletedTicketDmDescription": "Din ticket er slettet!",
|
||||
"reopenTicketDmTitle": "Ticket Genåbnet!",
|
||||
"reopenTicketDmDescription": "Din ticket er genåbnet!",
|
||||
|
||||
"chooseCategory": "vælg en kategori:",
|
||||
"gettingdeleted": "Ticketen bliver slettet...",
|
||||
|
||||
"none": "intet",
|
||||
"reason": "grundlag",
|
||||
"createdat": "lavet af",
|
||||
"openedby": "åbnet af",
|
||||
"deletedby": "slettet af",
|
||||
"closedby": "lukket af",
|
||||
|
||||
"modalreason": "Hvad er grunden til at lukke denne ticket?",
|
||||
"chooseATicket": "Vælg en ticket"
|
||||
},
|
||||
"transcripts": {
|
||||
"title": "Transcript",
|
||||
"processed": "Dette transcript er under behandling",
|
||||
"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!"
|
||||
}
|
||||
}
|
||||
+64
-12
@@ -1,4 +1,7 @@
|
||||
{
|
||||
"_CREDITS":"DJj123dj#1706",
|
||||
"_INFO":"This file is a translation for open ticket 3.5.3",
|
||||
|
||||
"errors":{
|
||||
"missingArgsTitle":"Onjuiste parameters!",
|
||||
"missingArgsDescription":"Er missen parameters",
|
||||
@@ -15,8 +18,7 @@
|
||||
"anotherOption":"Deze optie is niet een ticket, maar een ander type!",
|
||||
"maxAmountTitle":"Maximum numer bereikt!",
|
||||
"maxAmountDescription":"Je hebt het maximum aantal openstaande tickets bereikt!\nDus je kan geen nieuwe meer maken!",
|
||||
"somethingWentWrong":"**Iets ging fout!**\nProbeer een andere keer opnieuw!",
|
||||
"somethingWentWrongTranscript":"Iets ging fout terwijl het transcript gemaakt werd!**\nProbeer een andere keer opnieuw!"
|
||||
"somethingWentWrong":"**Iets ging fout!**\nProbeer een andere keer opnieuw!"
|
||||
},
|
||||
"commands":{
|
||||
"userAddedTitle":"{0} is toegevoegd aan dit ticket!",
|
||||
@@ -25,9 +27,17 @@
|
||||
"closeTitle":"Ticket gesloten!",
|
||||
"deleteTitle":"Ticket aan het verwijderen...",
|
||||
"reopenTitle":"Ticket heropend!",
|
||||
"claimTitle":"This ticket is now claimed to {0}",
|
||||
"unclaimTitle":"This ticket isn't claimed anymore!",
|
||||
|
||||
"claimTitle":"Dit ticket is geclaimed door {0}",
|
||||
"unclaimTitle":"Dit ticket is niet meer geclaimed!",
|
||||
"changeTitle":"Ticket type veranderd naar {0}!",
|
||||
|
||||
"statsTitle":"Hier zijn de stats voor {0}!",
|
||||
"autocloseTitle":"Dit ticket wordt automatisch gesloten na {0}!",
|
||||
"autocloseRejectTitle":"Dit ticket wordt niet langer automatisch gesloten!",
|
||||
"autocloseWarn":"Dit geldt alleen voor inactieve tickets!",
|
||||
|
||||
"goToTicket":"ga naar ticket",
|
||||
"ticketWarning":"De embed is in het bericht hier onder!",
|
||||
"maxTicketWarning":"**Waarschuwing:** _Je kan maar {0} ticket(s) tegelijkertijd maken!_"
|
||||
},
|
||||
@@ -42,19 +52,20 @@
|
||||
"deleteCmd":"Verijder een ticket.",
|
||||
"addCmd":"Voeg een user aan een ticket.",
|
||||
"removeCmd":"Verwijder een user van een ticket.",
|
||||
"reopenCmd":"Heropen een ticket nadat het gesloten is."
|
||||
"reopenCmd":"Heropen een ticket nadat het gesloten is.",
|
||||
"changeCmd":"Verander ticket type.",
|
||||
"claimCmd":"Claim een ticket.",
|
||||
"unclaimCmd":"Unclaim een ticket.",
|
||||
"statsCmd":"Bekijk ticket stats.",
|
||||
"autocloseCmd":"Zet een timer om het ticket automatisch te sluiten"
|
||||
},
|
||||
"buttons":{
|
||||
"close":"Sluit Ticket",
|
||||
"delete":"Verwijder Ticket",
|
||||
"reopen":"Heropen Ticket",
|
||||
"sendTranscript":"Transcript",
|
||||
"closeWithReason":"sluit met reden"
|
||||
},
|
||||
"messages":{
|
||||
"reopenTitle":"Ticket heropend!",
|
||||
"reopenDescription":"Voel vrij om weer te praten!",
|
||||
"closedTitle":"Ticket gesloten!",
|
||||
"closedDescription":"Alleen admins kunnen nog praten.\n\n*Klik op de knoppen hieronder voor meer acties!*",
|
||||
"createdTitle":"Ticket Aangemaakt!",
|
||||
"createdDescription":"U ticket is gemaakt, je kan het detecteren bij een ping!",
|
||||
@@ -66,18 +77,59 @@
|
||||
"deletedTicketDmDescription":"Je ticket is verwijderd!",
|
||||
"reopenTicketDmTitle":"Ticket Heropend!",
|
||||
"reopenTicketDmDescription":"Je ticket is heropend!",
|
||||
"newTranscriptTitle":"Er is een nieuw transcript!",
|
||||
"hereIsTheTranscript":"Hier is het transcript:",
|
||||
|
||||
"chooseCategory":"kies een categorie:",
|
||||
"gettingdeleted":"Ticket wordt verwijderd...",
|
||||
|
||||
"none":"geen",
|
||||
"reason":"reden",
|
||||
|
||||
"createdat":"gecreëerd op",
|
||||
"openedby":"geopend door",
|
||||
"deletedby":"verwijderd door",
|
||||
"closedby":"gesloten door",
|
||||
|
||||
"modalreason":"Wat is de reden om dit ticket te sluiten?",
|
||||
"chooseATicket": "Kies een ticket"
|
||||
},
|
||||
"transcripts":{
|
||||
"title":"Transcript",
|
||||
"processed":"Dit transcript wordt verwerkt",
|
||||
"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!"
|
||||
}
|
||||
}
|
||||
+64
-12
@@ -1,4 +1,7 @@
|
||||
{
|
||||
"_CREDITS":"DJdj Development",
|
||||
"_INFO":"This file is a translation for open ticket 3.5.3",
|
||||
|
||||
"errors":{
|
||||
"missingArgsTitle":"Invalid Arguments!",
|
||||
"missingArgsDescription":"Missing Argument",
|
||||
@@ -15,8 +18,7 @@
|
||||
"anotherOption":"This option is not a ticket but another type!",
|
||||
"maxAmountTitle":"Max amount reached!",
|
||||
"maxAmountDescription":"You reached the maximum number of tickets allowed!\nSo you can't create a new one!",
|
||||
"somethingWentWrong":"**Something went wrong!**\nPlease try again another time!",
|
||||
"somethingWentWrongTranscript":"Something went wrong while making the transcript!**\nPlease try again another time!"
|
||||
"somethingWentWrong":"**Something went wrong!**\nPlease try again another time!"
|
||||
},
|
||||
"commands":{
|
||||
"userAddedTitle":"Added {0} to this ticket!",
|
||||
@@ -25,9 +27,17 @@
|
||||
"closeTitle":"Closed this ticket!",
|
||||
"deleteTitle":"Deleting this ticket...",
|
||||
"reopenTitle":"Re-Opened this ticket!",
|
||||
"claimTitle":"This ticket is now claimed to {0}",
|
||||
"unclaimTitle":"This ticket isn't claimed anymore!",
|
||||
|
||||
"claimTitle":"This ticket is claimed to {0}",
|
||||
"unclaimTitle":"This ticket isn't claimed anymore!",
|
||||
"changeTitle":"Changed ticket type to {0}!",
|
||||
|
||||
"statsTitle":"Here are the stats for {0}!",
|
||||
"autocloseTitle":"This ticket will be closed automatically after {0}!",
|
||||
"autocloseRejectTitle":"This ticket will no longer be closed automatically!",
|
||||
"autocloseWarn":"This only affects inactive tickets!",
|
||||
|
||||
"goToTicket":"go to ticket",
|
||||
"ticketWarning":"The embed is in the message below!",
|
||||
"maxTicketWarning":"**Warning:** _You can only create {0} ticket(s) at a time!_"
|
||||
},
|
||||
@@ -42,19 +52,20 @@
|
||||
"deleteCmd":"Delete a ticket.",
|
||||
"addCmd":"Add a user to the ticket.",
|
||||
"removeCmd":"Remove a user from the ticket.",
|
||||
"reopenCmd":"Re-Open a ticket after it was closed."
|
||||
"reopenCmd":"Re-Open a ticket after it was closed.",
|
||||
"changeCmd":"Change ticket type.",
|
||||
"claimCmd":"Claim a ticket.",
|
||||
"unclaimCmd":"Unclaim a ticket.",
|
||||
"statsCmd":"View ticket stats.",
|
||||
"autocloseCmd":"Set timer to automatically close ticket"
|
||||
},
|
||||
"buttons":{
|
||||
"close":"Close Ticket",
|
||||
"delete":"Delete Ticket",
|
||||
"reopen":"Re-Open Ticket",
|
||||
"sendTranscript":"Transcript",
|
||||
"closeWithReason":"close with reason"
|
||||
},
|
||||
"messages":{
|
||||
"reopenTitle":"Re-Opened this ticket!",
|
||||
"reopenDescription":"Feel free to talk again!",
|
||||
"closedTitle":"Closed this ticket!",
|
||||
"closedDescription":"Only admins can talk in this ticket now!\n\n*Click on the button below to delete or to re-open this ticket!*",
|
||||
"createdTitle":"Ticket Created!",
|
||||
"createdDescription":"Your ticket is created, you can detect it by a ping!",
|
||||
@@ -66,18 +77,59 @@
|
||||
"deletedTicketDmDescription":"Your ticket is deleted!",
|
||||
"reopenTicketDmTitle":"Ticket Re-opened!",
|
||||
"reopenTicketDmDescription":"Your ticket is re-opened!",
|
||||
"newTranscriptTitle":"A new transcript is here!",
|
||||
"hereIsTheTranscript":"Here is the transcript:",
|
||||
|
||||
"chooseCategory":"choose a category:",
|
||||
"gettingdeleted":"Ticket is getting deleted...",
|
||||
|
||||
"none":"none",
|
||||
"reason":"reason",
|
||||
|
||||
"createdat":"created at",
|
||||
"openedby":"opened by",
|
||||
"deletedby":"deleted by",
|
||||
"closedby":"closed by",
|
||||
|
||||
"modalreason":"What is the reason for closing this ticket?",
|
||||
"chooseATicket": "Choose a ticket"
|
||||
},
|
||||
"transcripts":{
|
||||
"title":"Transcript",
|
||||
"processed":"This transcript is being processed",
|
||||
"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!"
|
||||
}
|
||||
}
|
||||
+110
-58
@@ -1,83 +1,135 @@
|
||||
{
|
||||
"_CREDITS":"tostam",
|
||||
"_INFO":"Ce fichier est une traduction pour OpenTicket 3.5.0",
|
||||
|
||||
"errors":{
|
||||
"missingArgsTitle":"Arguments invalides!",
|
||||
"missingArgsDescription":"Argument manquant",
|
||||
"noPermsTitle":"Pas de permissions!",
|
||||
"noPermsDescription":"Vous avez besoin de la permission `ADMINISTRATOR` ou être dans la liste des rôles autorisés!",
|
||||
"noPermsDelete":"Seuls les administrateurs peuvent supprimer un ticket!",
|
||||
"chooseFromListTitle":"Invalid ID",
|
||||
"missingArgsTitle":"Arguments invalides !",
|
||||
"missingArgsDescription":"Argument manquant !",
|
||||
"noPermsTitle":"Tu n'as pas les permissions requises !",
|
||||
"noPermsDescription":"Vous avez besoin de la permission `ADMINISTRATOR` ou être dans la liste des rôles autorisés !",
|
||||
"noPermsDelete":"Seuls les staffs peuvent supprimer un ticket !",
|
||||
"chooseFromListTitle":"ID invalide !",
|
||||
"chooseFromListDescription":"Choisissez l'un des identifiants ci-dessous:",
|
||||
"boterror":"Bot Error!",
|
||||
"notInTicketTitle":"Vous n'êtes pas dans un ticket!",
|
||||
"notInTicketDescription":"Cette commande ne fonctionne pas en dehors des tickets!",
|
||||
"ticketDoesntExist":"Ce ticket n'existe plus!",
|
||||
"roleDoesntExist":"Ce rôle n'existe plus!",
|
||||
"anotherOption":"Cette option n'est pas un ticket mais un autre type!",
|
||||
"maxAmountTitle":"Montant maximum atteint!",
|
||||
"maxAmountDescription":"Vous avez atteint le nombre maximum de tickets autorisés!\nVous ne pouvez donc pas en créer un nouveau!",
|
||||
"somethingWentWrong":"**Quelque chose s'est mal passé!**\nVeuillez réessayer une autre fois!",
|
||||
"somethingWentWrongTranscript":"Une erreur s'est produite lors de la création de la transcription!**\nVeuillez réessayer une autre fois!"
|
||||
"boterror":"Erreur du bot !",
|
||||
"notInTicketTitle":"Vous n'êtes pas dans un ticket !",
|
||||
"notInTicketDescription":"Cette commande ne fonctionne pas en dehors des tickets !",
|
||||
"ticketDoesntExist":"Ce ticket n'existe pas !",
|
||||
"roleDoesntExist":"Ce rôle n'existe pas !",
|
||||
"anotherOption":"Cette option n'est pas un ticket mais un autre type !",
|
||||
"maxAmountTitle":"Montant maximum de ticket atteint !",
|
||||
"maxAmountDescription":"Vous avez atteint le nombre maximum de tickets autorisés !\nVous ne pouvez donc pas en créer un nouveau !",
|
||||
"somethingWentWrong":"**Quelque chose s'est mal passé !**\nVeuillez réessayer une autre fois !"
|
||||
},
|
||||
"commands":{
|
||||
"userAddedTitle":"{0} a été ajouté à ce ticket!",
|
||||
"userRemovedTitle":"Supprimé {0} de ce ticket!",
|
||||
"renameTitle":"Changement du nom en {0}!",
|
||||
"closeTitle":"Fermé ce ticket!",
|
||||
"userAddedTitle":"{0} a été ajouté à ce ticket !",
|
||||
"userRemovedTitle":"{0} a été supprimé de ce ticket !",
|
||||
"renameTitle":"Changement de nom du ticket en {0} !",
|
||||
"closeTitle":"Ticket fermé",
|
||||
"deleteTitle":"Suppression de ce ticket...",
|
||||
"reopenTitle":"A rouvert ce ticket!",
|
||||
"claimTitle":"This ticket is now claimed to {0}",
|
||||
"unclaimTitle":"This ticket isn't claimed anymore!",
|
||||
"reopenTitle":"Ticket réouvert",
|
||||
|
||||
"ticketWarning":"L'intégration est dans le message ci-dessous!",
|
||||
"maxTicketWarning":"**Attention :** _Vous ne pouvez créer que {0} ticket(s) à la fois !_"
|
||||
"claimTitle":"Ce ticket est maintenant réclamé par {0}",
|
||||
"unclaimTitle":"Ce ticket n'est plus réclamé !",
|
||||
"changeTitle":"Modification du type de ticket en {0} !",
|
||||
|
||||
"statsTitle":"Voici les statistiques pour {0} !",
|
||||
"autocloseTitle":"Ce ticket sera automatiquement clôturé après {0} !",
|
||||
"autocloseRejectTitle":"Ce ticket ne sera plus clôturé automatiquement !",
|
||||
"autocloseWarn":"Cela n'affecte que les tickets inactifs !",
|
||||
|
||||
"goToTicket":"Aller au ticket",
|
||||
"ticketWarning":"L'intégration est dans le message ci-dessous !",
|
||||
"maxTicketWarning":"**Attention :** _Vous ne pouvez créer seulement {0} ticket(s) à la fois !_"
|
||||
},
|
||||
"helpMenu":{
|
||||
"title":"Commandes disponibles :",
|
||||
"header1":"**Allez à {0} pour créer un ticket !**\n\n",
|
||||
"title":"Commandes disponibles :",
|
||||
"header1":"**Allez à {0} pour créer un ticket !**\n\n",
|
||||
"header2":"**Exécutez la commande `/new` ou `/ticket` pour créer un ticket !**\n\n",
|
||||
|
||||
"msgCmd":"Faire apparaître une intégration avec des boutons. (administrateurs uniquement)",
|
||||
"renameCmd":"Renommer un ticket. (sans espaces)",
|
||||
"closeCmd":"Fermer un ticket.",
|
||||
"deleteCmd":"Supprimer un billet.",
|
||||
"addCmd":"Ajouter un utilisateur au ticket.",
|
||||
"removeCmd":"Supprimer un utilisateur du ticket.",
|
||||
"reopenCmd":"Rouvrir un ticket après sa clôture."
|
||||
"msgCmd":"Faire apparaître une intégration avec des boutons (administrateurs uniquement)",
|
||||
"renameCmd":"Renommer un ticket (sans espaces)",
|
||||
"closeCmd":"Fermer un ticket",
|
||||
"deleteCmd":"Supprimer un ticket",
|
||||
"addCmd":"Ajouter un utilisateur au ticket",
|
||||
"removeCmd":"Supprimer un utilisateur du ticket",
|
||||
"reopenCmd":"Réouvrir un ticket après sa clôture",
|
||||
"changeCmd":"Changer le type de ticket",
|
||||
"claimCmd":"Réclamer un ticket",
|
||||
"unclaimCmd":"Annuler la réclamation d'un ticket",
|
||||
"statsCmd":"Afficher les statistiques des tickets",
|
||||
"autocloseCmd":"Définir une minuterie pour fermer automatiquement le ticket"
|
||||
},
|
||||
"buttons":{
|
||||
"close":"Fermer le ticket",
|
||||
"delete":"Supprimer le billet",
|
||||
"reopen":"Billet de réouverture",
|
||||
"sendTranscript":"Transcript",
|
||||
"closeWithReason":"fermer avec une raison"
|
||||
"delete":"Supprimer le ticket",
|
||||
"reopen":"Réouvrir le ticket",
|
||||
"closeWithReason":"Fermer avec une raison"
|
||||
},
|
||||
"messages":{
|
||||
"reopenTitle":"A rouvert ce ticket!",
|
||||
"reopenDescription":"N'hésitez pas à reparler!",
|
||||
"closedTitle":"Fermé ce ticket!",
|
||||
"closedDescription":"Seuls les administrateurs peuvent parler dans ce ticket maintenant !\n\n*Cliquez sur le bouton ci-dessous pour supprimer ou rouvrir ce ticket !*",
|
||||
"createdTitle":"Ticket créé !",
|
||||
"closedDescription":"Seuls les administrateurs peuvent parler dans ce ticket maintenant !\n\n*Cliquez sur le bouton ci-dessous pour supprimer ou réouvrir ce ticket !*",
|
||||
"createdTitle":"Ticket créé !",
|
||||
"createdDescription":"Votre ticket est créé, vous pouvez le détecter par un ping !",
|
||||
|
||||
"newTicketDmTitle":"Nouveau billet!",
|
||||
"closedTicketDmTitle":"Billet fermé!",
|
||||
"deletedTicketDmTitle":"Billet supprimé !",
|
||||
"closedTicketDmDescription":"Votre billet est fermé !",
|
||||
"deletedTicketDmDescription":"Votre billet est supprimé !",
|
||||
"reopenTicketDmTitle":"Billet rouvert!",
|
||||
"reopenTicketDmDescription":"Votre billet est rouvert !",
|
||||
"newTranscriptTitle":"Une nouvelle transcription est ici!",
|
||||
"hereIsTheTranscript":"Voici la transcription :",
|
||||
"newTicketDmTitle":"Nouveau ticket !",
|
||||
"closedTicketDmTitle":"Ticket fermé !",
|
||||
"deletedTicketDmTitle":"Ticket supprimé !",
|
||||
"closedTicketDmDescription":"Votre ticket est fermé !",
|
||||
"deletedTicketDmDescription":"Votre ticket est supprimé !",
|
||||
"reopenTicketDmTitle":"Ticket réouvert !",
|
||||
"reopenTicketDmDescription":"Votre ticket est réouvert !",
|
||||
|
||||
"chooseCategory":"choisissez une catégorie:",
|
||||
"chooseCategory":"Choisissez une catégorie:",
|
||||
"gettingdeleted":"Le ticket est en cours de suppression...",
|
||||
|
||||
"none":"rien",
|
||||
"reason":"raison",
|
||||
"none":"Rien",
|
||||
"reason":"Raison",
|
||||
"createdat":"Créé à",
|
||||
"openedby":"Ouvert par",
|
||||
"deletedby":"Supprimé par",
|
||||
"closedby":"Fermé par",
|
||||
|
||||
"deletedby":"supprimé par",
|
||||
"closedby":"fermé par",
|
||||
"modalreason":"Qu’elle est la raison pour fermer ce ticket?",
|
||||
"modalreason":"Qu'elle est la raison pour fermer ce ticket ?",
|
||||
"chooseATicket": "Choisir un ticket"
|
||||
},
|
||||
"transcripts":{
|
||||
"title":"Transcript",
|
||||
"processed":"Cette transcript est en cours de traitement",
|
||||
"wait":"S'il vous plait, attendez...",
|
||||
"estimated":"Temps estimé:",
|
||||
"available":"La transcript est disponible ici"
|
||||
},
|
||||
"stats":{
|
||||
"globalTitle":"Statistiques du serveur",
|
||||
"ticketTitle":"Statistiques des tickets pour {0}",
|
||||
"userTitle":"Statistiques des utilisateurs pour {0}",
|
||||
"systemTitle":"Statistiques du système",
|
||||
"versionTitle":"Version du bot",
|
||||
|
||||
"ticketsCreated":"Tickets créés",
|
||||
"ticketsClosed":"Tickets fermés",
|
||||
"ticketsDeleted":"Tickets supprimés",
|
||||
"ticketsReopened":"Tickets réouverts",
|
||||
"ticketsAutoclosed":"Tickets fermés automatiquement",
|
||||
"transcriptsCreated":"Transcriptions créées",
|
||||
"startupDate":"Date de démarrage du bot",
|
||||
"latestUpdate":"Dernière mise à jour",
|
||||
"ticketCreatedOn":"Ticket créé le",
|
||||
"ticketCreatedBy":"Ticket créé par",
|
||||
"messagesSent":"Messages envoyés",
|
||||
"status":"Status",
|
||||
"participants":"Participants",
|
||||
"role":"Role",
|
||||
|
||||
"switches":{
|
||||
"globalAdmin":"Administrateur global",
|
||||
"ticketAdmin":"Administrateur des tickets",
|
||||
"member":"Membre",
|
||||
"open":"Ouvrir",
|
||||
"reopened":"Réouvert",
|
||||
"closed":"Fermé",
|
||||
"autoclosed":"Fermé automatiquement"
|
||||
},
|
||||
|
||||
"errorUserNotFound":"Cet utilisateur est introuvable dans la base de données de statistiques !"
|
||||
}
|
||||
}
|
||||
+86
-34
@@ -1,38 +1,48 @@
|
||||
{
|
||||
"_CREDITS":"david.#8276 ",
|
||||
"_INFO":"This file is a translation for open ticket 3.5.3",
|
||||
|
||||
"errors":{
|
||||
"missingArgsTitle":"Ungültiges Argument!",
|
||||
"missingArgsDescription":"Fehlendes Argument!",
|
||||
"noPermsTitle":"Du hast keine Rechte!",
|
||||
"noPermsDescription":"You need the `ADMINISTRATOR` permission or be in the list of allowed roles!",
|
||||
"noPermsDelete":"Only admins can delete a ticket!",
|
||||
"noPermsDescription":"Du benötigst die `ADMINISTRATOR` Rechte oder die erlaubte Rolle",
|
||||
"noPermsDelete":"Nur Administratoren können ein Ticket löschen!",
|
||||
"chooseFromListTitle":"Ungültige ID",
|
||||
"chooseFromListDescription":"Wählen Sie eine der folgenden ID:",
|
||||
"chooseFromListDescription":"Wählen Sie eine der folgenden ID's:",
|
||||
"boterror":"Bot Fehler!",
|
||||
"notInTicketTitle":"Du bist ein kein Ticket!",
|
||||
"notInTicketDescription":"Der Befehl funktioniert nicht außerhalb eines Tickets!",
|
||||
"ticketDoesntExist":"Das Ticket Exisitert nicht mehr!",
|
||||
"roleDoesntExist":"Die Rolle Exisitiert nicht mehr!",
|
||||
"notInTicketTitle":"Du bist in keinem Ticket!",
|
||||
"notInTicketDescription":"Der Befehl funktioniert außerhalb eines Tickets nicht!",
|
||||
"ticketDoesntExist":"Das Ticket exisitert nicht mehr!",
|
||||
"roleDoesntExist":"Die Rolle exisitiert nicht mehr!",
|
||||
"anotherOption":"Diese Option ist kein Ticket, sondern eine andere Art!",
|
||||
"maxAmountTitle":"Das Limit wurde erreicht!",
|
||||
"maxAmountDescription":"Sie haben die maximal zulässige Anzahl von Tickets erreicht!\nSie können also keine neue erstellen.!",
|
||||
"somethingWentWrong":"**Etwas ist schief gelaufen!**\nBitte versuchen Sie es ein anderes Mal!",
|
||||
"somethingWentWrongTranscript":"Bei der Erstellung der Transcript ist etwas schief gelaufen!**\nBitte versuchen Sie es ein anderes Mal!"
|
||||
"maxAmountDescription":"Sie haben die maximal zulässige Anzahl von Tickets erreicht!\nSie können also keine neuen erstellen.!",
|
||||
"somethingWentWrong":"**Etwas ist schief gelaufen!**\nBitte versuchen Sie es ein anderes Mal!"
|
||||
},
|
||||
"commands":{
|
||||
"userAddedTitle":"Added {0} to this ticket!",
|
||||
"userRemovedTitle":"Removed {0} from this ticket!",
|
||||
"renameTitle":"Changed the name to {0}!",
|
||||
"closeTitle":"Closed this ticket!",
|
||||
"deleteTitle":"Deleting this ticket...",
|
||||
"reopenTitle":"Re-Opened this ticket!",
|
||||
"claimTitle":"This ticket is now claimed to {0}",
|
||||
"unclaimTitle":"This ticket isn't claimed anymore!",
|
||||
"userAddedTitle":"User geaddet!",
|
||||
"userRemovedTitle":"User entfernt!",
|
||||
"renameTitle":"Der Name wurde geändert!",
|
||||
"closeTitle":"Dieses Ticket schließen!",
|
||||
"deleteTitle":"Löschen Sie dieses Ticket!",
|
||||
"reopenTitle":"Öffne dieses Ticket erneut!",
|
||||
|
||||
"ticketWarning":"The embed is in the message below!",
|
||||
"maxTicketWarning":"**Warning:** _You can only create {0} ticket(s) at a time!_"
|
||||
"claimTitle":"Dieses Ticket wurde beansprucht von {0}",
|
||||
"unclaimTitle":"Dieses Ticket wird nichtmehr beansprucht.",
|
||||
"changeTitle":"Ticket Typ wurde geändert zu {0}!",
|
||||
|
||||
"statsTitle":"Hier sind die Stats für {0}!",
|
||||
"autocloseTitle":"Dieses Ticket wird automatisch geschlossen in {0}!",
|
||||
"autocloseRejectTitle":"Dieses Ticket wird nichtmehr automatisch geschlossen",
|
||||
"autocloseWarn":"Dies betrifft nur inaktive Tickets!",
|
||||
|
||||
"goToTicket":"Geh zu deinem Ticket",
|
||||
"ticketWarning":"Die Einbettung befindet sich in der Nachricht unten!",
|
||||
"maxTicketWarning":"**Warnung:** _Es können maximal {0} Tickets zur gleichen Zeit geöffnet sein!_"
|
||||
},
|
||||
"helpMenu":{
|
||||
"title":"Available Commands:",
|
||||
"title":"Hilfe Menu:",
|
||||
"header1":"**Gehe zu {0} um ein Ticket zu erstellen!**\n\n",
|
||||
"header2":"**Führen Sie den Befehl `/new` oder `/ticket` um ein Ticket zu erstellen!**\n\n",
|
||||
|
||||
@@ -42,19 +52,20 @@
|
||||
"deleteCmd":"Ein Ticket löschen.",
|
||||
"addCmd":"Fügen Sie dem Ticket einen Benutzer hinzu.",
|
||||
"removeCmd":"Entfernen eines Benutzers aus dem Ticket.",
|
||||
"reopenCmd":"Öffnen Sie ein Ticket erneut, nachdem es geschlossen wurde."
|
||||
"reopenCmd":"Öffnen Sie ein Ticket erneut, nachdem es geschlossen wurde.",
|
||||
"changeCmd":"Ticket Typ ändern",
|
||||
"claimCmd":"Ticket beanspruchen",
|
||||
"unclaimCmd":"Ticket nicht mehr beanspruchen.",
|
||||
"statsCmd":"Ticket Stats",
|
||||
"autocloseCmd":"Timer wurde gesetzt auf automatisches schließen des Tickets"
|
||||
},
|
||||
"buttons":{
|
||||
"close":"Ticket schließen",
|
||||
"delete":"Ticket löschen",
|
||||
"reopen":"Ticket wieder öffnen",
|
||||
"sendTranscript":"Transcript-Datei senden",
|
||||
"closeWithReason":"Geschlossen mit dem Grund"
|
||||
},
|
||||
"messages":{
|
||||
"reopenTitle":"Dieses Ticket wiedereröffnet!",
|
||||
"reopenDescription":"Sie können gerne weiterreden!",
|
||||
"closedTitle":"Dieses Ticket geschlossen!",
|
||||
"closedDescription":"Nur Admins können jetzt in diesem Ticket sprechen!\n\n*Klicken Sie auf die Schaltfläche unten, um dieses Ticket zu löschen oder erneut zu öffnen!*",
|
||||
"createdTitle":"Ticket erstellt!",
|
||||
"createdDescription":"Ihr Ticket ist erstellt, Sie können es durch einen Ping erkennen!",
|
||||
@@ -64,20 +75,61 @@
|
||||
"deletedTicketDmTitle":"Ticket löschen!",
|
||||
"closedTicketDmDescription":"Ihr Ticket ist geschlossen!",
|
||||
"deletedTicketDmDescription":"Ihr Ticket ist gelöscht!",
|
||||
"reopenTicketDmTitle":"Ticket neu Eröffnen!",
|
||||
"reopenTicketDmDescription":"Dein Ticket ist Neu eröffnet!",
|
||||
"newTranscriptTitle":"Eine neue Transscript finden Sie hier!",
|
||||
"hereIsTheTranscript":"Hier ist das Transscript:",
|
||||
"newTranscriptTitle":"Eine neue Transcript finden Sie hier!",
|
||||
"hereIsTheTranscript":"Hier ist das Transcript:",
|
||||
|
||||
"chooseCategory":"Wähle eine Kategorie:",
|
||||
"gettingdeleted":"Ticket wird gelöscht...",
|
||||
|
||||
"none":"none",
|
||||
"reason":"reason",
|
||||
|
||||
"reason":"Grund",
|
||||
"createdat":"Erstellt um",
|
||||
"openedby":"Geöffnet um",
|
||||
"deletedby":"Gelöscht von",
|
||||
"closedby":"Geschlossen von",
|
||||
"modalreason":"Was ist der Grund für das schließen des Tickets?",
|
||||
"chooseATicket": "Wähle ein Ticket"
|
||||
|
||||
"modalreason":"Was ist der Grund?",
|
||||
"chooseATicket": "Wähle ein passendes Thema!"
|
||||
},
|
||||
"transcripts":{
|
||||
"title":"Transcript",
|
||||
"processed":"Das Transcript wird erstellt",
|
||||
"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!"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,135 @@
|
||||
{
|
||||
"_CREDITS":"ꙅoᴎɒᎸɘƚꙅ#3744",
|
||||
"_INFO":"This file is a translation for open ticket 3.5.3",
|
||||
|
||||
"errors":{
|
||||
"missingArgsTitle":"Invalid Arguments!",
|
||||
"missingArgsDescription":"Missing Argument",
|
||||
"noPermsTitle":"Δεν έχεις άδεια για να τρέξεις αυτή την εντολή!",
|
||||
"noPermsDescription":"Χρειάζεσε άδεια διαχειριστή για να τρέξεις αυτή την εντολή.",
|
||||
"noPermsDelete":"Μόνο οι διαχειριστές μπορούν να διαγράψουν τα εισιτήρια!",
|
||||
"chooseFromListTitle":"Μη έγκυρο id.",
|
||||
"chooseFromListDescription":"Διάλεξε ενα απο τα παρακάτω id:",
|
||||
"boterror":"Υπάρχει κάποιο πρόβλημα!",
|
||||
"notInTicketTitle":"Δεν είσε στο κανάλι του εισιτηρίου!",
|
||||
"notInTicketDescription":"Δεν μπορείς να τρέξεις αυτή την εντολή εκτός του εισιτηρίου",
|
||||
"ticketDoesntExist":"Αυτο το εισιτήριο δεν υπάρχει!",
|
||||
"roleDoesntExist":"Αυτός ο ρόλος δεν υπάρχει!",
|
||||
"anotherOption":"Διάλεξε άλλο λόγο για εισιτήριο!",
|
||||
"maxAmountTitle":"Έχεις ανοίξει πολλά εισιτήρια για την ώρα.",
|
||||
"maxAmountDescription":"Έχεις υπερβεί το όριο των εισιτηρίον!\nΔεν μπορείς να ανοίξεις καινούργιο.!",
|
||||
"somethingWentWrong":"**Κάτι πήγε λάθος!**\nΔοκίμασε ξανά αργότερα!"
|
||||
},
|
||||
"commands":{
|
||||
"userAddedTitle":"Ο {0} προσθέθηκε στο εισιτήριο",
|
||||
"userRemovedTitle":"Ο {0} αφαιρέθηκε απο το εισιτήριο!",
|
||||
"renameTitle":"Το όνομα άλλαξε σε {0}!",
|
||||
"closeTitle":"Το εισιτήριο έκλεισε!",
|
||||
"deleteTitle":"Διαγράφω το εισιτήριο...",
|
||||
"reopenTitle":"Το εισιτήριο ξανά άνοιξε!",
|
||||
|
||||
"claimTitle":"Το εισιτήριο διεκδικήθεικε απο τον {0}",
|
||||
"unclaimTitle":"Το εισιτήριο δεν είναι πλέον διεκδικημένο!",
|
||||
"changeTitle":"Ο τύπος του εισιτηρίου άλλαξε σε {0}!",
|
||||
|
||||
"statsTitle":"Εδώ είναι τα στατιστικά για το {0}!",
|
||||
"autocloseTitle":"Αυτό το εισιτήριο θα κλείσε σε {0}!",
|
||||
"autocloseRejectTitle":"Αυτό το εισιτήριο δεν θα κλέισε αυτόματα!",
|
||||
"autocloseWarn":"Αυτό ισχύει μονο για μή ενεργά εισιτήρια!",
|
||||
|
||||
"goToTicket":"Μεταφορά στο εισιτήριο.",
|
||||
"ticketWarning":"Το εισιτήριο είναι στο παρακάτω μήνυμα!",
|
||||
"maxTicketWarning":"**Προειδοποίηση:** _Μπορείς να φτιάξεις μόνο {0} εισιτήριο/εισιτήρια για την ώρα!_"
|
||||
},
|
||||
"helpMenu":{
|
||||
"title":"Διαθέσιμες εντολές:",
|
||||
"header1":"**Πηγαινε στο {0} για να φτιάξεις ενα νέο εισιτήριο!**\n\n",
|
||||
"header2":"**Τρέχα την εντολή `/new` ή `/ticket` για να φτιάξεις ένα εισιτήριο!**\n\n",
|
||||
|
||||
"msgCmd":"Εμφάνισε ένα embed με κουμπιά. (admins only)",
|
||||
"renameCmd":"Μετονόμασε το εισιτήριο. (όχι κενά)",
|
||||
"closeCmd":"Κλέισε το εισιτήριο.",
|
||||
"deleteCmd":"Διέγραψε το εισιτήριο.",
|
||||
"addCmd":"Πρόσθεσε κάποιον στο εισιτήριο.",
|
||||
"removeCmd":"Αφαίρεσε κάποιον απο το εισιτήριο.",
|
||||
"reopenCmd":"Ξανά άνοιξε το εισιτήριο.",
|
||||
"changeCmd":"Άλλαξε τον τύπο του εισιτηρίου.",
|
||||
"claimCmd":"Διεκδίκησε το εισιτήριο.",
|
||||
"unclaimCmd":"Unclaim a ticket.",
|
||||
"statsCmd":"Δές τα στατιστικά του εισιτηρίου.",
|
||||
"autocloseCmd":"Βάλε χρονόμετρο για να κλείσει το εισιτήριο"
|
||||
},
|
||||
"buttons":{
|
||||
"close":"κλείσε το εισιτήριο",
|
||||
"delete":"Διέγραψε το εισιτήριο",
|
||||
"reopen":"Ξανά άνοιξε το εισιτήριο",
|
||||
"closeWithReason":"Κλείσε με αιτιολόγιση"
|
||||
},
|
||||
"messages":{
|
||||
"closedDescription":"Μονο οι διαχειριστές μπορουν να διαγράψουν τα εισιτήρια!\n\n*Πάτα το παρακάτω κουμπί για να ξανά ανοίξεις το εισιτήριο!*",
|
||||
"createdTitle":"Το εισιτήριο δημιουργήθηκε!",
|
||||
"createdDescription":"Το εισιτήριο σου δημιουργήθηκε μπορείς να το βρείς με την αναφορά που έγινε στο κανάλι του εισιτηρίου!",
|
||||
|
||||
"newTicketDmTitle":"Νέο εισιτήριο!",
|
||||
"closedTicketDmTitle":"Το εισιτήριο έκλεισε!",
|
||||
"deletedTicketDmTitle":"Tο εισιτήριο διεγράφη!",
|
||||
"closedTicketDmDescription":"Το εισιτήριο σου είναι κλειστό!",
|
||||
"deletedTicketDmDescription":"Το εισιτήριο σου διεγράφη!",
|
||||
"reopenTicketDmTitle":"Tο εισιτήριο ξανά άνοιξε!",
|
||||
"reopenTicketDmDescription":"Το εισιτήριο σου ξανά άνοιξε!",
|
||||
|
||||
"chooseCategory":"Διάλεξε μία κατηγορία:",
|
||||
"gettingdeleted":"Το εισιτήριο διαγράφεται...",
|
||||
|
||||
"none":"Κανένας",
|
||||
"reason":"Λόγος",
|
||||
"createdat":"Δημιουργήθηκε",
|
||||
"openedby":"Ανοίχτηκε από",
|
||||
"deletedby":"Διεγράφη απο",
|
||||
"closedby":"Έκλεισε από",
|
||||
|
||||
"modalreason":"Γιατι να κλείσει το εισιτήριο?",
|
||||
"chooseATicket": "Δίαλεξε ενα εισιτήριο"
|
||||
},
|
||||
"transcripts":{
|
||||
"title":"Αντίγραφο",
|
||||
"processed":"Το αντίγραφο ετοιμάζεται!",
|
||||
"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!"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,135 @@
|
||||
{
|
||||
"_CREDITS":"Snowy",
|
||||
"_INFO":"This file is a translation for open ticket 3.5.3",
|
||||
|
||||
"errors":{
|
||||
"missingArgsTitle":"Hibás paraméterek!",
|
||||
"missingArgsDescription":"Hiányzó paraméterek",
|
||||
"noPermsTitle":"Nincs jogosultságod!",
|
||||
"noPermsDescription":"Szükséged van az `Adminisztrátor` jogra, vagy rajta kell lenned az engedélyezett rangok listáján!",
|
||||
"noPermsDelete":"Csak adminok törölhetik a ticketet!",
|
||||
"chooseFromListTitle":"Ismeretlen ID",
|
||||
"chooseFromListDescription":"Válassz egy ID-t az alábbi listából:",
|
||||
"boterror":"Bot Hiba!",
|
||||
"notInTicketTitle":"Nem vagy egy ticketben!",
|
||||
"notInTicketDescription":"Ez a parancs nem működik a ticketeken kívűl!",
|
||||
"ticketDoesntExist":"Ez a ticket már nem létezik!",
|
||||
"roleDoesntExist":"Ez a rang már nem létezik!",
|
||||
"anotherOption":"Ez a választás nem egy ticket, hanem más!",
|
||||
"maxAmountTitle":"Maximum limit elérve!",
|
||||
"maxAmountDescription":"Elérted a maximum engedélyezett ticketek számát!\nSzóval nem tudsz újat csinálni!",
|
||||
"somethingWentWrong":"**Valami balul sült el!**\nKérlek próbáld újra később!"
|
||||
},
|
||||
"commands":{
|
||||
"userAddedTitle":"{0} hozzáadva a tickethez!",
|
||||
"userRemovedTitle":"{0} elvéve a ticketből!",
|
||||
"renameTitle":"Ticket neve megváltoztatva erre: {0}!",
|
||||
"closeTitle":"Ticket bezárva!",
|
||||
"deleteTitle":"Ticket törlése...",
|
||||
"reopenTitle":"Ticket újranyitva!",
|
||||
|
||||
"claimTitle":"A ticketet igényelte: {0}",
|
||||
"unclaimTitle":"Már senki nem ingényeli a ticketet!",
|
||||
"changeTitle":"Ticket típus megváltoztatva erre: {0}!",
|
||||
|
||||
"statsTitle":"Ticket statisztikák erre: {0}!",
|
||||
"autocloseTitle":"Ez a ticket automatikusan be lesz zárva ennyi idő múlva: {0}!",
|
||||
"autocloseRejectTitle":"Ez a ticket nem lesz automatikusan bezárva!",
|
||||
"autocloseWarn":"Ez csak az inaktív hibajegyeket érinti!",
|
||||
|
||||
"goToTicket":"A tickethez",
|
||||
"ticketWarning":"Az embed az alábbi üzenetben van!",
|
||||
"maxTicketWarning":"**Warning:** _Csak {0} ticketet készíthetsz egy időben!_"
|
||||
},
|
||||
"helpMenu":{
|
||||
"title":"Elérhető parancsok:",
|
||||
"header1":"**Hogy elkészíts egy ticketet, menj ide: {0}!**\n\n",
|
||||
"header2":"**Futtasd a `/new` vagy `/ticket` parancsot a ticket készítéséhez!**\n\n",
|
||||
|
||||
"msgCmd":"Embed küldése gombokkal. (csak adminok)",
|
||||
"renameCmd":"Ticket átnevezése. (szóköz nélkül)",
|
||||
"closeCmd":"Ticket bezárása.",
|
||||
"deleteCmd":"Ticket törlése.",
|
||||
"addCmd":"Felhasználó hozzáadása a tickethez.",
|
||||
"removeCmd":"Felhasználó elvétele a tickettől.",
|
||||
"reopenCmd":"Ticket újranyitása miután már be lett zárva.",
|
||||
"changeCmd":"Ticket típusának megváltoztatása.",
|
||||
"claimCmd":"Ticket igénylése.",
|
||||
"unclaimCmd":"Ticket igénylésének törlése.",
|
||||
"statsCmd":"Ticket statisztikák megtekintése.",
|
||||
"autocloseCmd":"Ticketek automatikus bezárási idejének beállítása"
|
||||
},
|
||||
"buttons":{
|
||||
"close":"Ticket bezárása",
|
||||
"delete":"Ticket törlése",
|
||||
"reopen":"Ticket újranyitása",
|
||||
"closeWithReason":"Bezárás indokkal"
|
||||
},
|
||||
"messages":{
|
||||
"closedDescription":"Csak adminok tudnak ebben a ticketben beszélni!\n\n*Kattints az alábbi gombokkal hogy töröld vagy újranyisd a ticketet!*",
|
||||
"createdTitle":"Ticket Elkészítve!",
|
||||
"createdDescription":"A ticketet elkészítve, meg tudod találni egy pingel!",
|
||||
|
||||
"newTicketDmTitle":"Új ticket!",
|
||||
"closedTicketDmTitle":"Ticket bezárva!",
|
||||
"deletedTicketDmTitle":"Ticket törölve!",
|
||||
"closedTicketDmDescription":"A ticketed bezárták!",
|
||||
"deletedTicketDmDescription":"A ticketed törölték!",
|
||||
"reopenTicketDmTitle":"Ticket újranyitva!",
|
||||
"reopenTicketDmDescription":"A ticketed újranyitották!",
|
||||
|
||||
"chooseCategory":"válassz egy kategóriát:",
|
||||
"gettingdeleted":"A ticket törölve lesz...",
|
||||
|
||||
"none":"nincs",
|
||||
"reason":"indok",
|
||||
"createdat":"elkészítve ekkor:",
|
||||
"openedby":"nyitotta:",
|
||||
"deletedby":"törölve általa:",
|
||||
"closedby":"bezárva általa:",
|
||||
|
||||
"modalreason":"Mi az indokod a ticket bezárására?",
|
||||
"chooseATicket": "Válassz egy ticketet"
|
||||
},
|
||||
"transcripts":{
|
||||
"title":"Átirat",
|
||||
"processed":"Ez az átirat jelenleg feldolgozás alatt van",
|
||||
"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!"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,135 @@
|
||||
{
|
||||
"_CREDITS":"erxg",
|
||||
"_INFO":"This file is a translation for open ticket 3.5.3",
|
||||
|
||||
"errors":{
|
||||
"missingArgsTitle":"Argumen tidak valid!",
|
||||
"missingArgsDescription":"Argumen hilang",
|
||||
"noPermsTitle":"Tidak ada akses!",
|
||||
"noPermsDescription":"Anda memerlukan akses `ADMINISTRATOR` atau berada di dalam peran yang diizinkan!",
|
||||
"noPermsDelete":"Hanya admin yang dapat menghapus tiket!",
|
||||
"chooseFromListTitle":"ID Tidak Valid",
|
||||
"chooseFromListDescription":"Silahkan pilih salah satu id di bawah:",
|
||||
"boterror":"Bot Error!",
|
||||
"notInTicketTitle":"Anda tidak berada di dalam sebuah tiket!",
|
||||
"notInTicketDescription":"Perintah ini tidak bekerja di luar tiket!",
|
||||
"ticketDoesntExist":"Tiket ini sudah tidak ada lagi!",
|
||||
"roleDoesntExist":"Peran ini sudah tidak ada lagi!",
|
||||
"anotherOption":"Opsi ini bukan tiket, melainkan tipe lain!",
|
||||
"maxAmountTitle":"Batas maksimum tercapai!",
|
||||
"maxAmountDescription":"Kamu telah meraih batas maksimum tiket yang diperbolehkan!\nJadi kamu tidak bisa membuat tiket baru!",
|
||||
"somethingWentWrong":"Ada yang salah! Silakan coba lagi nanti!"
|
||||
},
|
||||
"commands":{
|
||||
"userAddedTitle":"Menambah {0} ke tiket ini!",
|
||||
"userRemovedTitle":"Mengeluarkan {0} dari tiket ini!",
|
||||
"renameTitle":"Mengganti nama menjadi {0}!",
|
||||
"closeTitle":"Menutup tiket ini!",
|
||||
"deleteTitle":"Menghapus tiket ini...",
|
||||
"reopenTitle":"Membuka ulang tiket ini!",
|
||||
|
||||
"claimTitle":"Tiket ini diklaim oleh {0}",
|
||||
"unclaimTitle":"Tiket ini tidak diklaim lagi!",
|
||||
"changeTitle":"Mengganti tipe tiket menjadi {0}!",
|
||||
|
||||
"statsTitle":"Ini adalah status untuk {0}!",
|
||||
"autocloseTitle":"Tiket ini akan tutup otomatis setelah {0}!",
|
||||
"autocloseRejectTitle":"Tiket ini tidak akan tertutup secara otomatis lagi!",
|
||||
"autocloseWarn":"Ini hanya mempengaruhi tiket yang tidak aktif!",
|
||||
|
||||
"goToTicket":"Pergi ke tiket",
|
||||
"ticketWarning":"Sematan tersebut tersedia dalam pesan di bawah ini!",
|
||||
"maxTicketWarning":"**Peringatan:** _Anda hanya bisa membuat {0} tiket dalam satu waktu!_"
|
||||
},
|
||||
"helpMenu":{
|
||||
"title":"Perintah yang tersedia:",
|
||||
"header1":"**Pergi ke {0} untuk membuat tiket!**\n\n",
|
||||
"header2":"**Jalankan perintah `/new` atau `/ticket` untuk membuat tiket!**\n\n",
|
||||
|
||||
"msgCmd":"Munculkan sematan dengan tombol. (hanya admin)",
|
||||
"renameCmd":"Ganti nama tiket. (tanpa spasi)",
|
||||
"closeCmd":"Tutup tiket.",
|
||||
"deleteCmd":"Hapus tiket.",
|
||||
"addCmd":"Tambahkan pengguna ke dalam tiket.",
|
||||
"removeCmd":"Keluarkan pengguna dari tiket.",
|
||||
"reopenCmd":"Buka ulang tiket setelah ditutup.",
|
||||
"changeCmd":"Ganti tipe tiket.",
|
||||
"claimCmd":"Klaim tiket.",
|
||||
"unclaimCmd":"Batalkan klaim tiket.",
|
||||
"statsCmd":"Lihat status tiket.",
|
||||
"autocloseCmd":"Atur timer untuk menutup tiket secara otomatis"
|
||||
},
|
||||
"buttons":{
|
||||
"close":"Tutup tiket",
|
||||
"delete":"Hapus tiket",
|
||||
"reopen":"Buka ulang tiket",
|
||||
"closeWithReason":"Tutup dengan alasan"
|
||||
},
|
||||
"messages":{
|
||||
"closedDescription":"Hanya admin yang dapat berbincang di tiket ini sekarang!\n\n*Tekan tombol di bawah untuk menghapus atau membuka ulang tiket ini!*",
|
||||
"createdTitle":"Tiket dibuat!",
|
||||
"createdDescription":"Tiket anda dibuat, anda dapat mengetahui dengan ping!",
|
||||
|
||||
"newTicketDmTitle":"Tiket baru!",
|
||||
"closedTicketDmTitle":"Tiket ditutup!",
|
||||
"deletedTicketDmTitle":"TIket dihapus!",
|
||||
"closedTicketDmDescription":"Tiket anda ditutup!",
|
||||
"deletedTicketDmDescription":"Tiket anda dihapus!",
|
||||
"reopenTicketDmTitle":"Tiket dibuka kembali!",
|
||||
"reopenTicketDmDescription":"Tiket anda dibuka kembali!",
|
||||
|
||||
"chooseCategory":"Pilih kategori:",
|
||||
"gettingdeleted":"Tiket sedang dihapus...",
|
||||
|
||||
"none":"tidak ada",
|
||||
"reason":"Alasan",
|
||||
"createdat":"dibuat di",
|
||||
"openedby":"dibuka oleh",
|
||||
"deletedby":"dihapus oleh",
|
||||
"closedby":"ditutup oleh",
|
||||
|
||||
"modalreason":"Apa alasan penutupan tiket ini?",
|
||||
"chooseATicket": "Pilih tiket"
|
||||
},
|
||||
"transcripts":{
|
||||
"title":"Transcript",
|
||||
"processed":"Transkrip sedang diproses",
|
||||
"wait":"Mohon tunggu!",
|
||||
"estimated":"Estimasi waktu",
|
||||
"available":"Transkrip tersedia di sini"
|
||||
},
|
||||
"stats":{
|
||||
"globalTitle":"Statistik Global",
|
||||
"ticketTitle":"Status Tiket Untuk {0}",
|
||||
"userTitle":"Status Pengguna Untuk {0}",
|
||||
"systemTitle":"Status Sistem",
|
||||
"versionTitle":"Versi Robot",
|
||||
|
||||
"ticketsCreated":"Tiket Dibuat",
|
||||
"ticketsClosed":"Tiket Ditutup",
|
||||
"ticketsDeleted":"Tiket Dihapus",
|
||||
"ticketsReopened":"Tiket Dibuka Kembali",
|
||||
"ticketsAutoclosed":"Tiket Ditutup Otomatis",
|
||||
"transcriptsCreated":"Transkrip Dibuat",
|
||||
"startupDate":"Tanggal Mulai",
|
||||
"latestUpdate":"Pembaruan Terbaru",
|
||||
"ticketCreatedOn":"Tiket Dibuat Pada",
|
||||
"ticketCreatedBy":"Tiket Dibuat Oleh",
|
||||
"messagesSent":"Pesan Terkirim",
|
||||
"status":"Status",
|
||||
"participants":"Partisipan",
|
||||
"role":"Peran",
|
||||
|
||||
"switches":{
|
||||
"globalAdmin":"Admin Global",
|
||||
"ticketAdmin":"Ticket Admin",
|
||||
"member":"Anggota",
|
||||
"open":"Buka",
|
||||
"reopened":"Dibuka kembali",
|
||||
"closed":"Ditutup",
|
||||
"autoclosed":"Ditutup Otomatis"
|
||||
},
|
||||
|
||||
"errorUserNotFound":"Pengguna ini tidak dapat ditemukan dalam basis data statistik!"
|
||||
}
|
||||
}
|
||||
+95
-43
@@ -1,61 +1,72 @@
|
||||
{
|
||||
"_CREDITS":"Maurizio#0268",
|
||||
"_INFO":"This file is a translation for open ticket 3.5.3",
|
||||
|
||||
"errors":{
|
||||
"missingArgsTitle":"Argomenti non validi!",
|
||||
"missingArgsDescription":"Argomento mancante",
|
||||
"noPermsTitle":"Permessi mancanti!",
|
||||
"noPermsDescription":"Hai bisogno del permesso `ADMINISTRATOR` e essere nella lista dei ruoli accettati!",
|
||||
"noPermsDelete":"Solo gli amministratori possono chiudere un ticket!",
|
||||
"missingArgsDescription":"Argomenti mancanti",
|
||||
"noPermsTitle":"Non hai i permessi sufficienti!",
|
||||
"noPermsDescription":"Hai bisogno del permesso `ADMINISTRATOR` o essere nella lista dei ruoli consentiti!",
|
||||
"noPermsDelete":"Solo gli amministratori possono eliminare i ticket!",
|
||||
"chooseFromListTitle":"ID non valido",
|
||||
"chooseFromListDescription":"Scegli uno degli ID sotto:",
|
||||
"chooseFromListDescription":"Scegli uno degli id sottostanti:",
|
||||
"boterror":"Errore del bot!",
|
||||
"notInTicketTitle":"Non sei in un ticket!",
|
||||
"notInTicketDescription":"Questo comando non funziona fuori da un ticket!",
|
||||
"ticketDoesntExist":"Questo ticket non esiste più!",
|
||||
"roleDoesntExist":"Questo ruolo non esiste più!",
|
||||
"anotherOption":"Questa opzione non è di un ticket!",
|
||||
"maxAmountTitle":"Massimo numero raggiunto!",
|
||||
"maxAmountDescription":"Hai raggiunto il massimo numero di ticket consentiti!\nNon puoi crearne altri!",
|
||||
"somethingWentWrong":"**Qualcosa è andato storto!**\nPerfavore riprova un'altra volta!",
|
||||
"somethingWentWrongTranscript":"Qualcosa è andata storta durante la trascrizione!**\nPerfavore riprova un'altra volta!"
|
||||
"notInTicketDescription":"Questo comando non funziona al di fuori di un ticket!",
|
||||
"ticketDoesntExist":"Questo ticket non esiste!",
|
||||
"roleDoesntExist":"Questo ruolo non esiste!",
|
||||
"anotherOption":"Questa opzione non è un ticket ma un'altra!",
|
||||
"maxAmountTitle":"Massimo ammontare raggiunto!",
|
||||
"maxAmountDescription":"Hai raggiunto il massimo di ticket aperti!\nNon puoi creare altri!",
|
||||
"somethingWentWrong":"*Qualcosa è andato storto!*\nPerfavore riprova un'altra volta!"
|
||||
},
|
||||
"commands":{
|
||||
"userAddedTitle":"Aggiunto {0} al ticket!",
|
||||
"userRemovedTitle":"Rimosso {0} da questo ticket!",
|
||||
"renameTitle":"Cambia il nome in {0}!",
|
||||
"closeTitle":"Chiudo questo ticket!",
|
||||
"userAddedTitle":"Aggiunti {0} a questo ticket!",
|
||||
"userRemovedTitle":"Rimossi {0} da questo ticket!",
|
||||
"renameTitle":"Cambiato il nome a {0}!",
|
||||
"closeTitle":"Ticket chiuso!",
|
||||
"deleteTitle":"Eliminando questo ticket...",
|
||||
"reopenTitle":"Ri-Aperto questo ticket!",
|
||||
"claimTitle":"This ticket is now claimed to {0}",
|
||||
"unclaimTitle":"This ticket isn't claimed anymore!",
|
||||
"reopenTitle":"Ri-aperto questo ticket!",
|
||||
|
||||
"claimTitle":"Questo ticket adesso è gestito da {0}",
|
||||
"unclaimTitle":"Questo ticket non è più gestito!",
|
||||
"changeTitle":"Ticket cambiato in {0}!",
|
||||
|
||||
"statsTitle":"Queste sono le stats per {0}!",
|
||||
"autocloseTitle":"Questo ticket sarà eliminato direttamente dopo {0}!",
|
||||
"autocloseRejectTitle":"Questo ticket non sarà più chiuso automaticamente!",
|
||||
"autocloseWarn":"Questo vale solo per i ticket inattivi!",
|
||||
|
||||
"goToTicket":"vai al ticket",
|
||||
"ticketWarning":"L'embed è nel messaggio sotto!",
|
||||
"maxTicketWarning":"**Attenzione:** _Tu puoi creare solo {0} ticket(s) per volta!_"
|
||||
"maxTicketWarning":"*Attenzione:* Tu puoi creare solo {0} ticket alla volta!"
|
||||
},
|
||||
"helpMenu":{
|
||||
"title":"Comandi disponibili:",
|
||||
"header1":"**Vai a {0} per creare un ticket!**\n\n",
|
||||
"header2":"**Esegui il comando `/new` o `/ticket` per creare un ticket!**\n\n",
|
||||
"header1":"*Vai a {0} per creare un ticket!*\n\n",
|
||||
"header2":"*Esegui il comando `/new` o `/ticket` per creare un ticket!*\n\n",
|
||||
|
||||
"msgCmd":"Crea un embed con pulsanti. (solo amministratori)",
|
||||
"msgCmd":"Crea un embed con bottoni. (solo amministratori)",
|
||||
"renameCmd":"Rinomina un ticket. (senza spazi)",
|
||||
"closeCmd":"Chiudi un ticket.",
|
||||
"deleteCmd":"Elimina un ticket.",
|
||||
"addCmd":"Aggiungi un membro al ticket.",
|
||||
"removeCmd":"Rimuovi un membro dal ticket.",
|
||||
"reopenCmd":"Riapri un ticket dopo averlo chiuso."
|
||||
"addCmd":"Aggiungi un utente al ticket.",
|
||||
"removeCmd":"Rimuovi un utente da un ticket.",
|
||||
"reopenCmd":"Ri-apri un ticket dopo averlo chiuso.",
|
||||
"changeCmd":"Cambia tipo di ticket.",
|
||||
"claimCmd":"Gestisci un ticket.",
|
||||
"unclaimCmd":"Lascia la gestione del ticket.",
|
||||
"statsCmd":"Vedi le statistiche dei ticket.",
|
||||
"autocloseCmd":"Imposta il timer dell'autochiusura dei ticket"
|
||||
},
|
||||
"buttons":{
|
||||
"close":"Chiudi il ticket",
|
||||
"delete":"Elimina il ticket",
|
||||
"reopen":"Riapri il ticket",
|
||||
"sendTranscript":"Trascrizione",
|
||||
"closeWithReason":"chiudi con un motivo"
|
||||
"close":"Chiudi",
|
||||
"delete":"Elimini",
|
||||
"reopen":"Ri-apri un ticket",
|
||||
"closeWithReason":"chiudi con motivo"
|
||||
},
|
||||
"messages":{
|
||||
"reopenTitle":"Riaperto questo ticket!",
|
||||
"reopenDescription":"Sentiti libero di parlare di nuovo!",
|
||||
"closedTitle":"Chiudo questo ticket!",
|
||||
"closedDescription":"Solo gli amministratori possono parlare in questo ticket ora!\n\n*Clicca sul bottone sotto per chiudere o riaprire questo ticket!*",
|
||||
"closedDescription":"Solo gli amministratori possono parlare in questo ticket ora!\n\n*Clicca sul pulsante sotto per eliminare o ri-aprire questo ticket!*",
|
||||
"createdTitle":"Ticket creato!",
|
||||
"createdDescription":"Il tuo ticket è stato creato, puoi capirlo dal ping!",
|
||||
|
||||
@@ -63,21 +74,62 @@
|
||||
"closedTicketDmTitle":"Ticket chiuso!",
|
||||
"deletedTicketDmTitle":"Ticket eliminato!",
|
||||
"closedTicketDmDescription":"Il tuo ticket è chiuso!",
|
||||
"deletedTicketDmDescription":"Il tuo ticket è stato eliminato!",
|
||||
"reopenTicketDmTitle":"Ticket riaperto!",
|
||||
"reopenTicketDmDescription":"Il tuo ticket è stato riaperto!",
|
||||
"newTranscriptTitle":"Un nuova trascrizione è qui!",
|
||||
"hereIsTheTranscript":"Qui è la trascrizione:",
|
||||
"deletedTicketDmDescription":"Il tuo ticket è eliminato!",
|
||||
"reopenTicketDmTitle":"Ticket ri-aperto!",
|
||||
"reopenTicketDmDescription":"Il tuo ticket è stato ri-aperto!",
|
||||
|
||||
"chooseCategory":"scegli una categoria:",
|
||||
"gettingdeleted":"Il ticket sta per essere chiuso...",
|
||||
|
||||
"none":"nessuno",
|
||||
"reason":"motivo",
|
||||
|
||||
"createdat":"creato il",
|
||||
"openedby":"aperto da",
|
||||
"deletedby":"eliminato da",
|
||||
"closedby":"chiuso da",
|
||||
"modalreason":"Quale'è il motivo per chiudere il ticket?",
|
||||
|
||||
"modalreason":"Quale è il motivo per chiudere questo ticket?",
|
||||
"chooseATicket": "Scegli un ticket"
|
||||
},
|
||||
"transcripts":{
|
||||
"title":"Trascrizione",
|
||||
"processed":"Questo ticket sta per essere processato",
|
||||
"wait":"Perfavore attendi!",
|
||||
"estimated":"Tempo estimato",
|
||||
"available":"La trascrizione è disponibile qui"
|
||||
},
|
||||
"stats": {
|
||||
"globalTitle": "Statistiche Globali",
|
||||
"ticketTitle": "Statistiche Ticket per {0}",
|
||||
"userTitle": "Statistiche Utenti per {0}",
|
||||
"systemTitle": "Sistema Statistiche",
|
||||
"versionTitle": "Versione Bot",
|
||||
|
||||
"ticketsCreated": "Tickets Creato",
|
||||
"ticketsClosed": "Tickets Chiuso",
|
||||
"ticketsDeleted": "Tickets Eliminato",
|
||||
"ticketsReopened": "Tickets Riaperto",
|
||||
"ticketsAutoclosed": "Tickets Chiuso Automaticamente",
|
||||
"transcriptsCreated": "Transcrizione Creata",
|
||||
"startupDate": "Data Inizio",
|
||||
"latestUpdate": "Ultimo Update",
|
||||
"ticketCreatedOn": "Ticket Creato Su",
|
||||
"ticketCreatedBy": "Ticket Creato Da",
|
||||
"messagesSent": "Messaggi Inviati",
|
||||
"status": "Stato",
|
||||
"participants": "Partecipanti",
|
||||
"role": "Ruolo",
|
||||
|
||||
"switches": {
|
||||
"globalAdmin": "Amministratore Globale",
|
||||
"ticketAdmin": "Amministratore Ticket",
|
||||
"member": "Membro",
|
||||
"open": "Aperto",
|
||||
"reopened": "Riaperto",
|
||||
"closed": "Chiuso",
|
||||
"autoclosed": "Chiuso Automaticamente"
|
||||
},
|
||||
|
||||
"errorUserNotFound": "Questo utente non può essere trovato nel database delle statistiche!"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,135 @@
|
||||
{
|
||||
"_CREDITS":"NoOneNook#0266",
|
||||
"_INFO":"This file is a translation for open ticket 3.5.3",
|
||||
|
||||
"errors":{
|
||||
"missingArgsTitle":"Ugyldige argumenter!",
|
||||
"missingArgsDescription":"Manglende argument",
|
||||
"noPermsTitle":"Ingen rettigheter",
|
||||
"noPermsDescription":"Du trenger administrator eller moderator rettigheter",
|
||||
"noPermsDelete":"Bare staff kan slette en ticket!",
|
||||
"chooseFromListTitle":"Ugyldig ID",
|
||||
"chooseFromListDescription":"Velg en av ID-ene nedenfor:",
|
||||
"boterror":"Bot Error!",
|
||||
"notInTicketTitle":"Du er ikke i en ticket!",
|
||||
"notInTicketDescription":"Du kan ikke bruke denne command utenfor en ticket.",
|
||||
"ticketDoesntExist":"Ticket finnes ikke lenger!",
|
||||
"roleDoesntExist":"Rollen eksisterer ikke lenger!",
|
||||
"anotherOption":"Dette alternativet er ikke en ticket!",
|
||||
"maxAmountTitle":"Maks antall er nådd!",
|
||||
"maxAmountDescription":"Du har nådd maksimalt antall tillatte ticket's\nSå du kan ikke lage en ny før de andre er lukket!",
|
||||
"somethingWentWrong":"**Noe gikk galt!**\nVennligst prøv igjen senere!"
|
||||
},
|
||||
"commands":{
|
||||
"userAddedTitle":"{0} har blitt lagt til i ticket!",
|
||||
"userRemovedTitle":"Fjernet {0} fra ticket!",
|
||||
"renameTitle":"Endret navn til {0}!",
|
||||
"closeTitle":"Ticket er blitt lukket!",
|
||||
"deleteTitle":"Sletter ticket...",
|
||||
"reopenTitle":"Ticket er gjenåpnet",
|
||||
|
||||
"claimTitle":"{0} har tatt over denne saken!",
|
||||
"unclaimTitle":"Denne ticket er blitt ledig igjen!",
|
||||
"changeTitle":"Endret ticket-type til {0}!",
|
||||
|
||||
"statsTitle":"Her er statistikken for {0}!",
|
||||
"autocloseTitle":"Denne ticket stenges automatisk etter kl {0}!",
|
||||
"autocloseRejectTitle":"Denne ticket vil ikke lenger stenges automatisk!",
|
||||
"autocloseWarn":"Dette påvirker kun inaktive tickets!",
|
||||
|
||||
"goToTicket":"DIN TICKET",
|
||||
"ticketWarning":"Embed er i meldingen nedenfor!",
|
||||
"maxTicketWarning":"**Advarsel:** _Du kan bare opprette {0}ticket(s) om gangen!_"
|
||||
},
|
||||
"helpMenu":{
|
||||
"title":"Tilgjengelige Commands:",
|
||||
"header1":"**Gå til {0} for å opprette en ticket!**\n\n",
|
||||
"header2":"**Skriv kommandoen `/new` eller `/ticket` for å lage en ticket!**\n\n",
|
||||
|
||||
"msgCmd":"Lag en embed med knapper. (admins only)",
|
||||
"renameCmd":"Gi nytt navn til en ticket. (ingen mellomrom)",
|
||||
"closeCmd":"Lukk en ticket.",
|
||||
"deleteCmd":"Slett en ticket.",
|
||||
"addCmd":"Legg til en bruker i ticket.",
|
||||
"removeCmd":"Fjern en bruker fra ticket.",
|
||||
"reopenCmd":"Åpne en ticket på nytt etter at den ble avsluttet.",
|
||||
"changeCmd":"Endre ticket kategori",
|
||||
"claimCmd":"Ta over ticket.",
|
||||
"unclaimCmd":"Frigjør den fra ticket.",
|
||||
"statsCmd":"Se ticket stats.",
|
||||
"autocloseCmd":"Still inn når ticket lukkes automatisk etter den ble åpnet"
|
||||
},
|
||||
"buttons":{
|
||||
"close":"Lukk Ticket",
|
||||
"delete":"Slett Ticket",
|
||||
"reopen":"Gjenåpne Ticket",
|
||||
"closeWithReason":"Legg til årsak"
|
||||
},
|
||||
"messages":{
|
||||
"closedDescription":"Bare staff medlemmer kan snakke i denne ticket nå!\n\n*Klikk på knappen nedenfor for å slette eller åpne ticket på nytt!*",
|
||||
"createdTitle":"Ticket er laget!",
|
||||
"createdDescription":"__Du finner den ved å trykke på knappen under__",
|
||||
|
||||
"newTicketDmTitle":"New Ticket!",
|
||||
"closedTicketDmTitle":"Ticket Åpnet!",
|
||||
"deletedTicketDmTitle":"Ticket Slettet!",
|
||||
"closedTicketDmDescription":"Din ticket er lukket!",
|
||||
"deletedTicketDmDescription":"Din ticket er slettet!",
|
||||
"reopenTicketDmTitle":"Ticket gjenåpnet!",
|
||||
"reopenTicketDmDescription":"Din icket er gjenåpnet!",
|
||||
|
||||
"chooseCategory":"Velg en kategori:",
|
||||
"gettingdeleted":"Ticket slettes....",
|
||||
|
||||
"none":"Ingen",
|
||||
"reason":"Grunnlag",
|
||||
"createdat":"Laget",
|
||||
"openedby":"Laget av",
|
||||
"deletedby":"Slettet av",
|
||||
"closedby":"Lukket av",
|
||||
|
||||
"modalreason":"Grunnlag for lukking!",
|
||||
"chooseATicket": "Velg en ticket"
|
||||
},
|
||||
"transcripts":{
|
||||
"title":"Ticket logg",
|
||||
"processed":"Logg fil lages, snart klar!",
|
||||
"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!"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,135 @@
|
||||
{
|
||||
"_CREDITS":"MKevas#8311",
|
||||
"_INFO":"This file is a translation for open ticket 3.5.3",
|
||||
|
||||
"errors":{
|
||||
"missingArgsTitle":"Nieprawidłowe argumenty!",
|
||||
"missingArgsDescription":"Brakujący argument",
|
||||
"noPermsTitle":"Brak permisji!",
|
||||
"noPermsDescription":"Musisz mieć uprawnienia `ADMINISTRATOR` lub być na liście dozwolonych ról!",
|
||||
"noPermsDelete":"Tylko administratorzy mogą usunąć zgłoszenie!",
|
||||
"chooseFromListTitle":"Błędne ID",
|
||||
"chooseFromListDescription":"Wybierz jeden z poniższych identyfikatorów:",
|
||||
"boterror":"Błąd bota!",
|
||||
"notInTicketTitle":"Nie jesteś w tickecie!",
|
||||
"notInTicketDescription":"To polecenie nie działa poza ticketami!",
|
||||
"ticketDoesntExist":"Ten ticket już nie istnieje!",
|
||||
"roleDoesntExist":"Ta rola już nie istnieje!",
|
||||
"anotherOption":"Ta opcja nie jest ticketem, ale innym typem!",
|
||||
"maxAmountTitle":"Maksymalna liczba osiągnięta!",
|
||||
"maxAmountDescription":"Osiągnąłeś maksymalną dozwoloną liczbę ticketów!\nWięc nie możesz stworzyć nowego!",
|
||||
"somethingWentWrong":"**Coś poszło nie tak!**\nSpróbuj ponownie innym razem!"
|
||||
},
|
||||
"commands":{
|
||||
"userAddedTitle":"Dodano {0} do tego ticketa!",
|
||||
"userRemovedTitle":"Usunięto {0} z tego ticketa!",
|
||||
"renameTitle":"Zmieniono nazwę na {0}!",
|
||||
"closeTitle":"Zamknięto ten ticket!",
|
||||
"deleteTitle":"Usuwanie tego zgłoszenia..",
|
||||
"reopenTitle":"Ponownie otwarto ten ticket!",
|
||||
|
||||
"claimTitle":"Ten ticket został odebrany przez {0}",
|
||||
"unclaimTitle":"Nie można już odebrać tego biletu!",
|
||||
"changeTitle":"Changed ticket type to {0}!",
|
||||
|
||||
"statsTitle":"Oto statystyki dotyczące {0}!",
|
||||
"autocloseTitle":"Ten ticket zostanie automatycznie zamknięty po {0}!",
|
||||
"autocloseRejectTitle":"Ten ticket nie będzie już automatycznie zamykany!",
|
||||
"autocloseWarn":"Dotyczy to tylko nieaktywnych biletów!",
|
||||
|
||||
"goToTicket":"Przejdź do ticketa",
|
||||
"ticketWarning":"Osadzenie znajduje się w wiadomości poniżej!",
|
||||
"maxTicketWarning":"**Ostrzeżenie:** _Możesz utworzyć tylko {0} bilet(ów) na raz!_"
|
||||
},
|
||||
"helpMenu":{
|
||||
"title":"Dostępne polecenia:",
|
||||
"header1":"**Przejdź do {0}, aby utworzyć zgłoszenie!**\n\n",
|
||||
"header2":"**Uruchom polecenie `/new` lub `/ticket`, aby utworzyć zgłoszenie!**\n\n",
|
||||
|
||||
"msgCmd":"Odradzaj osadzanie za pomocą przycisków. (tylko administratorzy)",
|
||||
"renameCmd":"Zmień nazwę zgłoszenia. (bez spacji)",
|
||||
"closeCmd":"Zamknij ticket.",
|
||||
"deleteCmd":"Skasuj ticket.",
|
||||
"addCmd":"Dodaj użytkownika do zgłoszenia.",
|
||||
"removeCmd":"Usuń użytkownika ze zgłoszenia.",
|
||||
"reopenCmd":"Otwórz ponownie ticket po jego zamknięciu.",
|
||||
"changeCmd":"Zmień typ ticketa.",
|
||||
"claimCmd":"Odbierz ticket.",
|
||||
"unclaimCmd":"Zrezygnuj z ticketa.",
|
||||
"statsCmd":"Pokaż statystyki zgłoszenia.",
|
||||
"autocloseCmd":"Ustaw timer, aby automatycznie zamykał ticket."
|
||||
},
|
||||
"buttons":{
|
||||
"close":"Zamknij",
|
||||
"delete":"Skasuj",
|
||||
"reopen":"Otworz ponownie",
|
||||
"closeWithReason":"Zamknij z powodem"
|
||||
},
|
||||
"messages":{
|
||||
"closedDescription":"Tylko admini mogą teraz rozmawiać w tym zgłoszeniu!\n\n*Kliknij przycisk poniżej, aby usunąć lub ponownie otworzyć ten ticket!*",
|
||||
"createdTitle":"Ticket Created!",
|
||||
"createdDescription":"Twój ticket został utworzony, możesz go wykryć za pomocą pingu!",
|
||||
|
||||
"newTicketDmTitle":"Nowy Ticket!",
|
||||
"closedTicketDmTitle":"Ticket Zamknięty!",
|
||||
"deletedTicketDmTitle":"Ticket Skasowany!",
|
||||
"closedTicketDmDescription":"Twój ticket jest zamknięty!",
|
||||
"deletedTicketDmDescription":"Twój ticket został skasowany!",
|
||||
"reopenTicketDmTitle":"Ticket otwarty!",
|
||||
"reopenTicketDmDescription":"Twój ticket został ponownie otwarty!",
|
||||
|
||||
"chooseCategory":"Wybierz kategorię:",
|
||||
"gettingdeleted":"Ticket jest usuwany..",
|
||||
|
||||
"none":"brak",
|
||||
"reason":"powód",
|
||||
"createdat":"utworzony",
|
||||
"openedby":"otwarte przez",
|
||||
"deletedby":"skasowane przez",
|
||||
"closedby":"zamknięte przez",
|
||||
|
||||
"modalreason":"Jaki jest powód zamknięcia tego zgłoszenia?",
|
||||
"chooseATicket": "Wybierz zgłoszenie"
|
||||
},
|
||||
"transcripts":{
|
||||
"title":"Transkrypcja",
|
||||
"processed":"Ta transkrypcja jest przetwarzana",
|
||||
"wait":"Proszę czekać!",
|
||||
"estimated":"Szacowany czas",
|
||||
"available":"Transkrypcja jest dostępna tutaj"
|
||||
},
|
||||
"stats":{
|
||||
"globalTitle":"Globalne Statystyki",
|
||||
"ticketTitle":"Statystyki biletów dla {0}",
|
||||
"userTitle":"Statystyki użytkowników dla {0}",
|
||||
"systemTitle":"Statystyki systemu",
|
||||
"versionTitle":"Wersja bota",
|
||||
|
||||
"ticketsCreated":"Bilety stworzone",
|
||||
"ticketsClosed":"Bilety zamknięte",
|
||||
"ticketsDeleted":"Bilety skasowane",
|
||||
"ticketsReopened":"Bilety otwarte ponownie",
|
||||
"ticketsAutoclosed":"Bilety automatycznie zamknięte",
|
||||
"transcriptsCreated":"Utworzono transkrypcje",
|
||||
"startupDate":"Data uruchomienia",
|
||||
"latestUpdate":"Najnowsza aktualizacja",
|
||||
"ticketCreatedOn":"Bilet został utworzony dnia",
|
||||
"ticketCreatedBy":"Bilet stworzony przez",
|
||||
"messagesSent":"Wiadomość wysłana",
|
||||
"status":"Status",
|
||||
"participants":"Uczestnicy",
|
||||
"role":"Rola",
|
||||
|
||||
"switches":{
|
||||
"globalAdmin":"Globalny administrator",
|
||||
"ticketAdmin":"Admin biletowy",
|
||||
"member":"Użytkownik",
|
||||
"open":"Otwarte",
|
||||
"reopened":"Otwarte ponownie",
|
||||
"closed":"Zamknięte",
|
||||
"autoclosed":"Automatycznie zamknięte"
|
||||
},
|
||||
|
||||
"errorUserNotFound":"Tego użytkownika nie można znaleźć w bazie statystyk!"
|
||||
}
|
||||
}
|
||||
+70
-18
@@ -1,4 +1,7 @@
|
||||
{
|
||||
"_CREDITS":"QuirAddon#9778",
|
||||
"_INFO":"This file is a translation for open ticket 3.5.3",
|
||||
|
||||
"errors":{
|
||||
"missingArgsTitle":"Argumentos inválidos!",
|
||||
"missingArgsDescription":"Argumento ausente",
|
||||
@@ -15,8 +18,7 @@
|
||||
"anotherOption":"Esta opção não é um ticket, mas sim outro tipo!",
|
||||
"maxAmountTitle":"Quantidade máxima atingida!",
|
||||
"maxAmountDescription":"Você atingiu o número máximo de tickets permitidos!\nEntão você não pode criar um novo!",
|
||||
"somethingWentWrong":"**Algo deu errado!**\nPor favor, tente novamente outra vez!",
|
||||
"somethingWentWrongTranscript":"Algo deu errado ao fazer a transcrição!**\nPor favor, tente novamente outra vez!"
|
||||
"somethingWentWrong":"**Algo deu errado!**\nPor favor, tente novamente outra vez!"
|
||||
},
|
||||
"commands":{
|
||||
"userAddedTitle":"Adicionado {0} a este ticket!",
|
||||
@@ -25,9 +27,17 @@
|
||||
"closeTitle":"Fechado este ticket!",
|
||||
"deleteTitle":"Excluindo este ticket...",
|
||||
"reopenTitle":"Reabriu este ticket!",
|
||||
"claimTitle":"This ticket is now claimed to {0}",
|
||||
"unclaimTitle":"This ticket isn't claimed anymore!",
|
||||
|
||||
"claimTitle":"Esse ticket foi reinvidicado {0}",
|
||||
"unclaimTitle":"Esse ticket não foi reinvidicado!",
|
||||
"changeTitle":"Tipo de ticket alterado para {0}!",
|
||||
|
||||
"statsTitle":"Aqui estão as estatísticas para {0}!",
|
||||
"autocloseTitle":"Este ticket vai fechar altomaticamente após {0}!",
|
||||
"autocloseRejectTitle":"Este ticket não será mais fechado automaticamente!",
|
||||
"autocloseWarn":"Isso apenas afeta tickets inativos!",
|
||||
|
||||
"goToTicket":"ir para ticket",
|
||||
"ticketWarning":"A incorporação está na mensagem abaixo!",
|
||||
"maxTicketWarning":"**Cuidado:** _Você só pode criar {0} ticket(s) de cada vez!!_"
|
||||
},
|
||||
@@ -42,19 +52,20 @@
|
||||
"deleteCmd":"Excluir um ticket.",
|
||||
"addCmd":"Adicionar um usuário ao ticket.",
|
||||
"removeCmd":"Remover um usuário do ticket.",
|
||||
"reopenCmd":"Reabra um ticket depois que ele foi fechado."
|
||||
"reopenCmd":"Reabra um ticket depois que ele foi fechado.",
|
||||
"changeCmd":"Mudar tipo de ticket",
|
||||
"claimCmd":"Resgatar Ticket",
|
||||
"unclaimCmd":"Desresgatar Ticket",
|
||||
"statsCmd":"Olhar status do ticket",
|
||||
"autocloseCmd":"Definir tempo para fechar ticket automaticamente."
|
||||
},
|
||||
"buttons":{
|
||||
"close":"Fechar Ticket",
|
||||
"delete":"Excluir Ticket",
|
||||
"reopen":"Reabrir Ticket",
|
||||
"sendTranscript":"Transcrição",
|
||||
"closeWithReason":"close with reason"
|
||||
"closeWithReason":"fechado com motivo"
|
||||
},
|
||||
"messages":{
|
||||
"reopenTitle":"Reabriu este ticket!",
|
||||
"reopenDescription":"Sinta-se à vontade para falar novamente!",
|
||||
"closedTitle":"Fechado este ticket!",
|
||||
"closedDescription":"Somente administradores podem falar neste ticket agora!\n\n*Clique no botão abaixo para excluir ou reabrir este ticket!*",
|
||||
"createdTitle":"Ticket criado!",
|
||||
"createdDescription":"Seu ticket foi criado, você pode detectá-lo com um ping!",
|
||||
@@ -66,18 +77,59 @@
|
||||
"deletedTicketDmDescription":"Seu bilhete foi excluído!",
|
||||
"reopenTicketDmTitle":"Ticket reaberto!",
|
||||
"reopenTicketDmDescription":"Seu ticket foi reaberto!",
|
||||
"newTranscriptTitle":"Uma nova transcrição está aqui!",
|
||||
"hereIsTheTranscript":"Aqui está a transcrição:",
|
||||
|
||||
"chooseCategory":"Escolha a categoria:",
|
||||
"gettingdeleted":"Ticket está sendo deletado...",
|
||||
|
||||
"none":"none",
|
||||
"reason":"reason",
|
||||
"none":"vazio",
|
||||
"reason":"motivo",
|
||||
"createdat":"Criado por:",
|
||||
"openedby":"Aberto por:",
|
||||
"deletedby":"deletado por",
|
||||
"closedby":"fechado por",
|
||||
|
||||
"deletedby":"deleted by",
|
||||
"closedby":"closed by",
|
||||
"modalreason":"What is the reason for closing this ticket?",
|
||||
"chooseATicket": "Choose a ticket"
|
||||
"modalreason":"Qual o motivo de fechar o ticket?",
|
||||
"chooseATicket": "Fechar Ticket"
|
||||
},
|
||||
"transcripts":{
|
||||
"title":"Transcrever",
|
||||
"processed":"A Transcrição está em andamento",
|
||||
"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!"
|
||||
}
|
||||
}
|
||||
+64
-12
@@ -1,4 +1,7 @@
|
||||
{
|
||||
"_CREDITS":"Sanke#6086",
|
||||
"_INFO":"This file is a translation for open ticket 3.5.3",
|
||||
|
||||
"errors":{
|
||||
"missingArgsTitle":"Argumente Invalide",
|
||||
"missingArgsDescription":"Argument Lipsa",
|
||||
@@ -15,8 +18,7 @@
|
||||
"anotherOption":"Aceasta optiune este altceva decat un tip de ticket!",
|
||||
"maxAmountTitle":"Limita atinsa!",
|
||||
"maxAmountDescription":"Ai atins limita de tickets!\nAsa ca nu mai poti creea altele noi!",
|
||||
"somethingWentWrong":"**Ceva nu a mers bine!**\nTe rugam sa incerci mai tarziu!",
|
||||
"somethingWentWrongTranscript":"Ceva nu aa mers bine in timpul creeari transcript-ului!**\nTe rugam sa incerci mai tarziu!"
|
||||
"somethingWentWrong":"**Ceva nu a mers bine!**\nTe rugam sa incerci mai tarziu!"
|
||||
},
|
||||
"commands":{
|
||||
"userAddedTitle":"{0} a fost adaugat in acest ticket!",
|
||||
@@ -25,9 +27,17 @@
|
||||
"closeTitle":"Ticket inchis!",
|
||||
"deleteTitle":"Se sterge ticket-ul...",
|
||||
"reopenTitle":"Ticket Re-deschis!",
|
||||
"claimTitle":"This ticket is now claimed to {0}",
|
||||
"unclaimTitle":"This ticket isn't claimed anymore!",
|
||||
|
||||
"claimTitle":"Acest ticket a primit claim de la {0}",
|
||||
"unclaimTitle":"Acest ticket nu mai este detinut!",
|
||||
"changeTitle":"A fost schimbat tipul ticket-ului la {0}!",
|
||||
|
||||
"statsTitle":"Acestea sunt informatiile pentru {0}!",
|
||||
"autocloseTitle":"Acest ticket va fi inchis automat dupa {0}!",
|
||||
"autocloseRejectTitle":"Acest ticket nu va mai fi inchis automat!",
|
||||
"autocloseWarn":"Aceasta optiune afecteaza numai ticketele inactive!",
|
||||
|
||||
"goToTicket":"Mergi la ticket",
|
||||
"ticketWarning":"Embed-ul se afla in mesajul de mai jos!",
|
||||
"maxTicketWarning":"**Avertizare:** _Poti creea doar {0} tickete active!_"
|
||||
},
|
||||
@@ -42,19 +52,20 @@
|
||||
"deleteCmd":"Sterge un ticket.",
|
||||
"addCmd":"Adauga un utilizator in ticket.",
|
||||
"removeCmd":"Sterge un utilizator din ticket.",
|
||||
"reopenCmd":"Re-deschide un ticket dupa ce a fost deschis."
|
||||
"reopenCmd":"Re-deschide un ticket dupa ce a fost deschis.",
|
||||
"changeCmd":"Schimba categoria ticket-ului.",
|
||||
"claimCmd":"Revendica un ticket",
|
||||
"unclaimCmd":"Anuleaza revendicarea unui ticket.",
|
||||
"statsCmd":"Afiseasa informatiile ticket-ului.",
|
||||
"autocloseCmd":"Seteaza un cronometru pentru inchiderea ticket-ului."
|
||||
},
|
||||
"buttons":{
|
||||
"close":"Inchide ticket-ul",
|
||||
"delete":"Sterge ticket-ul",
|
||||
"reopen":"Re-deschide un ticket",
|
||||
"sendTranscript":"Transcript",
|
||||
"closeWithReason":"Inchide cu motiv"
|
||||
},
|
||||
"messages":{
|
||||
"reopenTitle":"Ticket Re-deschis!",
|
||||
"reopenDescription":"Poti vorbi din nou!",
|
||||
"closedTitle":"Ticket inchis!",
|
||||
"closedDescription":"Doar adminii pot vorbi in acest ticket acum!\n\n*Apasa pe butonul de mai jos pentru a re-deschide ori sterge ticket-ul!*",
|
||||
"createdTitle":"Ticket Creat!",
|
||||
"createdDescription":"Ticket-ul tau a fost creat, poti sa il vezi in canalul pe care ai fost mentionat!",
|
||||
@@ -66,18 +77,59 @@
|
||||
"deletedTicketDmDescription":"Ticket-ul tau este sters!",
|
||||
"reopenTicketDmTitle":"Ticket Re-deschis!",
|
||||
"reopenTicketDmDescription":"Ticket-ul tau este re-deschis!",
|
||||
"newTranscriptTitle":"Un nou transcript este aici!",
|
||||
"hereIsTheTranscript":"Aici este transcriptul:",
|
||||
|
||||
"chooseCategory":"Alege o categorie:",
|
||||
"gettingdeleted":"Ticket-ul se sterge...",
|
||||
|
||||
"none":"niciunul",
|
||||
"reason":"Motiv",
|
||||
|
||||
"createdat":"Creat la",
|
||||
"openedby":"Deschis de",
|
||||
"deletedby":"Sters de",
|
||||
"closedby":"Inchis de",
|
||||
|
||||
"modalreason":"Care este motivul pentru inchiderea acestui ticket?",
|
||||
"chooseATicket": "Alege un ticket"
|
||||
},
|
||||
"transcripts":{
|
||||
"title":"Transcript",
|
||||
"processed":"Transcript in curs de procesare...",
|
||||
"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!"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,135 @@
|
||||
{
|
||||
"_CREDITS":"Apexo#0723",
|
||||
"_INFO":"This file is a translation for open ticket 3.5.3",
|
||||
|
||||
"errors":{
|
||||
"missingArgsTitle":"Неверные аргументы!",
|
||||
"missingArgsDescription":"Отсутствует аргумент",
|
||||
"noPermsTitle":"Недостаточно прав!",
|
||||
"noPermsDescription":"Вы должны иметь права `ADMINISTRATOR` или быть в списке разрешённых ролей!",
|
||||
"noPermsDelete":"Только админы могут удалить тикет!",
|
||||
"chooseFromListTitle":"Неверный ID",
|
||||
"chooseFromListDescription":"Выберите один из id ниже:",
|
||||
"boterror":"Ошибка бота!",
|
||||
"notInTicketTitle":"Вы не в тикете!",
|
||||
"notInTicketDescription":"Эта команда не работает вне тикетов!",
|
||||
"ticketDoesntExist":"Этого тикета больше не существует!",
|
||||
"roleDoesntExist":"Этой роли больше не существует!",
|
||||
"anotherOption":"Эта опция не является тикетом, а представляет собой другой тип!",
|
||||
"maxAmountTitle":"Максимальное количество достигнуто!",
|
||||
"maxAmountDescription":"Вы достигли максимальное количество разрешённых тикетов!\nТеперь вы не можете создать ещё один!",
|
||||
"somethingWentWrong":"**Что-то пошло не так!**\nПожайлуста, попробуйте в другой раз!"
|
||||
},
|
||||
"commands":{
|
||||
"userAddedTitle":"Добавлено {0} в этот тикет!",
|
||||
"userRemovedTitle":"Удалено {0} из этого тикета!",
|
||||
"renameTitle":"Изменено имя на {0}!",
|
||||
"closeTitle":"Закрыл этот тикет!",
|
||||
"deleteTitle":"Удаляем этот тикет...",
|
||||
"reopenTitle":"Открываем заново этот тикет!",
|
||||
|
||||
"claimTitle":"Этот тикет теперь взят {0}",
|
||||
"unclaimTitle":"Этот тикет никем не взят!",
|
||||
"changeTitle":"Изменён тип тикета на {0}!",
|
||||
|
||||
"statsTitle":"Здесь статистика для {0}!",
|
||||
"autocloseTitle":"Этот тикет будет закрыт автоматически после {0}!",
|
||||
"autocloseRejectTitle":"Этот тикет больше не будет закрыт автоматически!",
|
||||
"autocloseWarn":"Это касается только неактивных тикетов!",
|
||||
|
||||
"goToTicket":"перейти в тикет",
|
||||
"ticketWarning":"embed ниже сообщения!",
|
||||
"maxTicketWarning":"**Предупреждение:** _Вы можете создать только {0} тикет(а/ов) в этот раз!_"
|
||||
},
|
||||
"helpMenu":{
|
||||
"title":"Доступные команды:",
|
||||
"header1":"**Перейдите в {0}, чтобы создать тикет!**\n\n",
|
||||
"header2":"**Выполните команду `/new` или `/ticket` для создания тикета!**\n\n",
|
||||
|
||||
"msgCmd":"Создать embed с кнопками. (только админам)",
|
||||
"renameCmd":"Переименовать тикет. (без пробелов)",
|
||||
"closeCmd":"Закрыть тикет.",
|
||||
"deleteCmd":"Удалить тикет.",
|
||||
"addCmd":"Добавить пользователя в тикет.",
|
||||
"removeCmd":"Удалить пользователя из тикета.",
|
||||
"reopenCmd":"Открыть заново тикет после того, как он был закрыт.",
|
||||
"changeCmd":"Поменять тип тикета.",
|
||||
"claimCmd":"Взять тикет.",
|
||||
"unclaimCmd":"Снять тикет.",
|
||||
"statsCmd":"Посмотреть статистику тикета.",
|
||||
"autocloseCmd":"Установить таймер, чтобы автоматически закрыть тикет"
|
||||
},
|
||||
"buttons":{
|
||||
"close":"Закрыть тикет",
|
||||
"delete":"Удалить тикет",
|
||||
"reopen":"Открыть заново тикет",
|
||||
"closeWithReason":"закрыть с причиной"
|
||||
},
|
||||
"messages":{
|
||||
"closedDescription":"Только админы теперь могут писать в этом тикете!\n\n*Нажмите на кнопку ниже, чтобы удалить или заново окрыть тикет!*",
|
||||
"createdTitle":"Тикет создан!",
|
||||
"createdDescription":"Ваш тикет создан, вы можете обнаружить его по пингу!",
|
||||
|
||||
"newTicketDmTitle":"Новый тикет!",
|
||||
"closedTicketDmTitle":"Тикет закрыт!",
|
||||
"deletedTicketDmTitle":"Тикет удалён!",
|
||||
"closedTicketDmDescription":"Ваш тикет закрыт!",
|
||||
"deletedTicketDmDescription":"Ваш тикет удалён!",
|
||||
"reopenTicketDmTitle":"Тикет открыт заново!",
|
||||
"reopenTicketDmDescription":"Ваш тикет открыт заново!",
|
||||
|
||||
"chooseCategory":"выберите категорию:",
|
||||
"gettingdeleted":"Тикет будет удалён...",
|
||||
|
||||
"none":"отсутствует",
|
||||
"reason":"причина",
|
||||
"createdat":"создан",
|
||||
"openedby":"открыт",
|
||||
"deletedby":"удалён",
|
||||
"closedby":"закрыт",
|
||||
|
||||
"modalreason":"Какая причина закрытия этого тикета?",
|
||||
"chooseATicket": "Выберите тикет"
|
||||
},
|
||||
"transcripts":{
|
||||
"title":"Транскрипт",
|
||||
"processed":"Этот транскрипт находится в процессе обработки",
|
||||
"wait":"Пожайлуста подождите!",
|
||||
"estimated":"Оценочное время",
|
||||
"available":"Транскрипт здесь доступен"
|
||||
},
|
||||
"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":"Участник не найден в базе данных статистики!"
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
"examples":{
|
||||
"en-GB":"english",
|
||||
"en-US":"english",
|
||||
"no": "Norwegian",
|
||||
"nl":"dutch",
|
||||
"ro":"romanian",
|
||||
"de":"german",
|
||||
@@ -9,131 +10,193 @@
|
||||
"fr":"french",
|
||||
"es-ES":"spanish",
|
||||
"it":"italian",
|
||||
"ru":"russian",
|
||||
"tr": "Türkçe",
|
||||
"ar": "Arabic",
|
||||
|
||||
"MISSING":"arabic,portuguese",
|
||||
"NOTAVAILABLE":"arabic,portuguese,czech"
|
||||
"MISSING":"portuguese",
|
||||
"NOTAVAILABLE":"portuguese,czech"
|
||||
},
|
||||
"data":{
|
||||
"help":{
|
||||
"en-GB":"A list of the available commands.",
|
||||
"en-US":"A list of the available commands.",
|
||||
"no":"En liste over commands.",
|
||||
"nl":"Een lijst met de beschikbare commands.",
|
||||
"ro":"O lista a comenzilor disponibile.",
|
||||
"de":"Eine Liste der verfügbaren Befehle.",
|
||||
"cs":"A list of the available commands",
|
||||
"fr":"Une liste des commandes.",
|
||||
"es-ES":"Una lista de los comandos disponibles.",
|
||||
"it":"Una lista di tutti i comandi disponibili."
|
||||
"it":"Una lista di tutti i comandi disponibili.",
|
||||
"ru":"Список доступных команд",
|
||||
"tr": "Kullanılabilir komutların listesi.",
|
||||
"ar": "قائمة للكوماندات المتاحة"
|
||||
},
|
||||
"message":{
|
||||
"en-GB":"Spawn an embed with buttons.",
|
||||
"en-US":"Spawn an embed with buttons.",
|
||||
"no":"Legg inn en melding i denne kanalen",
|
||||
"nl":"Spawn een embed met knoppen.",
|
||||
"ro":"Deschide un embed cu butoane.",
|
||||
"de":"Sendet ein Embed mit Knöpfen.",
|
||||
"cs":"Spawn an embed with buttons.",
|
||||
"fr":"Créer un embed avec des boutons.",
|
||||
"es-ES":"Genera un embed con botones.",
|
||||
"it":"Genera un embed con un pulsante."
|
||||
"it":"Genera un embed con un pulsante.",
|
||||
"ru":"Создать embed с кнопками",
|
||||
"tr": "Butonlar ile bir yerleştirme oluşturun.",
|
||||
"ar": "أنشاء أيمبد مع الأزرار."
|
||||
},
|
||||
"close":{
|
||||
"en-GB":"Close a ticket.",
|
||||
"en-US":"Close a ticket.",
|
||||
"no":"Lukk ticket.",
|
||||
"nl":"Sluit een ticket",
|
||||
"ro":"Inchide un ticket.",
|
||||
"de":"Schließe ein Ticket.",
|
||||
"cs":"Close a ticket.",
|
||||
"fr":"Fermer un ticket.",
|
||||
"es-ES":"Cierra un ticket.",
|
||||
"it":"Chiudi un ticket."
|
||||
"it":"Chiudi un ticket.",
|
||||
"ru":"Закрыть тикет",
|
||||
"tr": "Bileti kapat.",
|
||||
"ar": "اغلاق تيكت."
|
||||
},
|
||||
"delete":{
|
||||
"en-GB":"Delete a ticket.",
|
||||
"en-US":"Delete a ticket.",
|
||||
"no":"Slett ticket.",
|
||||
"nl":"Verwijder een ticket",
|
||||
"ro":"Sterge un ticket.",
|
||||
"de":"Lösche ein Ticket.",
|
||||
"cs":"Delete a ticket.",
|
||||
"fr":"Supprimer un ticket.",
|
||||
"es-ES":"Elimina un ticket.",
|
||||
"it":"Elimina un ticket."
|
||||
"it":"Elimina un ticket.",
|
||||
"ru":"Удалить тикет",
|
||||
"tr": "Bileti sil.",
|
||||
"ar": "حذف تيكت."
|
||||
},
|
||||
"reopen":{
|
||||
"en-GB":"Re-Open a ticket.",
|
||||
"en-US":"Re-Open a ticket.",
|
||||
"no":"Gjenåpne ticket.",
|
||||
"nl":"Heropen een ticket.",
|
||||
"ro":"Re-deschide un ticket.",
|
||||
"de":"Wiedereröffnung eines Tickets.",
|
||||
"cs":"Re-Open a ticket.",
|
||||
"fr":"Re-ouvrir un ticket.",
|
||||
"es-ES":"Re-abre un ticket.",
|
||||
"it":"Ri-Apri un ticket."
|
||||
"it":"Ri-Apri un ticket.",
|
||||
"ru":"Открыть заново тикет",
|
||||
"tr": "Bileti yeniden aç.",
|
||||
"ar": "اعادة فتح تيكت."
|
||||
},
|
||||
"add":{
|
||||
"en-GB":"Add another user to a ticket.",
|
||||
"en-US":"Add another user to a ticket.",
|
||||
"no":"Legg til en annen bruker til ticket.",
|
||||
"nl":"Voeg een andere user toe aan een ticket.",
|
||||
"ro":"Adauga un utilizator la acest ticket.",
|
||||
"de":"Füge einen anderen Nutzer zum Ticket hinzu.",
|
||||
"cs":"Add another user to a ticket.",
|
||||
"fr":"Ajouter un utilisateur au ticket.",
|
||||
"es-ES":"Agrega otro usuario al ticket.",
|
||||
"it":"Aggiungi un membro al ticket"
|
||||
"it":"Aggiungi un membro al ticket",
|
||||
"ru":"Добавить другого пользователя в тикет",
|
||||
"tr": "Bilete başka bir kullanıcı ekle.",
|
||||
"ar": "اضافة مستخدم اخر الى تيكت معين."
|
||||
},
|
||||
"remove":{
|
||||
"en-GB":"Remove a user from a ticket.",
|
||||
"en-US":"Remove a user from a ticket.",
|
||||
"no":"Fjern en bruker fra ticket.",
|
||||
"nl":"Verwijder een user van een ticket.",
|
||||
"ro":"Sterge un utilizator dintr-un ticket.",
|
||||
"de":"Entferne einen Nutzer von dem Ticket.",
|
||||
"cs":"Remove a user from a ticket.",
|
||||
"fr":"Enlever quelqu’un du ticket.",
|
||||
"es-ES":"Elimina otro usuario del ticket.",
|
||||
"it":"Rimuovi un membro dal ticket"
|
||||
"it":"Rimuovi un membro dal ticket",
|
||||
"ru":"Удалить пользователя из тикета",
|
||||
"tr": "Kullanıcıyı bir biletten kaldır.",
|
||||
"ar": "ازالة مستخدم من تيكت معين."
|
||||
},
|
||||
"newticket":{
|
||||
"en-GB":"Create a ticket",
|
||||
"en-US":"Create a ticket",
|
||||
"no":"Lag en ny ticket",
|
||||
"nl":"Maak een ticket aan",
|
||||
"ro":"Creeaza un ticket.",
|
||||
"de":"Erstelle ein Ticket.",
|
||||
"cs":"Create a ticket",
|
||||
"fr":"Créer un ticket",
|
||||
"es-ES":"Crear un ticket.",
|
||||
"it":"Crea un ticket"
|
||||
"it":"Crea un ticket",
|
||||
"ru":"Создать тикет",
|
||||
"tr": "Bilet oluştur",
|
||||
"ar": "انشاء تيكت."
|
||||
},
|
||||
"rename":{
|
||||
"en-GB":"Rename a ticket channel.",
|
||||
"en-US":"Rename a ticket channel.",
|
||||
"no":"Gi nytt navn til ticket kanalen.",
|
||||
"nl":"Hernoem een ticket channel.",
|
||||
"ro":"Redenumeste un ticket.",
|
||||
"de":"Benenne einen Ticket Channel.",
|
||||
"cs":"Rename a ticket channel",
|
||||
"fr":"Renommer un ticket.",
|
||||
"es-ES":"Renombrar un canal de ticket.",
|
||||
"it":"Rinomina il canale di un ticket."
|
||||
"it":"Rinomina il canale di un ticket.",
|
||||
"ru":"Переименовать канал тикета",
|
||||
"tr": "Bilet kanalını yeniden adlandır.",
|
||||
"ar": "اعادة تسمية التيكت."
|
||||
},
|
||||
"claim":{
|
||||
"en-GB":"",
|
||||
"en-US":"",
|
||||
"nl":"",
|
||||
"ro":"",
|
||||
"de":"",
|
||||
"cs":"",
|
||||
"fr":"",
|
||||
"es-ES":"",
|
||||
"it":""
|
||||
"en-GB":"Claim a ticket.",
|
||||
"en-US":"Claim a ticket.",
|
||||
"no":"Overta ticket.",
|
||||
"nl":"Claim een ticket.",
|
||||
"ro":" ",
|
||||
"de":" ",
|
||||
"cs":" ",
|
||||
"fr":" ",
|
||||
"es-ES":" ",
|
||||
"it":" ",
|
||||
"ru":"Взять тикет",
|
||||
"tr":"Bilet talep et.",
|
||||
"ar": "تعيين التيكت"
|
||||
},
|
||||
"unclaim":{
|
||||
"en-GB":"",
|
||||
"en-US":"",
|
||||
"nl":"",
|
||||
"ro":"",
|
||||
"de":"",
|
||||
"cs":"",
|
||||
"fr":"",
|
||||
"es-ES":"",
|
||||
"it":""
|
||||
"en-GB":"Un-claim a ticket.",
|
||||
"en-US":"Un-claim a ticket.",
|
||||
"no":"Frigjør ticket.",
|
||||
"nl":"Ontclaim een ticket.",
|
||||
"ro":" ",
|
||||
"de":" ",
|
||||
"cs":" ",
|
||||
"fr":" ",
|
||||
"es-ES":" ",
|
||||
"it":" ",
|
||||
"ru":"Снять тикет",
|
||||
"tr":"Bileti iptal et.",
|
||||
"ar": "ازالة التعيين من شخص الى التيكت"
|
||||
},
|
||||
"category":{
|
||||
"en-GB":"Change ticket type.",
|
||||
"en-US":"Change ticket type.",
|
||||
"no":"Endre ticket type.",
|
||||
"nl":"Verander ticket type.",
|
||||
"ro":" ",
|
||||
"de":" ",
|
||||
"cs":" ",
|
||||
"fr":" ",
|
||||
"es-ES":" ",
|
||||
"it":" ",
|
||||
"ru":"Изменить тип тикета",
|
||||
"tr":"Bilet türünü değiştir.",
|
||||
"ar": "تغيير نوع التيكت"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,135 @@
|
||||
{
|
||||
"_CREDITS":"n1kkec#5341",
|
||||
"_INFO":"This file is a translation for open ticket 3.5.3",
|
||||
|
||||
"errors":{
|
||||
"missingArgsTitle":"Napačen argument!",
|
||||
"missingArgsDescription":"Argument manka",
|
||||
"noPermsTitle":"Nimas dovoljenja!",
|
||||
"noPermsDescription":"Potrebuješ dovoljenje `ADMINISTRATOR` ali pa biti v listi dovoljenih role!",
|
||||
"noPermsDelete":"Samo admini lahko izbrišejo ticket!",
|
||||
"chooseFromListTitle":"Napačen ID",
|
||||
"chooseFromListDescription":"Izberi eden izmed ID-jev:",
|
||||
"boterror":"NAPAKA Bota!",
|
||||
"notInTicketTitle":"Nisi v ticketu!",
|
||||
"notInTicketDescription": "Ta ukaz ne deluje zunaj ticket-ov!",
|
||||
"ticketDoesntExist": "Ta ticket ne obstaja več!",
|
||||
"roleDoesntExist": "Ta vloga ne obstaja več!",
|
||||
"anotherOption": "Ta možnost ni ticket, ampak druga vrsta!",
|
||||
"maxAmountTitle": "Najvišji doseženi znesek!",
|
||||
"maxAmountDescription": "Dosegli ste največje dovoljeno število ticket-ov!\nTako da ne morete ustvariti nove!",
|
||||
"somethingWentWrong": "**Nekaj je šlo narobe!**\nProsimo, poskusite znova drugič!"
|
||||
},
|
||||
"commands":{
|
||||
"userAddedTitle": "Dodan {0} v ta ticket!",
|
||||
"userRemovedTitle": "Odstranjeo {0} iz tega ticket-!",
|
||||
"renameTitle": "Spremenjeno ime na {0}!",
|
||||
"closeTitle": "Zaprl ta ticket!",
|
||||
"deleteTitle": "Brisanje ticketa...",
|
||||
"reopenTitle": "Ponovno odprl ta ticket!",
|
||||
|
||||
"claimTitle":"Ticket je claimal {0}",
|
||||
"unclaimTitle":"Ticket ni več claiman!",
|
||||
"changeTitle":"Changed ticket type to {0}!",
|
||||
|
||||
"statsTitle":"Statistike za {0}!",
|
||||
"autocloseTitle":"Ticket so avtomatsko zapru po {0}!",
|
||||
"autocloseRejectTitle":"Ticket se nebo avtomatsko zapru!",
|
||||
"autocloseWarn":"To ima efekt samo na inactive ticketih!",
|
||||
|
||||
"goToTicket":"pojdi v ticket",
|
||||
"ticketWarning": "Opozorilo je v spodnjem sporočilu!",
|
||||
"maxTicketWarning": "**Opozorilo:** _Naenkrat lahko ustvarite le {0} ticketov!_"
|
||||
},
|
||||
"helpMenu":{
|
||||
"title": "Razpoložljivi ukazi:",
|
||||
"header1": "**Izberite {0} in ustvarite ticket!**\n\n",
|
||||
"header2": "**Zaženi ukaz `/new` ali `/ticket` za ustvarjanje ticket-a!**\n\n",
|
||||
|
||||
"msgCmd": "Ustvari vstavek z gumbi. (samo za administratorje)",
|
||||
"renameCmd": "Preimenujte ticket. (brez presledkov)",
|
||||
"closeCmd": "Zapri ticket.",
|
||||
"deleteCmd": "Izbriši ticket.",
|
||||
"addCmd": "Dodaj uporabnika v ticket.",
|
||||
"removeCmd": "Odstrani uporabnika z ticket-a.",
|
||||
"reopenCmd": "Ponovno odprite ticket, ko je bila zaprta.",
|
||||
"changeCmd":"Spremeni tip ticketa.",
|
||||
"claimCmd":"Claimaj ticket.",
|
||||
"unclaimCmd":"Unclaimaj ticket.",
|
||||
"statCmds":"Statistike ticketa.",
|
||||
"autocloseCmd":"Nastavi timer da avtomatsko zapre ticket"
|
||||
},
|
||||
"buttons":{
|
||||
"close":"Zapri Ticket",
|
||||
"delete":"Izbrisi Ticket",
|
||||
"reopen":"Odpri Ticket",
|
||||
"closeWithReason":"Zapri z razlogom"
|
||||
},
|
||||
"messages":{
|
||||
"closedDescription": "V tem ticket-u lahko zdaj govorijo samo administratorji!\n\n*Kliknite na spodnji gumb za brisanje ali ponovno odprtje te ticket!*",
|
||||
"createdTitle": "Ticket ustvarjen!",
|
||||
"createdDescription": "Vaš ticket je ustvarjen, lahko jo odkrijete s pingom!",
|
||||
|
||||
"newTicketDmTitle": "Nov ticket!",
|
||||
"closedTicketDmTitle": "Ticket zaprt!",
|
||||
"deletedTicketDmTitle": "Izbrisan ticket!",
|
||||
"closedTicketDmDescription": "Vaš ticket je zaprta!",
|
||||
"deletedTicketDmDescription": "Vaš ticket je izbrisan!",
|
||||
"reopenTicketDmTitle": "Ticket je ponovno odprt!",
|
||||
"reopenTicketDmDescription": "Vaš ticket je ponovno odprt!",
|
||||
|
||||
"chooseCategory": "izberite kategorijo:",
|
||||
"gettingdeleted": "Ticket se briše...",
|
||||
|
||||
"none": "ni",
|
||||
"reason": "razlog",
|
||||
"createdat":"ustvarjeno ob",
|
||||
"openedby":"odprto od",
|
||||
"deletedby": "izbrisano s",
|
||||
"closedby": "zaprl",
|
||||
|
||||
"modalreason": "Kakšen je razlog za zaprtje tega ticket?",
|
||||
"chooseATicket": "Izberi ticket"
|
||||
},
|
||||
"transcripts":{
|
||||
"naslov": "Transkript",
|
||||
"obdelano": "Ta prepis se obdeluje",
|
||||
"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!"
|
||||
}
|
||||
}
|
||||
+64
-12
@@ -1,4 +1,7 @@
|
||||
{
|
||||
"_CREDITS":"Redactado#1673 & josuens14#5267",
|
||||
"_INFO":"This file is a translation for open ticket 3.5.3",
|
||||
|
||||
"errors":{
|
||||
"missingArgsTitle":"¡Argumentos inválidos!",
|
||||
"missingArgsDescription":"Argumento faltante.",
|
||||
@@ -15,8 +18,7 @@
|
||||
"anotherOption":"¡Esta opción no es un ticket, si no otra cosa!",
|
||||
"maxAmountTitle":"¡Máxima cantidad alcanzada!",
|
||||
"maxAmountDescription":"¡Has alcanzado la máxima cantidad de tickets permitida!\n¡Por lo que no puedes crear otro!",
|
||||
"somethingWentWrong":"**¡Algo salió mal!**\n¡Prueba dentro de un rato!",
|
||||
"somethingWentWrongTranscript":"**¡Algo salió mal al hacer el transcript!**\n¡Prueba en otro momento!"
|
||||
"somethingWentWrong":"**¡Algo salió mal!**\n¡Prueba dentro de un rato!"
|
||||
},
|
||||
"commands":{
|
||||
"userAddedTitle":"Se agregó {0} al ticket!",
|
||||
@@ -25,9 +27,17 @@
|
||||
"closeTitle":"Cerró este ticket!",
|
||||
"deleteTitle":"Eliminando este ticket...",
|
||||
"reopenTitle":"Re-abrió este boleto!",
|
||||
"claimTitle":"This ticket is now claimed to {0}",
|
||||
"unclaimTitle":"This ticket isn't claimed anymore!",
|
||||
|
||||
"claimTitle":"Este ticket fué reclamado por {0}",
|
||||
"unclaimTitle":"¡Este ticket se encuentra desatendido!",
|
||||
"changeTitle":"¡Cambiado el tipo de ticket a {0}!",
|
||||
|
||||
"statsTitle":"¡Aquí están las estadísticas para {0}!",
|
||||
"autocloseTitle":"¡Este ticket será cerrado después de {0}!",
|
||||
"autocloseRejectTitle":"¡Cierre automático del ticket desactivado!",
|
||||
"autocloseWarn":"¡Esto solo afecta tickets inactivos!",
|
||||
|
||||
"goToTicket":"ir al ticket",
|
||||
"ticketWarning":"La inserción está en el mensaje a continuación!",
|
||||
"maxTicketWarning":"**Advertencia:** _Solo puedes crear {0} ticket(s) a la vez!_"
|
||||
},
|
||||
@@ -42,19 +52,20 @@
|
||||
"deleteCmd":"Eliminar un ticket.",
|
||||
"addCmd":"Agregar un usuario al ticket.",
|
||||
"removeCmd":"Eliminar un usuario del ticket.",
|
||||
"reopenCmd":"Re-Abre un ticket después de que este se vea cerrado."
|
||||
"reopenCmd":"Re-Abre un ticket después de que este se vea cerrado.",
|
||||
"changeCmd":"Cambia el tipo de ticket.",
|
||||
"claimCmd":"Reclama un ticket.",
|
||||
"unclaimCmd":"Desatiende un ticket.",
|
||||
"statsCmd":"Mira las estadísticas de los tickets.",
|
||||
"autocloseCmd":"Establece un temporizador para cerrar el ticket."
|
||||
},
|
||||
"buttons":{
|
||||
"close":"Cerrar ticket.",
|
||||
"delete":"Eliminar ticket",
|
||||
"reopen":"Re-Abrir ticket",
|
||||
"sendTranscript":"Obtener transcript.",
|
||||
"closeWithReason":"cerrar con razón"
|
||||
},
|
||||
"messages":{
|
||||
"reopenTitle":"¡Ticket Re-Abierto!",
|
||||
"reopenDescription":"¡Siéntete libre de hablar de nuevo!",
|
||||
"closedTitle":"¡Ticket cerrado!",
|
||||
"closedDescription":"¡Solo admins pueden hablar ahora en este ticket!\n\n*¡Presiona en el botón de abajo para eliminar o re-abrir el ticket!*",
|
||||
"createdTitle":"¡Ticket creado!",
|
||||
"createdDescription":"¡Ticket creado, también te he mencionado en él!",
|
||||
@@ -66,18 +77,59 @@
|
||||
"deletedTicketDmDescription":"¡Tu ticket fué eliminado!",
|
||||
"reopenTicketDmTitle":"¡Ticket re-abierto!",
|
||||
"reopenTicketDmDescription":"¡Tu ticket se vió abierto de nuevo!",
|
||||
"newTranscriptTitle":"¡Un nuevo transcript está aquí!",
|
||||
"hereIsTheTranscript":"Aquí está el transcript:",
|
||||
|
||||
"chooseCategory":"Elije una categoría:",
|
||||
"gettingdeleted":"El ticket se está viendo eliminado...",
|
||||
|
||||
"none":"Ninguna.",
|
||||
"reason":"Razón",
|
||||
|
||||
"createdat":"creado el",
|
||||
"openedby":"abierto por",
|
||||
"deletedby":"eliminado por",
|
||||
"closedby":"cerrado por",
|
||||
|
||||
"modalreason":"Cúal es la razón para cerrar este ticket?",
|
||||
"chooseATicket": "Elije un ticket"
|
||||
},
|
||||
"transcripts":{
|
||||
"title":"Transcripción",
|
||||
"processed":"La transcripción del ticket está siendo procesada...",
|
||||
"wait":"¡Por favor, espere!",
|
||||
"estimated":"Tiempo estimado",
|
||||
"available":"La transcripción estará disponible aquí"
|
||||
},
|
||||
"stats":{
|
||||
"globalTitle":"Estadísticas Globales",
|
||||
"ticketTitle":"Estadísitcas para el ticket {0}",
|
||||
"userTitle":"Estadísticas para el usuario {0}",
|
||||
"systemTitle":"Estadísticas del sistema",
|
||||
"versionTitle":"Versión del bot",
|
||||
|
||||
"ticketsCreated":"Tickets Creados",
|
||||
"ticketsClosed":"Tickets Cerrados",
|
||||
"ticketsDeleted":"Tickets Eliminados",
|
||||
"ticketsReopened":"Tickets Reabiertos",
|
||||
"ticketsAutoclosed":"Tickets Cerrados automáticamente",
|
||||
"transcriptsCreated":"Transcripciones Creadas",
|
||||
"startupDate":"Fecha de Inicio",
|
||||
"latestUpdate":"Última Actualización",
|
||||
"ticketCreatedOn":"Ticket creado el",
|
||||
"ticketCreatedBy":"Ticket creado por",
|
||||
"messagesSent":"Mensajes enviados",
|
||||
"status":"Estado",
|
||||
"participants":"Participantes",
|
||||
"role":"Rol",
|
||||
|
||||
"switches":{
|
||||
"globalAdmin":"Admin Global",
|
||||
"ticketAdmin":"Admin del Ticket",
|
||||
"member":"Miembro",
|
||||
"open":"Abierto",
|
||||
"reopened":"Reabierto",
|
||||
"closed":"Cerrado",
|
||||
"autoclosed":"Cerrado automáticamente"
|
||||
},
|
||||
|
||||
"errorUserNotFound":"¡Este usuario no pudo ser encontrado en la base de datos de estadísitcas!"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,135 @@
|
||||
{
|
||||
"_CREDITS":"Mods HD#0661",
|
||||
"_INFO":"This file is a translation for open ticket 3.5.3",
|
||||
|
||||
"errors":{
|
||||
"missingArgsTitle":"อาร์กิวเมนต์ไม่ถูกต้อง!",
|
||||
"missingArgsDescription":"ขาดอาร์กิวเมนต์",
|
||||
"noPermsTitle":"ไม่มีสิทธิ์!",
|
||||
"noPermsDescription":"คุณต้องมีสิทธิ์ `ADMINISTRATOR` หรืออยู่ในรายการบทบาทที่ได้รับอนุญาต!",
|
||||
"noPermsDelete":"เฉพาะผู้ดูแลระบบเท่านั้นที่สามารถลบตั๋วได้!",
|
||||
"chooseFromListTitle":"ID ไม่ถูกต้อง",
|
||||
"chooseFromListDescription":"เลือกหนึ่งใน ID ด้านล่าง:",
|
||||
"boterror":"ข้อผิดพลาดของบอท!",
|
||||
"notInTicketTitle":"คุณไม่ได้อยู่ในตั๋ว!",
|
||||
"notInTicketDescription":"คำสั่งนี้ไม่ทำงานนอกตั๋ว!",
|
||||
"ticketDoesntExist":"ตั๋วนี้ไม่มีอีกแล้ว!",
|
||||
"roleDoesntExist":"บทบาทนี้ไม่มีอีกแล้ว!",
|
||||
"anotherOption":"ตัวเลือกนี้ไม่ใช่ตั๋ว แต่เป็นประเภทอื่น!",
|
||||
"maxAmountTitle":"ถึงจำนวนสูงสุดแล้ว!",
|
||||
"maxAmountDescription":"คุณได้ถึงจำนวนสูงสุดของตั๋วที่อนุญาต!\nดังนั้นคุณไม่สามารถสร้างใหม่ได้!",
|
||||
"somethingWentWrong":"**มีบางอย่างผิดพลาด!**\nกรุณาลองอีกครั้งในภายหลัง!"
|
||||
},
|
||||
"commands":{
|
||||
"userAddedTitle":"เพิ่ม {0} ในตั๋วนี้!",
|
||||
"userRemovedTitle":"ลบ {0} ออกจากตั๋วนี้!",
|
||||
"renameTitle":"เปลี่ยนชื่อเป็น {0}!",
|
||||
"closeTitle":"ปิดตั๋วนี้!",
|
||||
"deleteTitle":"กำลังลบตั๋วนี้...",
|
||||
"reopenTitle":"เปิดตั๋วนี้อีกครั้ง!",
|
||||
|
||||
"claimTitle":"ตั๋วนี้ถูกเรียกขึ้นโดย {0}",
|
||||
"unclaimTitle":"ตั๋วนี้ไม่ได้ถูกเรียกขึ้นแล้ว!",
|
||||
"changeTitle":"เปลี่ยนประเภทตั๋วเป็น {0}!",
|
||||
|
||||
"statsTitle":"นี่คือสถิติสำหรับ {0}!",
|
||||
"autocloseTitle":"ตั๋วนี้จะถูกปิดอัตโนมัติหลังจาก {0}!",
|
||||
"autocloseRejectTitle":"ตั๋วนี้จะไม่ถูกปิดอัตโนมัติอีกต่อไป!",
|
||||
"autocloseWarn":"ส่วนนี้มีผลกับตั๋วที่ไม่ได้ใช้งาน!",
|
||||
|
||||
"goToTicket":"ไปที่ตั๋ว",
|
||||
"ticketWarning":"Embed อยู่ในข้อความด้านล่าง!",
|
||||
"maxTicketWarning":"**คำเตือน:** _คุณสามารถสร้างได้ {0} ตั๋วในครั้งเดียว!_"
|
||||
},
|
||||
"helpMenu":{
|
||||
"title":"คำสั่งที่ใช้ได้:",
|
||||
"header1":"**ไปที่ {0} เพื่อสร้างตั๋ว!**\n\n",
|
||||
"header2":"**ใช้คำสั่ง `/new` หรือ `/ticket` เพื่อสร้างตั๋ว!**\n\n",
|
||||
|
||||
"msgCmd":"สร้าง embed พร้อมปุ่ม (เฉพาะผู้ดูแลระบบ)",
|
||||
"renameCmd":"เปลี่ยนชื่อตั๋ว (ไม่มีช่องว่าง)",
|
||||
"closeCmd":"ปิดตั๋ว",
|
||||
"deleteCmd":"ลบตั๋ว",
|
||||
"addCmd":"เพิ่มผู้ใช้ในตั๋ว",
|
||||
"removeCmd":"ลบผู้ใช้ออกจากตั๋ว",
|
||||
"reopenCmd":"เปิดตั๋วอีกครั้งหลังจากถูกปิด",
|
||||
"changeCmd":"เปลี่ยนประเภทตั๋ว",
|
||||
"claimCmd":"เรียกขึ้นตั๋ว",
|
||||
"unclaimCmd":"ยกเลิกการเรียกขึ้นตั๋ว",
|
||||
"statsCmd":"ดูสถิติตั๋ว",
|
||||
"autocloseCmd":"ตั้งค่าการปิดตั๋วอัตโนมัติ"
|
||||
},
|
||||
"buttons":{
|
||||
"close":"ปิดตั๋ว",
|
||||
"delete":"ลบตั๋ว",
|
||||
"reopen":"เปิดตั๋วอีกครั้ง",
|
||||
"closeWithReason":"ปิดด้วยเหตุผล"
|
||||
},
|
||||
"messages":{
|
||||
"closedDescription":"เฉพาะผู้ดูแลระบบเท่านั้นที่สามารถพูดคุยในตั๋วนี้ได้!\n\n*คลิกที่ปุ่มด้านล่างเพื่อลบหรือเปิดตั๋วนี้อีกครั้ง!*",
|
||||
"createdTitle":"สร้างตั๋วแล้ว!",
|
||||
"createdDescription":"ตั๋วของคุณถูกสร้างแล้ว คุณสามารถตรวจสอบได้จากการแจ้งเตือน!",
|
||||
|
||||
"newTicketDmTitle":"ตั๋วใหม่!",
|
||||
"closedTicketDmTitle":"ปิดตั๋ว!",
|
||||
"deletedTicketDmTitle":"ลบตั๋ว!",
|
||||
"closedTicketDmDescription":"ตั๋วของคุณถูกปิด!",
|
||||
"deletedTicketDmDescription":"ตั๋วของคุณถูกลบ!",
|
||||
"reopenTicketDmTitle":"เปิดตั๋วอีกครั้ง!",
|
||||
"reopenTicketDmDescription":"ตั๋วของคุณถูกเปิดอีกครั้ง!",
|
||||
|
||||
"chooseCategory":"เลือกหมวดหมู่:",
|
||||
"gettingdeleted":"กำลังลบตั๋ว...",
|
||||
|
||||
"none":"ไม่มี",
|
||||
"reason":"เหตุผล",
|
||||
"createdat":"สร้างเมื่อ",
|
||||
"openedby":"เปิดโดย",
|
||||
"deletedby":"ถูกลบโดย",
|
||||
"closedby":"ถูกปิดโดย",
|
||||
|
||||
"modalreason":"เหตุผลในการปิดตั๋วนี้คืออะไร?",
|
||||
"chooseATicket": "เลือกตั๋ว"
|
||||
},
|
||||
"transcripts":{
|
||||
"title":"บันทึกการสนทนา",
|
||||
"processed":"บันทึกการสนทนากำลังดำเนินการ",
|
||||
"wait":"กรุณารอ!",
|
||||
"estimated":"เวลาโดยประมาณ",
|
||||
"available":"บันทึกการสนทนาสามารถใช้งานได้ที่นี่"
|
||||
},
|
||||
"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":"ไม่พบผู้ใช้ในฐานข้อมูลสถิติ!"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,135 @@
|
||||
{
|
||||
"_CREDITS":"Hydrâelčhâvø#1575",
|
||||
"_INFO":"This file is a translation for open ticket 3.5.3",
|
||||
|
||||
"errors":{
|
||||
"missingArgsTitle":"Geçersiz argümanlar!",
|
||||
"missingArgsDescription":"Eksik argüman!",
|
||||
"noPermsTitle":"Bunun için yetkin yok!",
|
||||
"noPermsDescription":"Bunu yapmak için 'ADMİNİSTRAR'rolüne ihtiyacınız var, veya izin verilen roller listesinde olun!",
|
||||
"noPermsDelete":"Sadece adminler bileti silebilir!",
|
||||
"chooseFromListTitle":"Geçersiz Kimlik",
|
||||
"chooseFromListDescription":"Aşağıdaki kimliklerden birini seçin:",
|
||||
"boterror":"Bot Hatası!",
|
||||
"notInTicketTitle":"Bir biletin yok!",
|
||||
"notInTicketDescription":"Bu komut bilet dışında kullanılamaz!",
|
||||
"ticketDoesntExist":"Bu bilet artık yok!",
|
||||
"roleDoesntExist":"Bu rol artık yok!",
|
||||
"anotherOption":"Bu seçenek bir bilet değil, başka bir türdür!",
|
||||
"maxAmountTitle":"Ulaşabileceğin maksimum tutara ulaştın!",
|
||||
"maxAmountDescription":"İzin verilen maksimum bilet sayısına ulaştınız!\nHhayır yeni bir tane oluşturamazsın!",
|
||||
"somethingWentWrong":"**Bir şeyler ters gitti!**\n lütfen başka bir zaman tekrar deneyin!"
|
||||
},
|
||||
"commands":{
|
||||
"userAddedTitle":"Bilete {0} adlı kullanıcı eklendi!",
|
||||
"userRemovedTitle":"Biletten {0} adlı kullanıcı çıkarıldı !",
|
||||
"renameTitle":"Bilet ismi {0} olarak değştirildi!",
|
||||
"closeTitle":"Bilet Kapatıldı!",
|
||||
"deleteTitle":"Bilet siliniyor...",
|
||||
"reopenTitle":"Bilet Yeniden Açıldı!",
|
||||
|
||||
"claimTitle":"Bu bilet artık talep edildi. {0}",
|
||||
"unclaimTitle":"Tu bilet artık talep edilmiyor!",
|
||||
"changeTitle":"Bu bilet türü {0} olarak değiştirildi!",
|
||||
|
||||
"statsTitle":"Here are the stats for {0}!",
|
||||
"autocloseTitle":"This ticket will be closed automatically after {0}!",
|
||||
"autocloseRejectTitle":"This ticket will no longer be closed automatically!",
|
||||
"autocloseWarn":"This only affects inactive tickets!",
|
||||
|
||||
"goToTicket":"go to ticket",
|
||||
"ticketWarning":"Gömme aşağıdaki mesajda yer almaktadır!",
|
||||
"maxTicketWarning":"**Uyarı:** _You can only create {0} ticket(s) at a time!_"
|
||||
},
|
||||
"helpMenu":{
|
||||
"title":"Kullanılabilir Komutlar:",
|
||||
"header1":"**Bilet oluşturmak için {0} kanalını kullan!**\n\n",
|
||||
"header2":"**Bilet oluşturmak için `/new` veya `/ticket' komutunu çalıştırın!**\n\n",
|
||||
|
||||
"msgCmd":"Gömülü bilet mesajı gönderir. (sadece yöneticiler)",
|
||||
"renameCmd":"Bilet adını değiştirir. (boşluk olmadan)",
|
||||
"closeCmd":"Bileti kapatır.",
|
||||
"deleteCmd":"Bileti siler.",
|
||||
"addCmd":"Bilete kullanıcı ekler.",
|
||||
"removeCmd":"Biletten kullanıcı çıkarır.",
|
||||
"reopenCmd":"Bilet kapandıktan sonra tekrar açar.",
|
||||
"changeCmd":"Change ticket type.",
|
||||
"claimCmd":"Claim a ticket.",
|
||||
"unclaimCmd":"Unclaim a ticket.",
|
||||
"statsCmd":"View ticket stats.",
|
||||
"autocloseCmd":"Set timer to automatically close ticket"
|
||||
},
|
||||
"buttons":{
|
||||
"close":"Bileti Kapat",
|
||||
"delete":"Bileti Sil",
|
||||
"reopen":"Bileti Yeniden Aç",
|
||||
"closeWithReason":"Bu bileti neden kapatıyorsun ?"
|
||||
},
|
||||
"messages":{
|
||||
"closedDescription":"Bu bilette artık sadece yöneticiler konuşabilir!\n\n* Bu bileti silmek veya yeniden açmak için aşağıdaki butona tıklayın!*",
|
||||
"createdTitle":"Talep Oluşturuldu!",
|
||||
"createdDescription":"Your ticket is created, you can detect it by a ping!",
|
||||
|
||||
"newTicketDmTitle":"Yeni Bilet!",
|
||||
"closedTicketDmTitle":"Bilet Kapatıldı!",
|
||||
"deletedTicketDmTitle":"Bilet Silindi!",
|
||||
"closedTicketDmDescription":"Senin biletin kapatıldı!",
|
||||
"deletedTicketDmDescription":"Senin biletin silindi!",
|
||||
"reopenTicketDmTitle":"Bilet yeniden açıldı!",
|
||||
"reopenTicketDmDescription":"Senin biletin yeniden açıldı!",
|
||||
|
||||
"chooseCategory":"Bir kategori seç:",
|
||||
"gettingdeleted":"Bu bilet siliniyor...",
|
||||
|
||||
"none":"yok",
|
||||
"reason":"sebep",
|
||||
"createdat":"created at",
|
||||
"openedby":"opened by",
|
||||
"deletedby":"Silen kişi",
|
||||
"closedby":"Kapatan kişi",
|
||||
|
||||
"modalreason":"Bu biletin kapanmasının sebebi nedir?",
|
||||
"chooseATicket": "Bir bilet seçin"
|
||||
},
|
||||
"transcripts":{
|
||||
"title":"Transkript",
|
||||
"processed":"Bu transkript işleniyor",
|
||||
"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!"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,135 @@
|
||||
{
|
||||
"_CREDITS":"Anderskiy#4093",
|
||||
"_INFO":"Цей файл є перекладом для open ticket 3.5.3",
|
||||
|
||||
"errors":{
|
||||
"missingArgsTitle":"Невірні аргументи!",
|
||||
"missingArgsDescription":"Відсутні аргументи!",
|
||||
"noPermsTitle":"Відсутні права!",
|
||||
"noPermsDescription":"Вам потрібно право `ADMINISTRATOR` або бути в списку дозволених ролей!",
|
||||
"noPermsDelete":"Тільки адміни можуть видаляти тікети!",
|
||||
"chooseFromListTitle":"Недійсний ID",
|
||||
"chooseFromListDescription":"Виберіть один із наведених нижче id:",
|
||||
"boterror":"Помилка боту!",
|
||||
"notInTicketTitle":"Вас немає в тікеті!",
|
||||
"notInTicketDescription":"Ця команда не працює поза тікетами!",
|
||||
"ticketDoesntExist":"Цей тікет більше не існує!",
|
||||
"roleDoesntExist":"Ця роль більше не існує!",
|
||||
"anotherOption":"Це не є тікетом, а є іншим типом!",
|
||||
"maxAmountTitle":"Досягнуто максимальної кількості!",
|
||||
"maxAmountDescription":"Ви досягли максимально дозволеної кількості тікетів!\nТож ви не можете створити новий!",
|
||||
"somethingWentWrong":"**Щось пішло не так!**\nБудь ласка, спробуйте ще раз!"
|
||||
},
|
||||
"commands":{
|
||||
"userAddedTitle":"Додано {0} до цього тікету!",
|
||||
"userRemovedTitle":"Видалено {0} з цього тікету!",
|
||||
"renameTitle":"Змінено ім'я на {0}!",
|
||||
"closeTitle":"Тікет закритий!",
|
||||
"deleteTitle":"Видаляємо тікет",
|
||||
"reopenTitle":"Знову відкриваємо тікет!",
|
||||
|
||||
"claimTitle":"Цей тікет узяв {0}",
|
||||
"unclaimTitle":"Цей тікет ніким не зайнятий!",
|
||||
"changeTitle":"Тип тікету змінено на {0}!",
|
||||
|
||||
"statsTitle":"Ось статистика для {0}!",
|
||||
"autocloseTitle":"Цей тікет буде автоматично закрито після {0}!",
|
||||
"autocloseRejectTitle":"Цей тікет більше не закриватиметься автоматично!",
|
||||
"autocloseWarn":"Це стосується лише неактивних тікетів!",
|
||||
|
||||
"goToTicket":"перейти до тікету",
|
||||
"ticketWarning":"Ембед знаходиться в повідомленні нижче!",
|
||||
"maxTicketWarning":"**Попередження:** _Ви можете створити лише стільки квитків за раз: {0}!_"
|
||||
},
|
||||
"helpMenu":{
|
||||
"title":"Доступні команди:",
|
||||
"header1":"**Перейдіть до {0}, щоб створити тікет!**\n\n",
|
||||
"header2":"**Виконайте команду `/new` або `/ticket`, щоб створити тікет!**\n\n",
|
||||
|
||||
"msgCmd":"Створити ембед з кнопками. (тільки адміністратори)",
|
||||
"renameCmd":"Перейменувати тікет. (без пробілів)",
|
||||
"closeCmd":"Закрити тікет.",
|
||||
"deleteCmd":"Видалити тікет.",
|
||||
"addCmd":"Додати користувача до тікету.",
|
||||
"removeCmd":"Видалити користувача з тікету.",
|
||||
"reopenCmd":"Повторне відкриття тікету після його закриття.",
|
||||
"changeCmd":"Змінити тіп тикету.",
|
||||
"claimCmd":"Узяти тікет.",
|
||||
"unclaimCmd":"Відмовитися від тікету.",
|
||||
"statsCmd":"Переглянути статистику тікету.",
|
||||
"autocloseCmd":"Встановіть таймер для автоматичного закриття квитка"
|
||||
},
|
||||
"buttons":{
|
||||
"close":"Закрити тікет",
|
||||
"delete":"Видалити тікет",
|
||||
"reopen":"Відкрити тікет",
|
||||
"closeWithReason":"Закрити з причиною"
|
||||
},
|
||||
"messages":{
|
||||
"closedDescription":"Зараз лише адміністратори можуть говорити в цьому тікеті!\n\n*Натисніть кнопку нижче, щоб видалити або повторно відкрити цей тікет!*",
|
||||
"createdTitle":"Тікет створено!",
|
||||
"createdDescription":"Ваш тікет створено, ви можете визначити його за допомогою пінгу!",
|
||||
|
||||
"newTicketDmTitle":"Новий тікет!",
|
||||
"closedTicketDmTitle":"Тікет закрито!",
|
||||
"deletedTicketDmTitle":"Тікет видалено!",
|
||||
"closedTicketDmDescription":"Твій тікет закрито!",
|
||||
"deletedTicketDmDescription":"Твій тікет видалено!",
|
||||
"reopenTicketDmTitle":"Тікет відкритий!",
|
||||
"reopenTicketDmDescription":"Твій тікет відкритий!",
|
||||
|
||||
"chooseCategory":"виберіть категорію:",
|
||||
"gettingdeleted":"Тікет видаляється...",
|
||||
|
||||
"none":"пусто",
|
||||
"reason":"причина",
|
||||
"createdat":"створений",
|
||||
"openedby":"відкритий",
|
||||
"deletedby":"видалений",
|
||||
"closedby":"закритий",
|
||||
|
||||
"modalreason":"Яка причина закриття цього тікету?",
|
||||
"chooseATicket": "Виберіть тікет"
|
||||
},
|
||||
"transcripts":{
|
||||
"title":"Транскрипція",
|
||||
"processed":"Ця транскрипція обробляється",
|
||||
"wait":"Будь-ласка почекайте!",
|
||||
"estimated":"Розрахунковий час",
|
||||
"available":"Транскрипція доступна тут"
|
||||
},
|
||||
"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
-7
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"name": "open-ticket",
|
||||
"version": "3.0.0",
|
||||
"version": "3.5.3",
|
||||
"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 d",
|
||||
"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,12 +13,9 @@
|
||||
"author": "DJdj Development",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"axios": "^0.27.2",
|
||||
"axios": "^1.6.2",
|
||||
"chalk": "^5.0.1",
|
||||
"discord.js": "^14.0.2",
|
||||
"express": "^4.17.1",
|
||||
"node": "^16.10.0",
|
||||
"node-localstorage": "^2.2.1"
|
||||
"discord.js": "^14.14.1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
||||
Vendored
BIN
Binary file not shown.
@@ -0,0 +1,3 @@
|
||||
This file is only here to make sure that this directory exists!
|
||||
|
||||
I don't have any other use :)
|
||||
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"sendTranscripts":{
|
||||
"enableChannel":false,
|
||||
"enableDM":false,
|
||||
|
||||
"channel":"transcript channel id",
|
||||
"useHTMLtranscripts":true
|
||||
},
|
||||
"style":{
|
||||
"background":{
|
||||
"enableCustomBackground":false,
|
||||
"backgroundModus":"image OR color",
|
||||
"backgroundData":"image url OR hex color (#ffffff)"
|
||||
|
||||
},
|
||||
"header":{
|
||||
"enableCustomHeader":false,
|
||||
"backgroundColor":"#202225",
|
||||
"decoColor":"#F8BA00",
|
||||
"textColor":"#ffffff"
|
||||
|
||||
},
|
||||
"stats":{
|
||||
"enableCustomStats":false,
|
||||
"backgroundColor":"#202225",
|
||||
"keyTextColor":"#737373",
|
||||
"valueTextColor":"#ffffff",
|
||||
"hideBackgroundColor":"#40444a",
|
||||
"hideTextColor":"#ffffff"
|
||||
},
|
||||
"favicon":{
|
||||
"enableCustomFavicon":false,
|
||||
"imageUrl":"https://transcripts.dj-dj.be/favicon.png"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user