diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index c7cc36e..c9ac600 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -1,7 +1,7 @@ # Contributing Guidelines Open Ticket Logo -[![discord](https://img.shields.io/badge/discord-support%20server-5865F2.svg?style=flat-square&logo=discord)](https://discord.com/invite/26vT9wt3n3) [![version](https://img.shields.io/badge/version-4.2.0-brightgreen.svg?style=flat-square)](https://github.com/open-discord-bots/open-ticket/releases/tag/v4.2.0) [![Sponsor DJj123dj](https://img.shields.io/badge/sponsor-DJj123dj-ea4aaa?style=flat-square&logo=githubsponsors)](https://github.com/sponsors/DJj123dj) +[![discord](https://img.shields.io/badge/discord-support%20server-5865F2.svg?style=flat-square&logo=discord)](https://discord.com/invite/26vT9wt3n3) [![version](https://img.shields.io/badge/version-4.2.1-brightgreen.svg?style=flat-square)](https://github.com/open-discord-bots/open-ticket/releases/tag/v4.2.1) [![Sponsor DJj123dj](https://img.shields.io/badge/sponsor-DJj123dj-ea4aaa?style=flat-square&logo=githubsponsors)](https://github.com/sponsors/DJj123dj) These are the Contributing Guidelines of Open Ticket!
Here you can find everything you need to know about contributing to Open Ticket.
diff --git a/.github/SECURITY.md b/.github/SECURITY.md index a381a61..9a86bd5 100644 --- a/.github/SECURITY.md +++ b/.github/SECURITY.md @@ -20,7 +20,8 @@ This list will be updated on every release. | Version | Supported | Notes | |------------|-----------|---------------------------------------------------------------| | 4.2.x | 🟦 | In Development | -| 4.2.1 | 🟦 | In Development | +| 4.2.2 | 🟦 | In Development | +| 4.2.1 | ✅ | | | 4.2.0 | ✅ | | | 4.1.3 | ✅ | (LTS) Long-Term-Support, Until September 2026 | | 4.1.2 | 🚧 | | diff --git a/.github/pterodactyl-eggs/README.md b/.github/pterodactyl-eggs/README.md index c22f4a4..207ebf0 100644 --- a/.github/pterodactyl-eggs/README.md +++ b/.github/pterodactyl-eggs/README.md @@ -2,7 +2,7 @@ Open Ticket Logo [![discord](https://img.shields.io/badge/discord-support%20server-5865F2.svg?style=flat-square&logo=discord)](https://discord.com/invite/26vT9wt3n3) -[![version](https://img.shields.io/badge/version-4.2.0-brightgreen.svg?style=flat-square)](https://github.com/open-discord-bots/open-ticket/releases/tag/v4.2.0) +[![version](https://img.shields.io/badge/version-4.2.1-brightgreen.svg?style=flat-square)](https://github.com/open-discord-bots/open-ticket/releases/tag/v4.2.1) [![Sponsor DJj123dj](https://img.shields.io/badge/sponsor-DJj123dj-ea4aaa?style=flat-square&logo=githubsponsors)](https://github.com/sponsors/DJj123dj) [![Open Ticket supports Pterodactyl Eggs!](https://img.shields.io/badge/pterodactyl-supported-10539F?style=flat-square&logo=pterodactyl)](.eggs/README.md) diff --git a/.github/pterodactyl-eggs/openticket-egg-v3.5.9.json b/.github/pterodactyl-eggs/openticket-egg-v3.5.9.json deleted file mode 100644 index 3249d68..0000000 --- a/.github/pterodactyl-eggs/openticket-egg-v3.5.9.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "_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:19+01:00", - "name": "Open Ticket (v3.5.9)", - "author": "support@dj-dj.be", - "description": "This is the official Pterodactyl egg for Open Ticket v3.5.9, 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 (v3.5.9)\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=\"v3.5.9\"\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" - } - ] -} \ No newline at end of file diff --git a/.github/pterodactyl-eggs/openticket-egg-v4.0.7.json b/.github/pterodactyl-eggs/openticket-egg-v4.0.7.json deleted file mode 100644 index 8e8510b..0000000 --- a/.github/pterodactyl-eggs/openticket-egg-v4.0.7.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "_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.7)", - "author": "support@dj-dj.be", - "description": "This is the official Pterodactyl egg for Open Ticket v4.0.7, 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.7)\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.7\"\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" - } - ] -} \ No newline at end of file diff --git a/.github/pterodactyl-eggs/openticket-egg-v4.1.0.json b/.github/pterodactyl-eggs/openticket-egg-v4.1.0.json deleted file mode 100644 index bb91ba9..0000000 --- a/.github/pterodactyl-eggs/openticket-egg-v4.1.0.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "_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.1.0)", - "author": "support@dj-dj.be", - "description": "This is the official Pterodactyl egg for Open Ticket v4.1.0, 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.1.0)\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.1.0\"\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" - } - ] -} \ No newline at end of file diff --git a/.github/pterodactyl-eggs/openticket-egg-v4.1.1.json b/.github/pterodactyl-eggs/openticket-egg-v4.1.1.json deleted file mode 100644 index 671a531..0000000 --- a/.github/pterodactyl-eggs/openticket-egg-v4.1.1.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "_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.1.1)", - "author": "support@dj-dj.be", - "description": "This is the official Pterodactyl egg for Open Ticket v4.1.1, 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.1.1)\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.1.1\"\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" - } - ] -} \ No newline at end of file diff --git a/.github/pterodactyl-eggs/openticket-egg-v4.1.2.json b/.github/pterodactyl-eggs/openticket-egg-v4.2.1.json similarity index 95% rename from .github/pterodactyl-eggs/openticket-egg-v4.1.2.json rename to .github/pterodactyl-eggs/openticket-egg-v4.2.1.json index 45d81a3..405c9f1 100644 --- a/.github/pterodactyl-eggs/openticket-egg-v4.1.2.json +++ b/.github/pterodactyl-eggs/openticket-egg-v4.2.1.json @@ -5,9 +5,9 @@ "update_url": null }, "exported_at": "2025-03-16T18:10:18+01:00", - "name": "Open Ticket (v4.1.2)", + "name": "Open Ticket (v4.2.1)", "author": "support@dj-dj.be", - "description": "This is the official Pterodactyl egg for Open Ticket v4.1.2, 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!", + "description": "This is the official Pterodactyl egg for Open Ticket v4.2.1, 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" @@ -22,7 +22,7 @@ }, "scripts": { "installation": { - "script": "#!\/bin\/bash\r\n# Open Ticket Installation Script (v4.1.2)\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.1.2\"\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", + "script": "#!\/bin\/bash\r\n# Open Ticket Installation Script (v4.2.1)\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.2.1\"\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" } diff --git a/README.md b/README.md index 99a9c72..2ca53d3 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Related Projects:
Open Discord

Discord Invite Link -Open Ticket Version +Open Ticket Version Open Ticket Documentation Open Ticket License Open Ticket Stars diff --git a/config/general.jsonc b/config/general.jsonc index a5830b9..556e083 100644 --- a/config/general.jsonc +++ b/config/general.jsonc @@ -18,7 +18,7 @@ * Good luck! DJj123dj & contributors */ { - "_CONFIG_VERSION":"open-ticket-v4.2.0", + "_CONFIG_VERSION":"open-ticket-v4.2.1", /* Load the bot token from .env or the "token" field below. Leave "token" empty if using "tokenFromENV". */ "token":"INSERT_BOT_TOKEN", diff --git a/config/panels.jsonc b/config/panels.jsonc index cf5bca8..b2130e9 100644 --- a/config/panels.jsonc +++ b/config/panels.jsonc @@ -31,7 +31,7 @@ "image":"", //Image URL. Leave empty to disable "thumbnail":"", //Image URL. Leave empty to disable - "footer":"Open Ticket v4.2.0", //Leave empty to disable + "footer":"Open Ticket v4.2.1", //Leave empty to disable /* Embed fields. Set to empty list [] to disable. */ "fields":[ {"name":"Field name","value":"Field value","inline":false} diff --git a/index.js b/index.js index 2935154..4ed4fba 100644 --- a/index.js +++ b/index.js @@ -13,7 +13,7 @@ const flags = [ ██║ ██║██╔═══╝ ██╔══╝ ██║╚██╗██║ ██║ ██║██║ ██╔═██╗ ██╔══╝ ██║ ╚██████╔╝██║ ███████╗██║ ╚████║ ██║ ██║╚██████╗██║ ██╗███████╗ ██║ ╚═════╝ ╚═╝ ╚══════╝╚═╝ ╚═══╝ ╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚══════╝ ╚═╝ - v4.2.0 - Made by DJj123dj & Contributors + v4.2.1 - Made by DJj123dj & Contributors Discord: https://discord.dj-dj.be Docs: https://otdocs.dj-dj.be diff --git a/languages/arabic.json b/languages/arabic.json index 7d3d220..37d5e74 100644 --- a/languages/arabic.json +++ b/languages/arabic.json @@ -1,6 +1,6 @@ { "_TRANSLATION":{ - "otversion":"v4.2.0", + "otversion":"v4.2.1", "translators":["palestinian"], "lastedited":"25/05/2026", "language":"Arabic", diff --git a/languages/bengali.json b/languages/bengali.json index 80fd4e4..4419a94 100644 --- a/languages/bengali.json +++ b/languages/bengali.json @@ -1,6 +1,6 @@ { "_TRANSLATION":{ - "otversion":"v4.2.0", + "otversion":"v4.2.1", "translators":["HanumeshGupta"], "lastedited":"25/05/2026", "language":"Bengali", diff --git a/languages/catalan.json b/languages/catalan.json index b2f5bf3..5089918 100644 --- a/languages/catalan.json +++ b/languages/catalan.json @@ -1,6 +1,6 @@ { "_TRANSLATION":{ - "otversion":"v4.2.0", + "otversion":"v4.2.1", "translators":["guillee3"], "lastedited":"25/05/2026", "language":"Catalan", diff --git a/languages/custom.json b/languages/custom.json index 022ef77..0eeb62e 100644 --- a/languages/custom.json +++ b/languages/custom.json @@ -1,6 +1,6 @@ { "_TRANSLATION":{ - "otversion":"v4.2.0", + "otversion":"v4.2.1", "translators":["DJj123dj"], "lastedited":"25/05/2026", "language":"Custom", diff --git a/languages/czech.json b/languages/czech.json index 45ac89b..647aa11 100644 --- a/languages/czech.json +++ b/languages/czech.json @@ -1,6 +1,6 @@ { "_TRANSLATION":{ - "otversion":"v4.2.0", + "otversion":"v4.2.1", "translators":["spyeye_"], "lastedited":"25/05/2026", "language":"Czech", diff --git a/languages/danish.json b/languages/danish.json index 5f9d180..f1a65c4 100644 --- a/languages/danish.json +++ b/languages/danish.json @@ -1,6 +1,6 @@ { "_TRANSLATION":{ - "otversion":"v4.2.0", + "otversion":"v4.2.1", "translators":["the_gamer"], "lastedited":"25/05/2026", "language":"Danish", diff --git a/languages/dutch.json b/languages/dutch.json index 3824d14..9486276 100644 --- a/languages/dutch.json +++ b/languages/dutch.json @@ -1,6 +1,6 @@ { "_TRANSLATION":{ - "otversion":"v4.2.0", + "otversion":"v4.2.1", "translators":["DJj123dj"], "lastedited":"25/05/2026", "language":"Dutch", diff --git a/languages/english.json b/languages/english.json index 8e73d7c..fe927c1 100644 --- a/languages/english.json +++ b/languages/english.json @@ -1,6 +1,6 @@ { "_TRANSLATION":{ - "otversion":"v4.2.0", + "otversion":"v4.2.1", "translators":["DJj123dj"], "lastedited":"25/05/2026", "language":"English", diff --git a/languages/estonian.json b/languages/estonian.json index 2196086..e546c50 100644 --- a/languages/estonian.json +++ b/languages/estonian.json @@ -1,6 +1,6 @@ { "_TRANSLATION":{ - "otversion":"v4.2.0", + "otversion":"v4.2.1", "translators":["iamnotmega","ChatGPT"], "lastedited":"25/05/2026", "language":"Estonian", diff --git a/languages/finnish.json b/languages/finnish.json index 4dc1692..3aa780a 100644 --- a/languages/finnish.json +++ b/languages/finnish.json @@ -1,6 +1,6 @@ { "_TRANSLATION":{ - "otversion":"v4.2.0", + "otversion":"v4.2.1", "translators":["iamnotmega","ChatGPT"], "lastedited":"25/05/2026", "language":"Finnish", diff --git a/languages/french.json b/languages/french.json index 3a7a49c..e7ae70f 100644 --- a/languages/french.json +++ b/languages/french.json @@ -1,6 +1,6 @@ { "_TRANSLATION":{ - "otversion":"v4.2.0", + "otversion":"v4.2.1", "translators":["guillee3"], "lastedited":"25/05/2026", "language":"French", diff --git a/languages/german.json b/languages/german.json index 65ee436..8b2d23a 100644 --- a/languages/german.json +++ b/languages/german.json @@ -1,6 +1,6 @@ { "_TRANSLATION":{ - "otversion":"v4.2.0", + "otversion":"v4.2.1", "translators":["benzorich"], "lastedited":"25/05/2026", "language":"German", diff --git a/languages/greek.json b/languages/greek.json index d71c53a..76ee8f3 100644 --- a/languages/greek.json +++ b/languages/greek.json @@ -1,6 +1,6 @@ { "_TRANSLATION":{ - "otversion":"v4.2.0", + "otversion":"v4.2.1", "translators":["HanumeshGupta","ChatGPT"], "lastedited":"25/05/2026", "language":"Greek", diff --git a/languages/hindi.json b/languages/hindi.json index 9a4bc31..cb7b771 100644 --- a/languages/hindi.json +++ b/languages/hindi.json @@ -1,6 +1,6 @@ { "_TRANSLATION":{ - "otversion":"v4.2.0", + "otversion":"v4.2.1", "translators":["challenger_nova"], "lastedited":"25/05/2026", "language":"Hindi", diff --git a/languages/hungarian.json b/languages/hungarian.json index 20ce2dc..497d1e5 100644 --- a/languages/hungarian.json +++ b/languages/hungarian.json @@ -1,6 +1,6 @@ { "_TRANSLATION":{ - "otversion":"v4.2.0", + "otversion":"v4.2.1", "translators":["Kornel0706"], "lastedited":"25/05/2026", "language":"Hungarian", diff --git a/languages/indonesian.json b/languages/indonesian.json index 7765f92..e4e05f6 100644 --- a/languages/indonesian.json +++ b/languages/indonesian.json @@ -1,6 +1,6 @@ { "_TRANSLATION":{ - "otversion":"v4.2.0", + "otversion":"v4.2.1", "translators":["erxg"], "lastedited":"25/05/2026", "language":"Indonesian", diff --git a/languages/italian.json b/languages/italian.json index 09a15c3..3ec34e1 100644 --- a/languages/italian.json +++ b/languages/italian.json @@ -1,6 +1,6 @@ { "_TRANSLATION":{ - "otversion":"v4.2.0", + "otversion":"v4.2.1", "translators":["fraden1mvp.","imperatorix_17"], "lastedited":"25/05/2026", "language":"Italian", diff --git a/languages/japanese.json b/languages/japanese.json index 0367a36..d786866 100644 --- a/languages/japanese.json +++ b/languages/japanese.json @@ -1,6 +1,6 @@ { "_TRANSLATION":{ - "otversion":"v4.2.0", + "otversion":"v4.2.1", "translators":["HanumeshGupta","ChatGPT"], "lastedited":"25/05/2026", "language":"Japanese", diff --git a/languages/khmer.json b/languages/khmer.json index c547dbd..a5f0b0d 100644 --- a/languages/khmer.json +++ b/languages/khmer.json @@ -1,6 +1,6 @@ { "_TRANSLATION":{ - "otversion":"v4.2.0", + "otversion":"v4.2.1", "translators":["yuuslokrobjakkroval"], "lastedited":"25/05/2026", "language":"Khmer", diff --git a/languages/korean.json b/languages/korean.json index 6293826..d255de8 100644 --- a/languages/korean.json +++ b/languages/korean.json @@ -1,6 +1,6 @@ { "_TRANSLATION":{ - "otversion":"v4.2.0", + "otversion":"v4.2.1", "translators":["HanumeshGupta","ChatGPT"], "lastedited":"25/05/2026", "language":"Korean", diff --git a/languages/kurdish.json b/languages/kurdish.json index 6581302..61c5a61 100644 --- a/languages/kurdish.json +++ b/languages/kurdish.json @@ -1,6 +1,6 @@ { "_TRANSLATION":{ - "otversion":"v4.2.0", + "otversion":"v4.2.1", "translators":["HanumeshGupta","ChatGPT"], "lastedited":"25/05/2026", "language":"Kurdish", diff --git a/languages/latvian.json b/languages/latvian.json index d60618a..c22a44a 100644 --- a/languages/latvian.json +++ b/languages/latvian.json @@ -1,6 +1,6 @@ { "_TRANSLATION":{ - "otversion":"v4.2.0", + "otversion":"v4.2.1", "translators":["NoOneNook"], "lastedited":"25/05/2026", "language":"Latvian", diff --git a/languages/lithuanian.json b/languages/lithuanian.json index 1d487d6..dedfb38 100644 --- a/languages/lithuanian.json +++ b/languages/lithuanian.json @@ -1,6 +1,6 @@ { "_TRANSLATION":{ - "otversion":"v4.2.0", + "otversion":"v4.2.1", "translators":["TsgIndrius"], "lastedited":"25/05/2026", "language":"Lithuanian", diff --git a/languages/norwegian.json b/languages/norwegian.json index 22cd4cd..db8f3d6 100644 --- a/languages/norwegian.json +++ b/languages/norwegian.json @@ -1,6 +1,6 @@ { "_TRANSLATION":{ - "otversion":"v4.2.0", + "otversion":"v4.2.1", "translators":["NoOneNook"], "lastedited":"25/05/2026", "language":"Norwegian", diff --git a/languages/persian.json b/languages/persian.json index 638154a..fb624e0 100644 --- a/languages/persian.json +++ b/languages/persian.json @@ -1,6 +1,6 @@ { "_TRANSLATION":{ - "otversion":"v4.2.0", + "otversion":"v4.2.1", "translators":["dysashop","zhavis"], "lastedited":"25/05/2026", "language":"Persian", diff --git a/languages/polish.json b/languages/polish.json index 3194630..8c407e5 100644 --- a/languages/polish.json +++ b/languages/polish.json @@ -1,6 +1,6 @@ { "_TRANSLATION":{ - "otversion":"v4.2.0", + "otversion":"v4.2.1", "translators":["DanoGlez"], "lastedited":"25/05/2026", "language":"Polish", diff --git a/languages/portuguese.json b/languages/portuguese.json index a8c44c1..902cd9b 100644 --- a/languages/portuguese.json +++ b/languages/portuguese.json @@ -1,6 +1,6 @@ { "_TRANSLATION":{ - "otversion":"v4.2.0", + "otversion":"v4.2.1", "translators":["quiradon"], "lastedited":"25/05/2026", "language":"Portuguese", diff --git a/languages/romanian.json b/languages/romanian.json index 890b268..08dbc9e 100644 --- a/languages/romanian.json +++ b/languages/romanian.json @@ -1,6 +1,6 @@ { "_TRANSLATION":{ - "otversion":"v4.2.0", + "otversion":"v4.2.1", "translators":["SankeDev"], "lastedited":"25/05/2026", "language":"Romanian", diff --git a/languages/russian.json b/languages/russian.json index 988ecb8..4ea3f0c 100644 --- a/languages/russian.json +++ b/languages/russian.json @@ -1,6 +1,6 @@ { "_TRANSLATION":{ - "otversion":"v4.2.0", + "otversion":"v4.2.1", "translators":["NoOneNook"], "lastedited":"25/05/2026", "language":"Russian", diff --git a/languages/simplified-chinese.json b/languages/simplified-chinese.json index 3f64ccd..050552c 100644 --- a/languages/simplified-chinese.json +++ b/languages/simplified-chinese.json @@ -1,6 +1,6 @@ { "_TRANSLATION":{ - "otversion":"v4.2.0", + "otversion":"v4.2.1", "translators":["HanumeshGupta","ChatGPT"], "lastedited":"25/05/2026", "language":"Simplified Chainese", diff --git a/languages/slovenian.json b/languages/slovenian.json index bcf03d8..fe7eb44 100644 --- a/languages/slovenian.json +++ b/languages/slovenian.json @@ -1,6 +1,6 @@ { "_TRANSLATION":{ - "otversion":"v4.2.0", + "otversion":"v4.2.1", "translators":["HanumeshGupta","ChatGPT"], "lastedited":"25/05/2026", "language":"Solvenian", diff --git a/languages/spanish.json b/languages/spanish.json index ad905b7..6e72863 100644 --- a/languages/spanish.json +++ b/languages/spanish.json @@ -1,6 +1,6 @@ { "_TRANSLATION":{ - "otversion":"v4.2.0", + "otversion":"v4.2.1", "translators":["Redactado","Josuens"], "lastedited":"25/05/2026", "language":"Spanish", diff --git a/languages/swedish.json b/languages/swedish.json index 4a11ce6..b2529ef 100644 --- a/languages/swedish.json +++ b/languages/swedish.json @@ -1,6 +1,6 @@ { "_TRANSLATION":{ - "otversion":"v4.2.0", + "otversion":"v4.2.1", "translators":["NoOneNook"], "lastedited":"25/05/2026", "language":"Svenska", diff --git a/languages/tamil.json b/languages/tamil.json index 1a9b1f4..b5675c0 100644 --- a/languages/tamil.json +++ b/languages/tamil.json @@ -1,6 +1,6 @@ { "_TRANSLATION":{ - "otversion":"v4.2.0", + "otversion":"v4.2.1", "translators":["HanumeshGupta","ChatGPT"], "lastedited":"25/05/2026", "language":"Tamil", diff --git a/languages/thai.json b/languages/thai.json index 0210fdc..b054333 100644 --- a/languages/thai.json +++ b/languages/thai.json @@ -1,6 +1,6 @@ { "_TRANSLATION":{ - "otversion":"v4.2.0", + "otversion":"v4.2.1", "translators":["modshd"], "lastedited":"25/05/2026", "language":"Thai", diff --git a/languages/traditional-chinese.json b/languages/traditional-chinese.json index 2292b2e..97df594 100644 --- a/languages/traditional-chinese.json +++ b/languages/traditional-chinese.json @@ -1,6 +1,6 @@ { "_TRANSLATION":{ - "otversion":"v4.2.0", + "otversion":"v4.2.1", "translators":["me.october"], "lastedited":"25/05/2026", "language":"Traditional Chinese", diff --git a/languages/turkish.json b/languages/turkish.json index 1e8dc15..482941b 100644 --- a/languages/turkish.json +++ b/languages/turkish.json @@ -1,6 +1,6 @@ { "_TRANSLATION":{ - "otversion":"v4.2.0", + "otversion":"v4.2.1", "translators":["palestinian"], "lastedited":"25/05/2026", "language":"Turkish", diff --git a/languages/ukrainian.json b/languages/ukrainian.json index 20a502e..d920993 100644 --- a/languages/ukrainian.json +++ b/languages/ukrainian.json @@ -1,6 +1,6 @@ { "_TRANSLATION":{ - "otversion":"v4.2.0", + "otversion":"v4.2.1", "translators":["Anderskiy"], "lastedited":"25/05/2026", "language":"Ukrainian", diff --git a/languages/vietnamese.json b/languages/vietnamese.json index 29dbe26..496e3e7 100644 --- a/languages/vietnamese.json +++ b/languages/vietnamese.json @@ -1,6 +1,6 @@ { "_TRANSLATION":{ - "otversion":"v4.2.0", + "otversion":"v4.2.1", "translators":["ngocdiep2006"], "lastedited":"25/05/2026", "language":"Vietnamese", diff --git a/package.json b/package.json index f5ad4d2..dff5911 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "open-ticket", "author": "DJdj Development", - "version": "4.2.0", + "version": "4.2.1", "description": "The most advanced open-source discord ticket bot with HTML transcripts, plugins, questions, claiming, pinning & more! Using discord.js v14 & JSON database! ", "keywords": [ "ticket-bot", @@ -26,7 +26,7 @@ "license": "GPL-3.0-only", "dependencies": { "@discordjs/rest": "^2.6.1", - "@open-discord-bots/framework": "^1.0.0", + "@open-discord-bots/framework": "^2.0.2", "@types/node": "^22.5.0", "@types/terminal-kit": "^2.5.7", "ansis": "^4.2.0", diff --git a/plugins/example-plugin/index.ts b/plugins/example-plugin/index.ts index 68b5b6a..1103a09 100644 --- a/plugins/example-plugin/index.ts +++ b/plugins/example-plugin/index.ts @@ -1,14 +1,17 @@ import {api, opendiscord, utilities} from "#opendiscord" import * as discord from "discord.js" +if (opendiscord.project != "openticket") throw new api.ODPluginError("This plugin only works in Open Ticket.") -///////////////////////////////////////////// -//// This plugin is not enabled yet! //// -//// Enable it in the plugin.json file! //// -///////////////////////////////////////////// +/** ============= Warning! ============= + * + * This plugin is not yet enabled and will not run by default. + * Please enable this plugin in the "plugin.json" file! + * + * ===================================== + */ -if (opendiscord.project != "openticket") throw new api.ODPluginError("This plugin only works in Open Ticket!") -//Add Typescript autocomplete support for plugin data. (!!!OPTIONAL!!!) +//Add optional Typescript type-safety. This improves the developer experience. declare module "#opendiscord-types" { export interface ODPluginManagerIdMappings { "example-plugin":api.ODPlugin @@ -18,29 +21,48 @@ declare module "#opendiscord-types" { } } -//Let's register the example config. This way it's available for all plugins & systems. -opendiscord.events.get("onConfigLoad").listen((configManager) => { - configManager.add(new api.ODJsonConfig("example-plugin:config","config.json","./plugins/example-plugin/")) - /*===== What did we do? ===== - - "example-plugin:config" Is the ID of this config. You can use this id troughout the bot to access this config file. Even in other plugins. - - "config.json" Is the FILE of this config. It is just the filename. - - "./plugins/example-plugin/" Is the DIRECTORY of this config. By default it's "./config/", but we want to change it to point at the plugin directory. +//REGISTER CONFIG +opendiscord.events.get("onConfigLoad").listen((configs) => { + //Let's register our example config. The plugin, all systems and even other plugins can access it. + configs.add(new api.ODJsonConfig("example-plugin:config","config.json","./plugins/example-plugin/")) + /* ===== What did we do? ===== + * "example-plugin:config" --> Is the ID of this config. It will be used throughout the code to access this config file. + * "config.json" --> Is the FILENAME of this config with extension. + * "./plugins/example-plugin/" --> Is the DIRECTORY of this config. It is set to "./config/" by default, but we want to change it to our plugin directory. */ +}) - //Let's also log it to the console to let us know it worked! - const ourConfig = configManager.get("example-plugin:config") +//CONFIG READY FOR USAGE +opendiscord.events.get("afterConfigsInitiated").listen((configs) => { + //After the "afterConfigsInitiated" event is fired, configs can be read without problems. + //Almost all events happen after this one, so you don't need to worry about it. + + const ourConfig = configs.get("example-plugin:config") opendiscord.log("The example config loaded successfully!","plugin",[ - {key:"var-1",value:ourConfig.data.testVariable1.toString()}, - {key:"var-2",value:ourConfig.data.testVariable2.toString()}, - {key:"var-3",value:ourConfig.data.testVariable3.toString()} + {key:"test-property-1",value:ourConfig.data.testVariable1.toString()}, + {key:"test-property-2",value:ourConfig.data.testVariable2.toString()}, + {key:"test-property-3",value:ourConfig.data.testVariable3.toString()} ]) }) +//LISTEN FOR TICKET EVENTS opendiscord.events.get("onTicketCreate").listen((creator) => { - //This is logged before the ticket is created (after the button is pressed) + //Do something before a ticket is created (just after the button press) opendiscord.log("Ticket is getting created...","plugin") }) opendiscord.events.get("afterTicketCreated").listen((ticket,creator,channel) => { - //This is logged after the ticket is created + //Do something after a ticket is created and ready for usage opendiscord.log("Ticket ready!","plugin") +}) +opendiscord.events.get("onTicketClose").listen((ticket,closer,channel,reason) => { + //Do something when a ticket will be closed + opendiscord.log("Ticket is getting closed...","plugin") +}) + +//MODIFY BUILT-IN OPEN TICKET MESSAGES +opendiscord.events.get("afterEmbedBuildersLoaded").listen((embeds) => { + //Let's modify the close message to include a URL in the embed. + embeds.get("opendiscord:close-message").workers.add(new api.ODWorker("example-plugin:testing",0,(instance,params,origin,cancel) => { + instance.setUrl("https://example.com") + })) }) \ No newline at end of file diff --git a/src/actions/createTicket.ts b/src/actions/createTicket.ts index c8ff9ca..eaa0cf0 100644 --- a/src/actions/createTicket.ts +++ b/src/actions/createTicket.ts @@ -194,8 +194,18 @@ export async function registerActions(){ //pin ticket message (if required) if (generalConfig.data.ticketSystem.pinFirstTicketMessage && ticketMsg.pinnable) await ticketMsg.pin("Ticket Message") + //send modal file upload answers in separate message to prevent deletion after 72h + const attachments = answers + .filter((answer) => answer.type == "file-upload") + .map((answer) => answer.files).flat() + .map((file) => new discord.AttachmentBuilder(file.url,{ + name:file.name, + description:file.description ?? undefined + })) + if (attachments.length > 0) await channel.send({files:attachments}) + //manage stats - await opendiscord.statistics.get("opendiscord:ticket").setStat("opendiscord:messages-sent",ticket.id.value,1,"increase") + await opendiscord.statistics.get("opendiscord:ticket").setStat("opendiscord:messages-sent",ticket.id.value,2,"increase") await opendiscord.events.get("afterTicketMainMessageCreated").emit([ticket,ticketMsg,channel,user]) }catch(err){ diff --git a/src/core/main.ts b/src/core/main.ts index dabccc8..74038ca 100644 --- a/src/core/main.ts +++ b/src/core/main.ts @@ -60,7 +60,7 @@ export class ODOpenTicketMain extends api.ODMain { priorities: api.ODMappedPriorityManager constructor(){ - const version = api.ODVersion.fromString("opendiscord:version","v4.2.0") + const version = api.ODVersion.fromString("opendiscord:version","v4.2.1") const debugfile = new api.ODDebugFileManager("./","otdebug.txt",5000,version) const console = new api.ODConsoleManager(100,debugfile) const debug = new api.ODDebugger(console) diff --git a/src/core/mappings/component.ts b/src/core/mappings/component.ts index 1e542a3..b369584 100644 --- a/src/core/mappings/component.ts +++ b/src/core/mappings/component.ts @@ -10,8 +10,8 @@ import { ODTicket } from "../api/ticket.js" * A list of all available IDs in the default `ODSharedComponentManager` class in `opendiscord`. * It's used to generate typescript declarations for this class. */ -export interface ODSharedComponentManagerIdMappings extends api.ODComponentManagerIdConstraint { - //"opendiscord:example-component":{origin:"slash"|"text"|"other",params:{guild:discord.Guild|null,channel:discord.TextBasedChannel,user:discord.User},workers:"opendiscord:example-component"}, +export interface ODSharedComponentManagerIdMappings extends api.ODSharedComponentManagerIdConstraint { + //"opendiscord:example-component":{component:api.ODComponent,origin:"slash"|"text"|"other",params:{guild:discord.Guild|null,channel:discord.TextBasedChannel,user:discord.User},workers:"opendiscord:example-component"}, } /**## ODMessageComponentManagerIdMappings `interface` diff --git a/src/core/mappings/database.ts b/src/core/mappings/database.ts index 026a794..47f7c8c 100644 --- a/src/core/mappings/database.ts +++ b/src/core/mappings/database.ts @@ -29,8 +29,6 @@ export interface ODDatabaseManagerIdMappings extends api.ODDatabaseManagerIdCons * It's used to generate typescript declarations for this class. */ export interface ODGlobalDatabaseIdMappings extends api.ODDatabaseIdConstraint { - "opendiscord:panel-message":string, - "opendiscord:panel-update":string, "opendiscord:option-suffix-counter":number, "opendiscord:option-suffix-history":string[], "opendiscord:last-version":string diff --git a/src/core/startup/migration.ts b/src/core/startup/migration.ts index fe929d8..4d7da9b 100644 --- a/src/core/startup/migration.ts +++ b/src/core/startup/migration.ts @@ -372,7 +372,7 @@ export const migrations = [ const message = await opendiscord.client.fetchChannelMessage(channelId,messageId) const autoUpdate = typeof (await globalDatabase.get("opendiscord:panel-update",panelMessage.key)) == "string" //if message still exists - if (message) migratedPanelStates.push({channelId,messageId,panelId:panelMessage.value,autoUpdate}) + if (message) migratedPanelStates.push({channelId,messageId,panelId:panelMessage.value as string,autoUpdate}) await globalDatabase.delete("opendiscord:panel-message",panelMessage.key) await globalDatabase.delete("opendiscord:panel-update",panelMessage.key) @@ -418,4 +418,7 @@ export const migrations = [ }) } }), + + //MIGRATE TO v4.2.1 + new api.ODVersionMigration(api.ODVersion.fromString("opendiscord:version","v4.2.1"),{}), ] \ No newline at end of file diff --git a/src/index.ts b/src/index.ts index 8d5f8b0..8f25594 100644 --- a/src/index.ts +++ b/src/index.ts @@ -20,7 +20,7 @@ INFORMATION: ============ - Open Ticket v4.2.0 - © DJdj Development + Open Ticket v4.2.1 - © DJdj Development support us: https://github.com/sponsors/DJj123dj discord: https://discord.dj-dj.be