From d8309a93c766c60b95b91b1d5c98b97eae5589a2 Mon Sep 17 00:00:00 2001 From: parkervcp Date: Sun, 11 Oct 2020 12:16:02 -0400 Subject: [PATCH] add discord go Adds a generic discordgo egg. builds and moves the resulting executable to the server folder. resolves #694 --- bots/discord/discordgo/README.md | 6 +++ .../discordgo/egg-discordgo-generic.json | 45 +++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 bots/discord/discordgo/README.md create mode 100644 bots/discord/discordgo/egg-discordgo-generic.json diff --git a/bots/discord/discordgo/README.md b/bots/discord/discordgo/README.md new file mode 100644 index 00000000..c9b78f1b --- /dev/null +++ b/bots/discord/discordgo/README.md @@ -0,0 +1,6 @@ +# discordgo generic +This egg was designed to allow a user to pull their own go discord bot from a repo. + +The startup configs and commands may need changing to actually function properly. + +Users cannot upload their own code as this is built to build the resulting bot. \ No newline at end of file diff --git a/bots/discord/discordgo/egg-discordgo-generic.json b/bots/discord/discordgo/egg-discordgo-generic.json new file mode 100644 index 00000000..45b981ef --- /dev/null +++ b/bots/discord/discordgo/egg-discordgo-generic.json @@ -0,0 +1,45 @@ +{ + "_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO", + "meta": { + "version": "PTDL_v1" + }, + "exported_at": "2020-10-11T12:12:50-04:00", + "name": "discordgo generic", + "author": "parker@parkervcp.com", + "description": "A generic golang egg.\r\n\r\nMeant to be customized before it is used.", + "image": "quay.io\/parkervcp\/pterodactyl-images:base_debian", + "startup": ".\/${EXECUTABLE}", + "config": { + "files": "{}", + "startup": "{}", + "logs": "{}", + "stop": "^C" + }, + "scripts": { + "installation": { + "script": "#!\/bin\/bash\r\n# golang generic package\r\n\r\n\r\nif [ ! -d \/mnt\/server\/ ]; then\r\n mkdir -p \/mnt\/server\/\r\nfi\r\n\r\ngo get ${GO_PACKAGE}\r\n\r\ncd src\/${GO_PACKAGE}\r\n\r\ngo get\r\n\r\ngo build\r\n\r\ncp -f ${EXECUTABLE} \/mnt\/server\/", + "container": "golang:1.15-buster", + "entrypoint": "bash" + } + }, + "variables": [ + { + "name": "Go Package", + "description": "Go package to get and build", + "env_variable": "GO_PACKAGE", + "default_value": "", + "user_viewable": 1, + "user_editable": 1, + "rules": "required|string" + }, + { + "name": "Executable", + "description": "This is the executable from the bot build.", + "env_variable": "EXECUTABLE", + "default_value": "", + "user_viewable": 1, + "user_editable": 0, + "rules": "required|string" + } + ] +} \ No newline at end of file