From d8309a93c766c60b95b91b1d5c98b97eae5589a2 Mon Sep 17 00:00:00 2001 From: parkervcp Date: Sun, 11 Oct 2020 12:16:02 -0400 Subject: [PATCH 1/2] 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 From 2fc25588ed148ca75f5302ff69f9e92b8a08f415 Mon Sep 17 00:00:00 2001 From: parkervcp Date: Sun, 11 Oct 2020 12:20:31 -0400 Subject: [PATCH 2/2] update readmes --- README.md | 1 + bots/discord/README.md | 4 ++++ bots/discord/discordgo/README.md | 5 ++++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6a8b5177..371a0604 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,7 @@ If you are reading this it looks like you are looking to add an egg to your serv * [CorpBot](/bots/discord/corpbot/) Python * [discord.js](bots/discord/discord.js/) Node JS generic * [discord.py](bots/discord/discord.py/) Python generic +* [discordgo](bots/discord/discordgo/) golang generic * [fragbot](/bots/discord/fragbot/) Golang * [jmusicbot](/bots/discord/jmusicbot) Java * [parkertron](/bots/discord/parkertron/) Golang diff --git a/bots/discord/README.md b/bots/discord/README.md index 27212e54..e42c4d48 100644 --- a/bots/discord/README.md +++ b/bots/discord/README.md @@ -22,6 +22,10 @@ A generic discord.js egg for running discord bots. [discord.py](https://discordpy.readthedocs.io/en/latest/) A generic discord.py egg for running discord bots. +#### discordgo +[discordgo](https://github.com/bwmarrin/discordgo) +A generic go application egg. + #### FragBot [fragforce/fragbot](https://github.com/fragforce/fragbot) The bot that runs as the fragforce `@Fragbot` offering looking-for-group services for now diff --git a/bots/discord/discordgo/README.md b/bots/discord/discordgo/README.md index c9b78f1b..ef9f5fe7 100644 --- a/bots/discord/discordgo/README.md +++ b/bots/discord/discordgo/README.md @@ -3,4 +3,7 @@ This egg was designed to allow a user to pull their own go discord bot from a re 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 +Users cannot upload their own code as this is built to build the resulting bot. + +`GO_PACKAGE` is the variable for the go repo i.e. `github.com/aurieh/ddg-ng` +`EXECUTABLE` is the variable for the executable that is built i.e. `ddg-ng` \ No newline at end of file