Merge branch 'dev' into dev-v4.1.0
This commit is contained in:
+4
-1
@@ -2,7 +2,7 @@
|
|||||||
<img src="https://apis.dj-dj.be/cdn/openticket/logo.png" alt="Open Ticket Logo" width="500px">
|
<img src="https://apis.dj-dj.be/cdn/openticket/logo.png" alt="Open Ticket Logo" width="500px">
|
||||||
|
|
||||||
[](https://discord.com/invite/26vT9wt3n3)
|
[](https://discord.com/invite/26vT9wt3n3)
|
||||||
[](https://github.com/open-discord-bots/open-ticket/releases/tag/v4.0.4)
|
[](https://github.com/open-discord-bots/open-ticket/releases/tag/v4.0.5)
|
||||||
[](https://github.com/sponsors/DJj123dj)
|
[](https://github.com/sponsors/DJj123dj)
|
||||||
[](.eggs/README.md)
|
[](.eggs/README.md)
|
||||||
|
|
||||||
@@ -20,6 +20,9 @@ It's recommended to provide at least `1GB` of **Memory/RAM** and `5GB` of **disk
|
|||||||
[**`openticket-egg-main.json` (Recommended)**](openticket-egg-main.json)
|
[**`openticket-egg-main.json` (Recommended)**](openticket-egg-main.json)
|
||||||
- This egg will use the `main` branch of Open Ticket.
|
- This egg will use the `main` branch of Open Ticket.
|
||||||
|
|
||||||
|
[**`openticket-egg-v4.0.5.json`**](openticket-egg-v4.0.5.json)
|
||||||
|
- This egg will always use Open Ticket `v4.0.5`. Open Ticket updates will not have an effect on this egg.
|
||||||
|
|
||||||
[**`openticket-egg-v4.0.4.json`**](openticket-egg-v4.0.4.json)
|
[**`openticket-egg-v4.0.4.json`**](openticket-egg-v4.0.4.json)
|
||||||
- This egg will always use Open Ticket `v4.0.4`. Open Ticket updates will not have an effect on this egg.
|
- This egg will always use Open Ticket `v4.0.4`. Open Ticket updates will not have an effect on this egg.
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,62 @@
|
|||||||
|
{
|
||||||
|
"_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO",
|
||||||
|
"meta": {
|
||||||
|
"version": "PTDL_v2",
|
||||||
|
"update_url": null
|
||||||
|
},
|
||||||
|
"exported_at": "2025-03-16T18:10:18+01:00",
|
||||||
|
"name": "Open Ticket (v4.0.5)",
|
||||||
|
"author": "support@dj-dj.be",
|
||||||
|
"description": "This is the official Pterodactyl egg for Open Ticket v4.0.5, the most advanced & customisable discord ticket bot that you will ever find! You can customise up to 300+ variables! This includes Html Transcripts, Advanced Plugins, Custom Embeds, Questions\/Modals, Stats & more!",
|
||||||
|
"features": null,
|
||||||
|
"docker_images": {
|
||||||
|
"ghcr.io\/parkervcp\/yolks:nodejs_20": "ghcr.io\/parkervcp\/yolks:nodejs_20"
|
||||||
|
},
|
||||||
|
"file_denylist": [],
|
||||||
|
"startup": "if [[ ! -z ${NODE_PACKAGES} ]]; then npm install ${NODE_PACKAGES}; fi; if [[ ! -z ${UNNODE_PACKAGES} ]]; then npm uninstall ${UNNODE_PACKAGES}; fi; if [ -f \/home\/container\/package.json ]; then npm install; fi; node \"\/home\/container\/index.js\" ${NODE_FLAGS};",
|
||||||
|
"config": {
|
||||||
|
"files": "{}",
|
||||||
|
"startup": "{\r\n \"done\": \"STARTUP INFO:\"\r\n}",
|
||||||
|
"logs": "{}",
|
||||||
|
"stop": "^C"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"installation": {
|
||||||
|
"script": "#!\/bin\/bash\r\n# Open Ticket Installation Script (v4.0.5)\r\n# Inspired by: Node.js Installation Script\r\n# \u00a9 DJdj Development\r\n\r\necho -e \"[OT INSTALLER] installing dependencies. please wait...\"\r\napt update\r\napt install -y git curl\r\n\r\necho -e \"[OT INSTALLER] updating npm. please wait...\"\r\nnpm install npm@latest --location=global\r\n\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server\r\n\r\nBRANCH=\"v4.0.5\"\r\n\r\nif [ \"$(ls -A \/mnt\/server)\" ]; then\r\n echo -e \"[OT INSTALLER] \/mnt\/server directory is not empty.\"\r\n if [ -d .git ]; then\r\n echo -e \"[OT INSTALLER] .git directory exists\"\r\n if [ -f .git\/config ]; then\r\n echo -e \"[OT INSTALLER] loading info from git config\"\r\n ORIGIN=$(git config --get remote.origin.url)\r\n else\r\n echo -e \"[OT INSTALLER] files found with no git config\"\r\n echo -e \"[OT INSTALLER] closing out without touching things to not break anything\"\r\n exit 10\r\n fi\r\n fi\r\n\r\n if [ \"${ORIGIN}\" == \"https:\/\/github.com\/open-discord-bots\/open-ticket.git\" ]; then\r\n echo \"pulling latest from github\"\r\n git pull\r\n fi\r\nelse\r\n echo -e \"[OT INSTALLER] \/mnt\/server is empty.\"\r\n echo -e \"[OT INSTALLER] cloning files into repo.\"\r\n if [ -z ${BRANCH} ]; then\r\n echo -e \"[OT INSTALLER] cloning default branch\"\r\n git clone https:\/\/github.com\/open-discord-bots\/open-ticket.git .\r\n else\r\n echo -e \"[OT INSTALLER] cloning ${BRANCH}'\"\r\n git clone --single-branch --branch ${BRANCH} https:\/\/github.com\/open-discord-bots\/open-ticket.git .\r\n fi\r\nfi\r\n\r\necho -e \"[OT INSTALLER] installing Open Ticket node.js packages.\"\r\nif [ -f \/mnt\/server\/package.json ]; then\r\n \/usr\/local\/bin\/npm install --omit=dev\r\nfi\r\n\r\necho -e \"[OT INSTALLER] installing custom node.js packages.\"\r\nif [[ ! -z ${NODE_PACKAGES} ]]; then\r\n \/usr\/local\/bin\/npm install ${NODE_PACKAGES}\r\nfi\r\n\r\necho -e \"[OT INSTALLER] install complete!\"\r\nexit 0",
|
||||||
|
"container": "node:latest",
|
||||||
|
"entrypoint": "bash"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"variables": [
|
||||||
|
{
|
||||||
|
"name": "Additional Npm Packages",
|
||||||
|
"description": "Specify additional npm packages used by Open Ticket plugins. Use spaces to separate.",
|
||||||
|
"env_variable": "NODE_PACKAGES",
|
||||||
|
"default_value": "",
|
||||||
|
"user_viewable": false,
|
||||||
|
"user_editable": true,
|
||||||
|
"rules": "string|nullable",
|
||||||
|
"field_type": "text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Startup Flags",
|
||||||
|
"description": "Start the bot with additional Open Ticket flags. Separate using spaces.\r\nA full reference list can be found in the documentation.",
|
||||||
|
"env_variable": "NODE_FLAGS",
|
||||||
|
"default_value": "",
|
||||||
|
"user_viewable": false,
|
||||||
|
"user_editable": true,
|
||||||
|
"rules": "string|nullable",
|
||||||
|
"field_type": "text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Uninstall Npm Packages",
|
||||||
|
"description": "A list of npm packages to uninstall. Separate by spaces.",
|
||||||
|
"env_variable": "UNNODE_PACKAGES",
|
||||||
|
"default_value": "",
|
||||||
|
"user_viewable": false,
|
||||||
|
"user_editable": true,
|
||||||
|
"rules": "string|nullable",
|
||||||
|
"field_type": "text"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
# Contributing Guidelines
|
# Contributing Guidelines
|
||||||
<img src="https://apis.dj-dj.be/cdn/openticket/logo.png" alt="Open Ticket Logo" width="500px">
|
<img src="https://apis.dj-dj.be/cdn/openticket/logo.png" alt="Open Ticket Logo" width="500px">
|
||||||
|
|
||||||
[](https://discord.com/invite/26vT9wt3n3) [](https://github.com/open-discord-bots/open-ticket/releases/tag/v4.0.4) [](https://github.com/sponsors/DJj123dj)
|
[](https://discord.com/invite/26vT9wt3n3) [](https://github.com/open-discord-bots/open-ticket/releases/tag/v4.0.5) [](https://github.com/sponsors/DJj123dj)
|
||||||
|
|
||||||
These are the Contributing Guidelines of Open Ticket!<br>
|
These are the Contributing Guidelines of Open Ticket!<br>
|
||||||
Here you can find everything you need to know about contributing to Open Ticket.<br>
|
Here you can find everything you need to know about contributing to Open Ticket.<br>
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ This list will be updated on every release.
|
|||||||
| Version | Supported | Notes |
|
| Version | Supported | Notes |
|
||||||
|------------|-----------|------------------------------------------|
|
|------------|-----------|------------------------------------------|
|
||||||
| 4.1.0 | 🟦 | |
|
| 4.1.0 | 🟦 | |
|
||||||
|
| 4.0.5 | ✅ | |
|
||||||
| 4.0.4 | ✅ | |
|
| 4.0.4 | ✅ | |
|
||||||
| 4.0.3 | ✅ | Transcripts v2.0 (Offline August 2025) |
|
| 4.0.3 | ✅ | Transcripts v2.0 (Offline August 2025) |
|
||||||
| 4.0.2 | 🚧 | Major discord.js bug |
|
| 4.0.2 | 🚧 | Major discord.js bug |
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<br>Powered By<br>
|
<br>Powered By<br>
|
||||||
<img src="https://apis.dj-dj.be/cdn/opendiscord/logo.png" alt="Open Ticket" width="170px"><br>
|
<img src="https://apis.dj-dj.be/cdn/opendiscord/logo.png" alt="Open Ticket" width="170px"><br>
|
||||||
<a href="https://discord.com/invite/26vT9wt3n3"><img alt="Discord Invite Link" src="https://img.shields.io/badge/discord-support%20server-5865F2.svg?style=flat-square&logo=discord"></img></a>
|
<a href="https://discord.com/invite/26vT9wt3n3"><img alt="Discord Invite Link" src="https://img.shields.io/badge/discord-support%20server-5865F2.svg?style=flat-square&logo=discord"></img></a>
|
||||||
<a href="https://github.com/open-discord-bots/open-ticket/releases/tag/v4.0.4"><img alt="Open Ticket Version" src="https://img.shields.io/badge/version-4.0.4-brightgreen.svg?style=flat-square"></img></a>
|
<a href="https://github.com/open-discord-bots/open-ticket/releases/tag/v4.0.5"><img alt="Open Ticket Version" src="https://img.shields.io/badge/version-4.0.5-brightgreen.svg?style=flat-square"></img></a>
|
||||||
<a href="https://otdocs.dj-dj.be"><img alt="Open Ticket Documentation" src="https://img.shields.io/badge/discord.js-v14-CB3837.svg?style=flat-square&logo=npm"></img></a>
|
<a href="https://otdocs.dj-dj.be"><img alt="Open Ticket Documentation" src="https://img.shields.io/badge/discord.js-v14-CB3837.svg?style=flat-square&logo=npm"></img></a>
|
||||||
<a href="https://github.com/open-discord-bots/open-ticket/blob/main/LICENSE"><img alt="Open Ticket License" src="https://img.shields.io/badge/license-GPL%203.0-important.svg?style=flat-square"></img></a>
|
<a href="https://github.com/open-discord-bots/open-ticket/blob/main/LICENSE"><img alt="Open Ticket License" src="https://img.shields.io/badge/license-GPL%203.0-important.svg?style=flat-square"></img></a>
|
||||||
<a href="https://otdocs.dj-dj.be"><img alt="Open Ticket Stars" src="https://img.shields.io/github/stars/djj123dj/open-ticket?color=yellow&label=stars&logo=github&style=flat-square"></img></a>
|
<a href="https://otdocs.dj-dj.be"><img alt="Open Ticket Stars" src="https://img.shields.io/github/stars/djj123dj/open-ticket?color=yellow&label=stars&logo=github&style=flat-square"></img></a>
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
"_INFO":{
|
"_INFO":{
|
||||||
"support":"https://otdocs.dj-dj.be",
|
"support":"https://otdocs.dj-dj.be",
|
||||||
"discord":"https://discord.dj-dj.be",
|
"discord":"https://discord.dj-dj.be",
|
||||||
"version":"open-ticket-v4.0.4"
|
"version":"open-ticket-v4.0.5"
|
||||||
},
|
},
|
||||||
|
|
||||||
"token":"your bot token here! (or leave empty when using 'tokenFromENV')",
|
"token":"your bot token here! (or leave empty when using 'tokenFromENV')",
|
||||||
|
|||||||
+1
-1
@@ -17,7 +17,7 @@
|
|||||||
"image":"https://www.example.com/image.png (or leave empty)",
|
"image":"https://www.example.com/image.png (or leave empty)",
|
||||||
"thumbnail":"https://www.example.com/image.png (or leave empty)",
|
"thumbnail":"https://www.example.com/image.png (or leave empty)",
|
||||||
|
|
||||||
"footer":"Open Ticket v4.0.4 (or leave empty)",
|
"footer":"Open Ticket v4.0.5 (or leave empty)",
|
||||||
"fields":[
|
"fields":[
|
||||||
{"name":"field name","value":"field value","inline":false}
|
{"name":"field name","value":"field value","inline":false}
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ process.argv.push(...flags)
|
|||||||
██║ ██║██╔═══╝ ██╔══╝ ██║╚██╗██║ ██║ ██║██║ ██╔═██╗ ██╔══╝ ██║
|
██║ ██║██╔═══╝ ██╔══╝ ██║╚██╗██║ ██║ ██║██║ ██╔═██╗ ██╔══╝ ██║
|
||||||
╚██████╔╝██║ ███████╗██║ ╚████║ ██║ ██║╚██████╗██║ ██╗███████╗ ██║
|
╚██████╔╝██║ ███████╗██║ ╚████║ ██║ ██║╚██████╗██║ ██╗███████╗ ██║
|
||||||
╚═════╝ ╚═╝ ╚══════╝╚═╝ ╚═══╝ ╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚══════╝ ╚═╝
|
╚═════╝ ╚═╝ ╚══════╝╚═╝ ╚═══╝ ╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚══════╝ ╚═╝
|
||||||
v4.0.4 - Made by DJj123dj & Contributors
|
v4.0.5 - Made by DJj123dj & Contributors
|
||||||
|
|
||||||
Discord: https://discord.dj-dj.be
|
Discord: https://discord.dj-dj.be
|
||||||
Docs: https://otdocs.dj-dj.be
|
Docs: https://otdocs.dj-dj.be
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"_TRANSLATION": {
|
"_TRANSLATION": {
|
||||||
"otversion": "v4.0.4",
|
"otversion": "v4.0.5",
|
||||||
"translators": ["palestinian"],
|
"translators": ["palestinian"],
|
||||||
"lastedited": "06/12/2024",
|
"lastedited": "06/12/2024",
|
||||||
"language": "Arabic",
|
"language": "Arabic",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"_TRANSLATION":{
|
"_TRANSLATION":{
|
||||||
"otversion":"v4.0.4",
|
"otversion":"v4.0.5",
|
||||||
"translators":["guillee3"],
|
"translators":["guillee3"],
|
||||||
"lastedited":"21/08/2024",
|
"lastedited":"21/08/2024",
|
||||||
"language":"Catalan",
|
"language":"Catalan",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"_TRANSLATION":{
|
"_TRANSLATION":{
|
||||||
"otversion":"v4.0.4",
|
"otversion":"v4.0.5",
|
||||||
"translators":["DJj123dj"],
|
"translators":["DJj123dj"],
|
||||||
"lastedited":"21/08/2024",
|
"lastedited":"21/08/2024",
|
||||||
"language":"Custom",
|
"language":"Custom",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"_TRANSLATION":{
|
"_TRANSLATION":{
|
||||||
"otversion":"v4.0.4",
|
"otversion":"v4.0.5",
|
||||||
"translators":["spyeye_"],
|
"translators":["spyeye_"],
|
||||||
"lastedited":"21/08/2024",
|
"lastedited":"21/08/2024",
|
||||||
"language":"Czech",
|
"language":"Czech",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"_TRANSLATION":{
|
"_TRANSLATION":{
|
||||||
"otversion":"v4.0.4",
|
"otversion":"v4.0.5",
|
||||||
"translators":["the_gamer"],
|
"translators":["the_gamer"],
|
||||||
"lastedited":"26/09/2024",
|
"lastedited":"26/09/2024",
|
||||||
"language":"Danish",
|
"language":"Danish",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"_TRANSLATION":{
|
"_TRANSLATION":{
|
||||||
"otversion":"v4.0.4",
|
"otversion":"v4.0.5",
|
||||||
"translators":["DJj123dj"],
|
"translators":["DJj123dj"],
|
||||||
"lastedited":"21/08/2024",
|
"lastedited":"21/08/2024",
|
||||||
"language":"Dutch",
|
"language":"Dutch",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"_TRANSLATION":{
|
"_TRANSLATION":{
|
||||||
"otversion":"v4.0.4",
|
"otversion":"v4.0.5",
|
||||||
"translators":["DJj123dj"],
|
"translators":["DJj123dj"],
|
||||||
"lastedited":"21/08/2024",
|
"lastedited":"21/08/2024",
|
||||||
"language":"English",
|
"language":"English",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"_TRANSLATION":{
|
"_TRANSLATION":{
|
||||||
"otversion":"v4.0.4",
|
"otversion":"v4.0.5",
|
||||||
"translators":["iamnotmega","ChatGPT"],
|
"translators":["iamnotmega","ChatGPT"],
|
||||||
"lastedited":"21/10/2024",
|
"lastedited":"21/10/2024",
|
||||||
"language":"Estonian",
|
"language":"Estonian",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"_TRANSLATION":{
|
"_TRANSLATION":{
|
||||||
"otversion":"v4.0.4",
|
"otversion":"v4.0.5",
|
||||||
"translators":["iamnotmega","ChatGPT"],
|
"translators":["iamnotmega","ChatGPT"],
|
||||||
"lastedited":"21/10/2024",
|
"lastedited":"21/10/2024",
|
||||||
"language":"Finnish",
|
"language":"Finnish",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"_TRANSLATION":{
|
"_TRANSLATION":{
|
||||||
"otversion":"v4.0.4",
|
"otversion":"v4.0.5",
|
||||||
"translators":["guillee3"],
|
"translators":["guillee3"],
|
||||||
"lastedited":"04/12/2024",
|
"lastedited":"04/12/2024",
|
||||||
"language":"French",
|
"language":"French",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"_TRANSLATION":{
|
"_TRANSLATION":{
|
||||||
"otversion":"v4.0.4",
|
"otversion":"v4.0.5",
|
||||||
"translators":["benzorich"],
|
"translators":["benzorich"],
|
||||||
"lastedited":"06/10/2024",
|
"lastedited":"06/10/2024",
|
||||||
"language":"German",
|
"language":"German",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"_TRANSLATION":{
|
"_TRANSLATION":{
|
||||||
"otversion":"v4.0.4",
|
"otversion":"v4.0.5",
|
||||||
"translators":["an_developer"],
|
"translators":["an_developer"],
|
||||||
"lastedited":"14/12/2024",
|
"lastedited":"14/12/2024",
|
||||||
"language":"Hindi",
|
"language":"Hindi",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"_TRANSLATION":{
|
"_TRANSLATION":{
|
||||||
"otversion":"v4.0.4",
|
"otversion":"v4.0.5",
|
||||||
"translators":["Kornel0706"],
|
"translators":["Kornel0706"],
|
||||||
"lastedited":"22/08/2024",
|
"lastedited":"22/08/2024",
|
||||||
"language":"Hungarian",
|
"language":"Hungarian",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"_TRANSLATION":{
|
"_TRANSLATION":{
|
||||||
"otversion":"v4.0.4",
|
"otversion":"v4.0.5",
|
||||||
"translators":["erxg"],
|
"translators":["erxg"],
|
||||||
"lastedited":"25/08/2024",
|
"lastedited":"25/08/2024",
|
||||||
"language":"Indonesian",
|
"language":"Indonesian",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"_TRANSLATION":{
|
"_TRANSLATION":{
|
||||||
"otversion":"v4.0.4",
|
"otversion":"v4.0.5",
|
||||||
"translators":["fraden1mvp."],
|
"translators":["fraden1mvp."],
|
||||||
"lastedited":"08/10/2024",
|
"lastedited":"08/10/2024",
|
||||||
"language":"Italian",
|
"language":"Italian",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"_TRANSLATION": {
|
"_TRANSLATION": {
|
||||||
"otversion": "v4.0.4",
|
"otversion": "v4.0.5",
|
||||||
"translators": ["NoOneNook"],
|
"translators": ["NoOneNook"],
|
||||||
"lastedited": "25/03/2025",
|
"lastedited": "25/03/2025",
|
||||||
"language": "Latvian",
|
"language": "Latvian",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"_TRANSLATION":{
|
"_TRANSLATION":{
|
||||||
"otversion":"v4.0.4",
|
"otversion":"v4.0.5",
|
||||||
"translators":["TsgIndrius"],
|
"translators":["TsgIndrius"],
|
||||||
"lastedited":"26/01/2025",
|
"lastedited":"26/01/2025",
|
||||||
"language":"Lithuanian",
|
"language":"Lithuanian",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"_TRANSLATION": {
|
"_TRANSLATION": {
|
||||||
"otversion": "v4.0.4",
|
"otversion": "v4.0.5",
|
||||||
"translators": ["NoOneNook"],
|
"translators": ["NoOneNook"],
|
||||||
"lastedited": "25/03/2025",
|
"lastedited": "25/03/2025",
|
||||||
"language": "Norwegian",
|
"language": "Norwegian",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"_TRANSLATION":{
|
"_TRANSLATION":{
|
||||||
"otversion":"v4.0.4",
|
"otversion":"v4.0.5",
|
||||||
"translators":["DanoGlez"],
|
"translators":["DanoGlez"],
|
||||||
"lastedited":"28/01/2025",
|
"lastedited":"28/01/2025",
|
||||||
"language":"Polish",
|
"language":"Polish",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"_TRANSLATION":{
|
"_TRANSLATION":{
|
||||||
"otversion":"v4.0.4",
|
"otversion":"v4.0.5",
|
||||||
"translators":["quiradon"],
|
"translators":["quiradon"],
|
||||||
"lastedited":"20/08/2024",
|
"lastedited":"20/08/2024",
|
||||||
"language":"Portuguese",
|
"language":"Portuguese",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"_TRANSLATION":{
|
"_TRANSLATION":{
|
||||||
"otversion":"v4.0.4",
|
"otversion":"v4.0.5",
|
||||||
"translators":["SankeDev"],
|
"translators":["SankeDev"],
|
||||||
"lastedited":"27/08/2024",
|
"lastedited":"27/08/2024",
|
||||||
"language":"Romanian",
|
"language":"Romanian",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"_TRANSLATION": {
|
"_TRANSLATION": {
|
||||||
"otversion": "v4.0.4",
|
"otversion": "v4.0.5",
|
||||||
"translators": ["NoOneNook"],
|
"translators": ["NoOneNook"],
|
||||||
"lastedited": "25/03/2025",
|
"lastedited": "25/03/2025",
|
||||||
"language": "Russian",
|
"language": "Russian",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"_TRANSLATION":{
|
"_TRANSLATION":{
|
||||||
"otversion":"v4.0.4",
|
"otversion":"v4.0.5",
|
||||||
"translators":["Redactado","Josuens"],
|
"translators":["Redactado","Josuens"],
|
||||||
"lastedited":"22/08/2024",
|
"lastedited":"22/08/2024",
|
||||||
"language":"Spanish",
|
"language":"Spanish",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"_TRANSLATION": {
|
"_TRANSLATION": {
|
||||||
"otversion": "v4.0.4",
|
"otversion": "v4.0.5",
|
||||||
"translators": ["NoOneNook"],
|
"translators": ["NoOneNook"],
|
||||||
"lastedited": "25/03/2025",
|
"lastedited": "25/03/2025",
|
||||||
"language": "Svenska",
|
"language": "Svenska",
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"_TRANSLATION":{
|
"_TRANSLATION":{
|
||||||
"otversion":"v4.0.4",
|
"otversion":"v4.0.5",
|
||||||
"translators":["modshd"],
|
"translators":["modshd"],
|
||||||
"lastedited":"13/11/2024",
|
"lastedited":"13/11/2024",
|
||||||
"language":"Thai",
|
"language":"Thai",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"_TRANSLATION": {
|
"_TRANSLATION": {
|
||||||
"otversion": "v4.0.4",
|
"otversion": "v4.0.5",
|
||||||
"translators": ["palestinian"],
|
"translators": ["palestinian"],
|
||||||
"lastedited": "26/11/2024",
|
"lastedited": "26/11/2024",
|
||||||
"language": "Turkish",
|
"language": "Turkish",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"_TRANSLATION":{
|
"_TRANSLATION":{
|
||||||
"otversion":"v4.0.4",
|
"otversion":"v4.0.5",
|
||||||
"translators":["Anderskiy"],
|
"translators":["Anderskiy"],
|
||||||
"lastedited":"31/08/2024",
|
"lastedited":"31/08/2024",
|
||||||
"language":"Ukrainian",
|
"language":"Ukrainian",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"_TRANSLATION":{
|
"_TRANSLATION":{
|
||||||
"otversion":"v4.0.4",
|
"otversion":"v4.0.5",
|
||||||
"translators":["ngocdiep2006"],
|
"translators":["ngocdiep2006"],
|
||||||
"lastedited":"07/04/2025",
|
"lastedited":"07/04/2025",
|
||||||
"language":"Vietnamese",
|
"language":"Vietnamese",
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "open-ticket",
|
"name": "open-ticket",
|
||||||
"author": "DJdj Development",
|
"author": "DJdj Development",
|
||||||
"version": "4.0.4",
|
"version": "4.0.5",
|
||||||
"description": "The most advanced open-source discord ticket bot with HTML transcripts, plugins, questions, claiming, pinning & more! Using discord.js v14 & JSON database! ",
|
"description": "The most advanced open-source discord ticket bot with HTML transcripts, plugins, questions, claiming, pinning & more! Using discord.js v14 & JSON database! ",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"ticket-bot",
|
"ticket-bot",
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ export const registerActions = async () => {
|
|||||||
const channelCategory = option.get("opendiscord:channel-category").value
|
const channelCategory = option.get("opendiscord:channel-category").value
|
||||||
const channelBackupCategory = option.get("opendiscord:channel-category-backup").value
|
const channelBackupCategory = option.get("opendiscord:channel-category-backup").value
|
||||||
const channelDescription = option.get("opendiscord:channel-description").value
|
const channelDescription = option.get("opendiscord:channel-description").value
|
||||||
const channelSuffix = opendiscord.options.suffix.getSuffixFromOption(option,user)
|
const channelSuffix = await opendiscord.options.suffix.getSuffixFromOption(option,user)
|
||||||
const channelName = channelPrefix+channelSuffix
|
const channelName = channelPrefix+channelSuffix
|
||||||
|
|
||||||
//handle category
|
//handle category
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ export class ODMain {
|
|||||||
|
|
||||||
constructor(){
|
constructor(){
|
||||||
this.versions = new ODVersionManager_Default()
|
this.versions = new ODVersionManager_Default()
|
||||||
this.versions.add(ODVersion.fromString("opendiscord:version","v4.0.4"))
|
this.versions.add(ODVersion.fromString("opendiscord:version","v4.0.5"))
|
||||||
this.versions.add(ODVersion.fromString("opendiscord:api","v1.0.0"))
|
this.versions.add(ODVersion.fromString("opendiscord:api","v1.0.0"))
|
||||||
this.versions.add(ODVersion.fromString("opendiscord:transcripts","v2.0.0"))
|
this.versions.add(ODVersion.fromString("opendiscord:transcripts","v2.0.0"))
|
||||||
this.versions.add(ODVersion.fromString("opendiscord:livestatus","v2.0.0"))
|
this.versions.add(ODVersion.fromString("opendiscord:livestatus","v2.0.0"))
|
||||||
|
|||||||
@@ -560,8 +560,8 @@ export class ODHTTPGetRequest {
|
|||||||
this.throwOnError = throwOnError
|
this.throwOnError = throwOnError
|
||||||
const newConfig = config ?? {}
|
const newConfig = config ?? {}
|
||||||
newConfig.method = "GET"
|
newConfig.method = "GET"
|
||||||
if (newConfig.headers) Object.assign(newConfig.headers,{"User-Agent":"OpenDiscordBots-OpenTicket/4.0.4"})
|
if (newConfig.headers) Object.assign(newConfig.headers,{"User-Agent":"OpenDiscordBots-OpenTicket/4.0.5"})
|
||||||
else newConfig.headers = {"User-Agent":"OpenDiscordBots-OpenTicket/4.0.4"}
|
else newConfig.headers = {"User-Agent":"OpenDiscordBots-OpenTicket/4.0.5"}
|
||||||
this.config = newConfig
|
this.config = newConfig
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -615,8 +615,8 @@ export class ODHTTPPostRequest {
|
|||||||
this.throwOnError = throwOnError
|
this.throwOnError = throwOnError
|
||||||
const newConfig = config ?? {}
|
const newConfig = config ?? {}
|
||||||
newConfig.method = "POST"
|
newConfig.method = "POST"
|
||||||
if (newConfig.headers) Object.assign(newConfig.headers,{"User-Agent":"OpenDiscordBots-OpenTicket/4.0.4"})
|
if (newConfig.headers) Object.assign(newConfig.headers,{"User-Agent":"OpenDiscordBots-OpenTicket/4.0.5"})
|
||||||
else newConfig.headers = {"User-Agent":"OpenDiscordBots-OpenTicket/4.0.4"}
|
else newConfig.headers = {"User-Agent":"OpenDiscordBots-OpenTicket/4.0.5"}
|
||||||
this.config = newConfig
|
this.config = newConfig
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -257,7 +257,7 @@ export class ODQuickButton {
|
|||||||
/**The id of this button. */
|
/**The id of this button. */
|
||||||
id: ODId
|
id: ODId
|
||||||
/**The current data of this button */
|
/**The current data of this button */
|
||||||
data: ODButtonData = {
|
data: Partial<ODButtonData> = {
|
||||||
customId:"",
|
customId:"",
|
||||||
mode:"button",
|
mode:"button",
|
||||||
url:null,
|
url:null,
|
||||||
@@ -267,7 +267,7 @@ export class ODQuickButton {
|
|||||||
disabled:false
|
disabled:false
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor(id:ODValidId,data:ODButtonData){
|
constructor(id:ODValidId,data:Partial<ODButtonData>){
|
||||||
this.id = new ODId(id)
|
this.id = new ODId(id)
|
||||||
this.data = data
|
this.data = data
|
||||||
}
|
}
|
||||||
@@ -277,7 +277,7 @@ export class ODQuickButton {
|
|||||||
try {
|
try {
|
||||||
//create the discord.js button
|
//create the discord.js button
|
||||||
const button = new discord.ButtonBuilder()
|
const button = new discord.ButtonBuilder()
|
||||||
if (this.data.mode == "button") button.setCustomId(this.data.customId)
|
if (this.data.mode == "button") button.setCustomId(this.data.customId ?? "od:unknown-button")
|
||||||
if (this.data.mode == "url") button.setStyle(discord.ButtonStyle.Link)
|
if (this.data.mode == "url") button.setStyle(discord.ButtonStyle.Link)
|
||||||
else if (this.data.color == "gray") button.setStyle(discord.ButtonStyle.Secondary)
|
else if (this.data.color == "gray") button.setStyle(discord.ButtonStyle.Secondary)
|
||||||
else if (this.data.color == "blue") button.setStyle(discord.ButtonStyle.Primary)
|
else if (this.data.color == "blue") button.setStyle(discord.ButtonStyle.Primary)
|
||||||
@@ -287,7 +287,7 @@ export class ODQuickButton {
|
|||||||
if (this.data.label) button.setLabel(this.data.label)
|
if (this.data.label) button.setLabel(this.data.label)
|
||||||
if (this.data.emoji) button.setEmoji(this.data.emoji)
|
if (this.data.emoji) button.setEmoji(this.data.emoji)
|
||||||
if (this.data.disabled) button.setDisabled(this.data.disabled)
|
if (this.data.disabled) button.setDisabled(this.data.disabled)
|
||||||
if (!this.data.emoji && !this.data.label) button.setLabel(this.data.customId)
|
if (!this.data.emoji && !this.data.label) button.setLabel(this.data.customId ?? "od:unknown-button")
|
||||||
|
|
||||||
return {id:this.id,component:button}
|
return {id:this.id,component:button}
|
||||||
}catch(err){
|
}catch(err){
|
||||||
@@ -564,7 +564,7 @@ export class ODQuickDropdown {
|
|||||||
/**The id of this dropdown. */
|
/**The id of this dropdown. */
|
||||||
id: ODId
|
id: ODId
|
||||||
/**The current data of this dropdown */
|
/**The current data of this dropdown */
|
||||||
data: ODDropdownData = {
|
data: Partial<ODDropdownData> = {
|
||||||
customId:"",
|
customId:"",
|
||||||
type:"string",
|
type:"string",
|
||||||
placeholder:null,
|
placeholder:null,
|
||||||
@@ -580,7 +580,7 @@ export class ODQuickDropdown {
|
|||||||
mentionables:[]
|
mentionables:[]
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor(id:ODValidId,data:ODDropdownData){
|
constructor(id:ODValidId,data:Partial<ODDropdownData>){
|
||||||
this.id = new ODId(id)
|
this.id = new ODId(id)
|
||||||
this.data = data
|
this.data = data
|
||||||
}
|
}
|
||||||
@@ -590,8 +590,9 @@ export class ODQuickDropdown {
|
|||||||
try{
|
try{
|
||||||
//create the discord.js dropdown
|
//create the discord.js dropdown
|
||||||
if (this.data.type == "string"){
|
if (this.data.type == "string"){
|
||||||
|
if (!this.data.options) throw new ODSystemError("ODQuickDropdown:build(): "+this.id.value+" => Dropdown requires at least 1 option to be present.")
|
||||||
const dropdown = new discord.StringSelectMenuBuilder()
|
const dropdown = new discord.StringSelectMenuBuilder()
|
||||||
dropdown.setCustomId(this.data.customId)
|
dropdown.setCustomId(this.data.customId ?? "od:unknown-dropdown")
|
||||||
dropdown.setOptions(...this.data.options)
|
dropdown.setOptions(...this.data.options)
|
||||||
if (this.data.placeholder) dropdown.setPlaceholder(this.data.placeholder)
|
if (this.data.placeholder) dropdown.setPlaceholder(this.data.placeholder)
|
||||||
if (this.data.minValues) dropdown.setMinValues(this.data.minValues)
|
if (this.data.minValues) dropdown.setMinValues(this.data.minValues)
|
||||||
@@ -601,8 +602,9 @@ export class ODQuickDropdown {
|
|||||||
return {id:this.id,component:dropdown}
|
return {id:this.id,component:dropdown}
|
||||||
|
|
||||||
}else if (this.data.type == "user"){
|
}else if (this.data.type == "user"){
|
||||||
|
if (!this.data.users) throw new ODSystemError("ODQuickDropdown:build(): "+this.id.value+" => Dropdown requires at least 1 user option to be present.")
|
||||||
const dropdown = new discord.UserSelectMenuBuilder()
|
const dropdown = new discord.UserSelectMenuBuilder()
|
||||||
dropdown.setCustomId(this.data.customId)
|
dropdown.setCustomId(this.data.customId ?? "od:unknown-dropdown")
|
||||||
if (this.data.users.length > 0) dropdown.setDefaultUsers(...this.data.users.map((u) => u.id))
|
if (this.data.users.length > 0) dropdown.setDefaultUsers(...this.data.users.map((u) => u.id))
|
||||||
if (this.data.placeholder) dropdown.setPlaceholder(this.data.placeholder)
|
if (this.data.placeholder) dropdown.setPlaceholder(this.data.placeholder)
|
||||||
if (this.data.minValues) dropdown.setMinValues(this.data.minValues)
|
if (this.data.minValues) dropdown.setMinValues(this.data.minValues)
|
||||||
@@ -612,8 +614,9 @@ export class ODQuickDropdown {
|
|||||||
return {id:this.id,component:dropdown}
|
return {id:this.id,component:dropdown}
|
||||||
|
|
||||||
}else if (this.data.type == "role"){
|
}else if (this.data.type == "role"){
|
||||||
|
if (!this.data.roles) throw new ODSystemError("ODQuickDropdown:build(): "+this.id.value+" => Dropdown requires at least 1 role option to be present.")
|
||||||
const dropdown = new discord.RoleSelectMenuBuilder()
|
const dropdown = new discord.RoleSelectMenuBuilder()
|
||||||
dropdown.setCustomId(this.data.customId)
|
dropdown.setCustomId(this.data.customId ?? "od:unknown-dropdown")
|
||||||
if (this.data.roles.length > 0) dropdown.setDefaultRoles(...this.data.roles.map((r) => r.id))
|
if (this.data.roles.length > 0) dropdown.setDefaultRoles(...this.data.roles.map((r) => r.id))
|
||||||
if (this.data.placeholder) dropdown.setPlaceholder(this.data.placeholder)
|
if (this.data.placeholder) dropdown.setPlaceholder(this.data.placeholder)
|
||||||
if (this.data.minValues) dropdown.setMinValues(this.data.minValues)
|
if (this.data.minValues) dropdown.setMinValues(this.data.minValues)
|
||||||
@@ -623,8 +626,9 @@ export class ODQuickDropdown {
|
|||||||
return {id:this.id,component:dropdown}
|
return {id:this.id,component:dropdown}
|
||||||
|
|
||||||
}else if (this.data.type == "channel"){
|
}else if (this.data.type == "channel"){
|
||||||
|
if (!this.data.channels) throw new ODSystemError("ODQuickDropdown:build(): "+this.id.value+" => Dropdown requires at least 1 channel option to be present.")
|
||||||
const dropdown = new discord.ChannelSelectMenuBuilder()
|
const dropdown = new discord.ChannelSelectMenuBuilder()
|
||||||
dropdown.setCustomId(this.data.customId)
|
dropdown.setCustomId(this.data.customId ?? "od:unknown-dropdown")
|
||||||
if (this.data.channels.length > 0) dropdown.setDefaultChannels(...this.data.channels.map((c) => c.id))
|
if (this.data.channels.length > 0) dropdown.setDefaultChannels(...this.data.channels.map((c) => c.id))
|
||||||
if (this.data.placeholder) dropdown.setPlaceholder(this.data.placeholder)
|
if (this.data.placeholder) dropdown.setPlaceholder(this.data.placeholder)
|
||||||
if (this.data.minValues) dropdown.setMinValues(this.data.minValues)
|
if (this.data.minValues) dropdown.setMinValues(this.data.minValues)
|
||||||
@@ -634,6 +638,7 @@ export class ODQuickDropdown {
|
|||||||
return {id:this.id,component:dropdown}
|
return {id:this.id,component:dropdown}
|
||||||
|
|
||||||
}else if (this.data.type == "mentionable"){
|
}else if (this.data.type == "mentionable"){
|
||||||
|
if (!this.data.mentionables) throw new ODSystemError("ODQuickDropdown:build(): "+this.id.value+" => Dropdown requires at least 1 mentionable option to be present.")
|
||||||
const dropdown = new discord.MentionableSelectMenuBuilder()
|
const dropdown = new discord.MentionableSelectMenuBuilder()
|
||||||
|
|
||||||
const values: ({type:discord.SelectMenuDefaultValueType.User,id:string}|{type:discord.SelectMenuDefaultValueType.Role,id:string})[] = []
|
const values: ({type:discord.SelectMenuDefaultValueType.User,id:string}|{type:discord.SelectMenuDefaultValueType.Role,id:string})[] = []
|
||||||
@@ -645,7 +650,7 @@ export class ODQuickDropdown {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
dropdown.setCustomId(this.data.customId)
|
dropdown.setCustomId(this.data.customId ?? "od:unknown-dropdown")
|
||||||
if (this.data.mentionables.length > 0) dropdown.setDefaultValues(...values)
|
if (this.data.mentionables.length > 0) dropdown.setDefaultValues(...values)
|
||||||
if (this.data.placeholder) dropdown.setPlaceholder(this.data.placeholder)
|
if (this.data.placeholder) dropdown.setPlaceholder(this.data.placeholder)
|
||||||
if (this.data.minValues) dropdown.setMinValues(this.data.minValues)
|
if (this.data.minValues) dropdown.setMinValues(this.data.minValues)
|
||||||
@@ -799,14 +804,14 @@ export class ODQuickFile {
|
|||||||
/**The id of this file. */
|
/**The id of this file. */
|
||||||
id: ODId
|
id: ODId
|
||||||
/**The current data of this file */
|
/**The current data of this file */
|
||||||
data: ODFileData = {
|
data: Partial<ODFileData> = {
|
||||||
file:"",
|
file:"",
|
||||||
name:"file.txt",
|
name:"file.txt",
|
||||||
description:null,
|
description:null,
|
||||||
spoiler:false
|
spoiler:false
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor(id:ODValidId,data:ODFileData){
|
constructor(id:ODValidId,data:Partial<ODFileData>){
|
||||||
this.id = new ODId(id)
|
this.id = new ODId(id)
|
||||||
this.data = data
|
this.data = data
|
||||||
}
|
}
|
||||||
@@ -815,7 +820,7 @@ export class ODQuickFile {
|
|||||||
async build(): Promise<ODFileBuildResult> {
|
async build(): Promise<ODFileBuildResult> {
|
||||||
try{
|
try{
|
||||||
//create the discord.js attachment
|
//create the discord.js attachment
|
||||||
const file = new discord.AttachmentBuilder(this.data.file)
|
const file = new discord.AttachmentBuilder(this.data.file ?? "<empty-file>")
|
||||||
file.setName(this.data.name ? this.data.name : "file.txt")
|
file.setName(this.data.name ? this.data.name : "file.txt")
|
||||||
if (this.data.description) file.setDescription(this.data.description)
|
if (this.data.description) file.setDescription(this.data.description)
|
||||||
if (this.data.spoiler) file.setSpoiler(this.data.spoiler)
|
if (this.data.spoiler) file.setSpoiler(this.data.spoiler)
|
||||||
@@ -1055,7 +1060,7 @@ export class ODQuickEmbed {
|
|||||||
/**The id of this embed. */
|
/**The id of this embed. */
|
||||||
id: ODId
|
id: ODId
|
||||||
/**The current data of this embed */
|
/**The current data of this embed */
|
||||||
data: ODEmbedData = {
|
data: Partial<ODEmbedData> = {
|
||||||
title:null,
|
title:null,
|
||||||
color:null,
|
color:null,
|
||||||
url:null,
|
url:null,
|
||||||
@@ -1071,7 +1076,7 @@ export class ODQuickEmbed {
|
|||||||
timestamp:null
|
timestamp:null
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor(id:ODValidId,data:ODEmbedData){
|
constructor(id:ODValidId,data:Partial<ODEmbedData>){
|
||||||
this.id = new ODId(id)
|
this.id = new ODId(id)
|
||||||
this.data = data
|
this.data = data
|
||||||
}
|
}
|
||||||
@@ -1097,7 +1102,7 @@ export class ODQuickEmbed {
|
|||||||
if (this.data.image) embed.setImage(this.data.image)
|
if (this.data.image) embed.setImage(this.data.image)
|
||||||
if (this.data.thumbnail) embed.setThumbnail(this.data.thumbnail)
|
if (this.data.thumbnail) embed.setThumbnail(this.data.thumbnail)
|
||||||
if (this.data.timestamp) embed.setTimestamp(this.data.timestamp)
|
if (this.data.timestamp) embed.setTimestamp(this.data.timestamp)
|
||||||
if (this.data.fields.length > 0) embed.setFields(this.data.fields)
|
if (this.data.fields && this.data.fields.length > 0) embed.setFields(this.data.fields)
|
||||||
|
|
||||||
return {id:this.id,embed}
|
return {id:this.id,embed}
|
||||||
}catch(err){
|
}catch(err){
|
||||||
|
|||||||
@@ -350,10 +350,10 @@ export class ODOptionSuffixManager extends ODManager<ODOptionSuffix> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**Instantly get the suffix from an `ODTicketOption`. */
|
/**Instantly get the suffix from an `ODTicketOption`. */
|
||||||
getSuffixFromOption(option:ODTicketOption,user:discord.User): string|null {
|
async getSuffixFromOption(option:ODTicketOption,user:discord.User): Promise<string|null> {
|
||||||
const suffix = this.getAll().find((suffix) => suffix.option.id.value == option.id.value)
|
const suffix = this.getAll().find((suffix) => suffix.option.id.value == option.id.value)
|
||||||
if (!suffix) return null
|
if (!suffix) return null
|
||||||
return suffix.getSuffix(user)
|
return await suffix.getSuffix(user)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -374,7 +374,7 @@ export class ODOptionSuffix extends ODManagerData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**Get the suffix for a new ticket. */
|
/**Get the suffix for a new ticket. */
|
||||||
getSuffix(user:discord.User): string {
|
async getSuffix(user:discord.User): Promise<string> {
|
||||||
throw new ODSystemError("Tried to use an unimplemented ODOptionSuffix!")
|
throw new ODSystemError("Tried to use an unimplemented ODOptionSuffix!")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -387,7 +387,7 @@ export class ODOptionSuffix extends ODManagerData {
|
|||||||
* Use `getSuffix()` to get the new suffix!
|
* Use `getSuffix()` to get the new suffix!
|
||||||
*/
|
*/
|
||||||
export class ODOptionUserNameSuffix extends ODOptionSuffix {
|
export class ODOptionUserNameSuffix extends ODOptionSuffix {
|
||||||
getSuffix(user:discord.User): string {
|
async getSuffix(user:discord.User): Promise<string> {
|
||||||
return user.username
|
return user.username
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -400,7 +400,7 @@ export class ODOptionUserNameSuffix extends ODOptionSuffix {
|
|||||||
* Use `getSuffix()` to get the new suffix!
|
* Use `getSuffix()` to get the new suffix!
|
||||||
*/
|
*/
|
||||||
export class ODOptionUserIdSuffix extends ODOptionSuffix {
|
export class ODOptionUserIdSuffix extends ODOptionSuffix {
|
||||||
getSuffix(user:discord.User): string {
|
async getSuffix(user:discord.User): Promise<string> {
|
||||||
return user.id
|
return user.id
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -426,11 +426,11 @@ export class ODOptionCounterDynamicSuffix extends ODOptionSuffix {
|
|||||||
async #init(){
|
async #init(){
|
||||||
if (!await this.database.exists("opendiscord:option-suffix-counter",this.option.id.value)) await this.database.set("opendiscord:option-suffix-counter",this.option.id.value,0)
|
if (!await this.database.exists("opendiscord:option-suffix-counter",this.option.id.value)) await this.database.set("opendiscord:option-suffix-counter",this.option.id.value,0)
|
||||||
}
|
}
|
||||||
getSuffix(user:discord.User): string {
|
async getSuffix(user:discord.User): Promise<string> {
|
||||||
const rawCurrentValue = this.database.get("opendiscord:option-suffix-counter",this.option.id.value)
|
const rawCurrentValue = await this.database.get("opendiscord:option-suffix-counter",this.option.id.value)
|
||||||
const currentValue = (typeof rawCurrentValue != "number") ? 0 : rawCurrentValue
|
const currentValue = (typeof rawCurrentValue != "number") ? 0 : rawCurrentValue
|
||||||
const newValue = currentValue+1
|
const newValue = currentValue+1
|
||||||
this.database.set("opendiscord:option-suffix-counter",this.option.id.value,newValue)
|
await this.database.set("opendiscord:option-suffix-counter",this.option.id.value,newValue)
|
||||||
return newValue.toString()
|
return newValue.toString()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -456,12 +456,12 @@ export class ODOptionCounterFixedSuffix extends ODOptionSuffix {
|
|||||||
async #init(){
|
async #init(){
|
||||||
if (!await this.database.exists("opendiscord:option-suffix-counter",this.option.id.value)) await this.database.set("opendiscord:option-suffix-counter",this.option.id.value,0)
|
if (!await this.database.exists("opendiscord:option-suffix-counter",this.option.id.value)) await this.database.set("opendiscord:option-suffix-counter",this.option.id.value,0)
|
||||||
}
|
}
|
||||||
getSuffix(user:discord.User): string {
|
async getSuffix(user:discord.User): Promise<string> {
|
||||||
const rawCurrentValue = this.database.get("opendiscord:option-suffix-counter",this.option.id.value)
|
const rawCurrentValue = await this.database.get("opendiscord:option-suffix-counter",this.option.id.value)
|
||||||
const currentValue = (typeof rawCurrentValue != "number") ? 0 : rawCurrentValue
|
const currentValue = (typeof rawCurrentValue != "number") ? 0 : rawCurrentValue
|
||||||
const newValue = (currentValue >= 9999) ? 0 : currentValue+1
|
const newValue = (currentValue >= 9999) ? 0 : currentValue+1
|
||||||
|
|
||||||
this.database.set("opendiscord:option-suffix-counter",this.option.id.value,newValue)
|
await this.database.set("opendiscord:option-suffix-counter",this.option.id.value,newValue)
|
||||||
if (newValue.toString().length == 1) return "000"+newValue.toString()
|
if (newValue.toString().length == 1) return "000"+newValue.toString()
|
||||||
else if (newValue.toString().length == 2) return "00"+newValue.toString()
|
else if (newValue.toString().length == 2) return "00"+newValue.toString()
|
||||||
else if (newValue.toString().length == 3) return "0"+newValue.toString()
|
else if (newValue.toString().length == 3) return "0"+newValue.toString()
|
||||||
@@ -501,13 +501,13 @@ export class ODOptionRandomNumberSuffix extends ODOptionSuffix {
|
|||||||
if (history.includes(number)) return this.#generateUniqueValue(history)
|
if (history.includes(number)) return this.#generateUniqueValue(history)
|
||||||
else return number
|
else return number
|
||||||
}
|
}
|
||||||
getSuffix(user:discord.User): string {
|
async getSuffix(user:discord.User): Promise<string> {
|
||||||
const rawCurrentValues = this.database.get("opendiscord:option-suffix-history",this.option.id.value)
|
const rawCurrentValues = await this.database.get("opendiscord:option-suffix-history",this.option.id.value)
|
||||||
const currentValues = ((Array.isArray(rawCurrentValues)) ? rawCurrentValues : []) as string[]
|
const currentValues = ((Array.isArray(rawCurrentValues)) ? rawCurrentValues : []) as string[]
|
||||||
const newValue = this.#generateUniqueValue(currentValues)
|
const newValue = this.#generateUniqueValue(currentValues)
|
||||||
currentValues.push(newValue)
|
currentValues.push(newValue)
|
||||||
if (currentValues.length > 50) currentValues.shift()
|
if (currentValues.length > 50) currentValues.shift()
|
||||||
this.database.set("opendiscord:option-suffix-history",this.option.id.value,currentValues)
|
await this.database.set("opendiscord:option-suffix-history",this.option.id.value,currentValues)
|
||||||
return newValue
|
return newValue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -539,13 +539,13 @@ export class ODOptionRandomHexSuffix extends ODOptionSuffix {
|
|||||||
if (history.includes(hex)) return this.#generateUniqueValue(history)
|
if (history.includes(hex)) return this.#generateUniqueValue(history)
|
||||||
else return hex
|
else return hex
|
||||||
}
|
}
|
||||||
getSuffix(user:discord.User): string {
|
async getSuffix(user:discord.User): Promise<string> {
|
||||||
const rawCurrentValues = this.database.get("opendiscord:option-suffix-history",this.option.id.value)
|
const rawCurrentValues = await this.database.get("opendiscord:option-suffix-history",this.option.id.value)
|
||||||
const currentValues = ((Array.isArray(rawCurrentValues)) ? rawCurrentValues : []) as string[]
|
const currentValues = ((Array.isArray(rawCurrentValues)) ? rawCurrentValues : []) as string[]
|
||||||
const newValue = this.#generateUniqueValue(currentValues)
|
const newValue = this.#generateUniqueValue(currentValues)
|
||||||
currentValues.push(newValue)
|
currentValues.push(newValue)
|
||||||
if (currentValues.length > 50) currentValues.shift()
|
if (currentValues.length > 50) currentValues.shift()
|
||||||
this.database.set("opendiscord:option-suffix-history",this.option.id.value,currentValues)
|
await this.database.set("opendiscord:option-suffix-history",this.option.id.value,currentValues)
|
||||||
return newValue
|
return newValue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -22,5 +22,8 @@ export const migrations = [
|
|||||||
new utilities.ODVersionMigration(api.ODVersion.fromString("opendiscord:version","v4.0.3"),async () => {},async () => {}),
|
new utilities.ODVersionMigration(api.ODVersion.fromString("opendiscord:version","v4.0.3"),async () => {},async () => {}),
|
||||||
|
|
||||||
//MIGRATE TO v4.0.4
|
//MIGRATE TO v4.0.4
|
||||||
new utilities.ODVersionMigration(api.ODVersion.fromString("opendiscord:version","v4.0.4"),async () => {},async () => {})
|
new utilities.ODVersionMigration(api.ODVersion.fromString("opendiscord:version","v4.0.4"),async () => {},async () => {}),
|
||||||
|
|
||||||
|
//MIGRATE TO v4.0.5
|
||||||
|
new utilities.ODVersionMigration(api.ODVersion.fromString("opendiscord:version","v4.0.5"),async () => {},async () => {})
|
||||||
]
|
]
|
||||||
@@ -456,7 +456,7 @@ export const defaultPanelsStructure = new api.ODCheckerArrayStructure("opendisco
|
|||||||
{key:"id",optional:false,priority:0,checker:new api.ODCheckerCustomStructure_UniqueId("opendiscord:panel-id","openticket","panel-ids",{regex:/^[A-Za-z0-9-éèçàêâôûî]+$/,minLength:3,maxLength:40,cliDisplayName:"Id",cliDisplayDescription:"The id of this panel. Used in the /panel command."})},
|
{key:"id",optional:false,priority:0,checker:new api.ODCheckerCustomStructure_UniqueId("opendiscord:panel-id","openticket","panel-ids",{regex:/^[A-Za-z0-9-éèçàêâôûî]+$/,minLength:3,maxLength:40,cliDisplayName:"Id",cliDisplayDescription:"The id of this panel. Used in the /panel command."})},
|
||||||
{key:"name",optional:false,priority:0,checker:new api.ODCheckerStringStructure("opendiscord:panel-name",{minLength:3,maxLength:50,cliDisplayName:"Name",cliDisplayDescription:"The name of this panel."})},
|
{key:"name",optional:false,priority:0,checker:new api.ODCheckerStringStructure("opendiscord:panel-name",{minLength:3,maxLength:50,cliDisplayName:"Name",cliDisplayDescription:"The name of this panel."})},
|
||||||
{key:"dropdown",optional:false,priority:0,checker:new api.ODCheckerBooleanStructure("opendiscord:panel-dropdown",{cliDisplayName:"Dropdown",cliDisplayDescription:"Decide whether to use buttons or a dropdown in the panel. Dropdowns only support options of the 'ticket' type!"})},
|
{key:"dropdown",optional:false,priority:0,checker:new api.ODCheckerBooleanStructure("opendiscord:panel-dropdown",{cliDisplayName:"Dropdown",cliDisplayDescription:"Decide whether to use buttons or a dropdown in the panel. Dropdowns only support options of the 'ticket' type!"})},
|
||||||
{key:"options",optional:false,priority:0,checker:new api.ODCheckerCustomStructure_UniqueIdArray("opendiscord:panel-options","openticket","option-ids","option-ids-used",{allowDoubles:false,maxLength:25,cliDisplayPropertyName:"option",cliDisplayName:"Options",cliDisplayDescription:"A list of valid option IDs to show in this panel."},{cliDisplayName:"Option ID",cliDisplayDescription:"A valid option ID from the options.json config.",cliAutocompleteFunc:async () => {
|
{key:"options",optional:false,priority:0,checker:new api.ODCheckerCustomStructure_UniqueIdArray("opendiscord:panel-options","openticket","option-ids","option-ids-used",{allowDoubles:false,minLength:1,maxLength:25,cliDisplayPropertyName:"option",cliDisplayName:"Options",cliDisplayDescription:"A list of valid option IDs to show in this panel."},{cliDisplayName:"Option ID",cliDisplayDescription:"A valid option ID from the options.json config.",cliAutocompleteFunc:async () => {
|
||||||
const uncheckedRawData = opendiscord.configs.get("opendiscord:options").data
|
const uncheckedRawData = opendiscord.configs.get("opendiscord:options").data
|
||||||
if (!Array.isArray(uncheckedRawData)) return null
|
if (!Array.isArray(uncheckedRawData)) return null
|
||||||
const idList = uncheckedRawData.filter((option) => typeof option == "object" && typeof option["id"] == "string").map((option) => option.id)
|
const idList = uncheckedRawData.filter((option) => typeof option == "object" && typeof option["id"] == "string").map((option) => option.id)
|
||||||
|
|||||||
+1
-1
@@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
INFORMATION:
|
INFORMATION:
|
||||||
============
|
============
|
||||||
Open Ticket v4.0.4 - © DJdj Development
|
Open Ticket v4.0.5 - © DJdj Development
|
||||||
|
|
||||||
support us: https://github.com/sponsors/DJj123dj
|
support us: https://github.com/sponsors/DJj123dj
|
||||||
discord: https://discord.dj-dj.be
|
discord: https://discord.dj-dj.be
|
||||||
|
|||||||
Reference in New Issue
Block a user