From 2e3b244230fc3d1c63207fdddeabdbc2ebbc7bae Mon Sep 17 00:00:00 2001 From: Michael Parker Date: Sat, 18 Apr 2020 15:34:09 -0400 Subject: [PATCH 1/3] add corpbot adds corp bot resolves #444 --- README.md | 1 + bots/discord/corpbot/README.md | 8 +++++ bots/discord/corpbot/egg-corp-bot.json | 45 +++++++++++++++++++++++++ bots/discord/corpbot/settings_dict.json | 4 +++ 4 files changed, 58 insertions(+) create mode 100644 bots/discord/corpbot/README.md create mode 100644 bots/discord/corpbot/egg-corp-bot.json create mode 100644 bots/discord/corpbot/settings_dict.json diff --git a/README.md b/README.md index b4ccfbee..d9b768ca 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,7 @@ If you are reading this it looks like you are looking to add an egg to your serv [Discord](/bots/discord/) * [ATL Bot](/bots/discord/atlbot/) Node JS * [Bastion](/bots/discord/bastion/) +* [CorpBot](/bots/discord/corpbot/) Python * [discord.js](bots/discord/discord.js/) Node JS generic * [fragbot](/bots/discord/fragbot/) Golang * [jmusicbot](/bots/discord/jmusicbot) Java diff --git a/bots/discord/corpbot/README.md b/bots/discord/corpbot/README.md new file mode 100644 index 00000000..2853d335 --- /dev/null +++ b/bots/discord/corpbot/README.md @@ -0,0 +1,8 @@ +# CorpBot.py +### From their [Github](https://github.com/corpnewt/CorpBot.py) +A very clumsy python bot for discord + +### Server Ports +No ports are required to run Big Brother Bot. You can assign a random port to the bot. + +#### Mods/Plugins may require ports to be added to the server. diff --git a/bots/discord/corpbot/egg-corp-bot.json b/bots/discord/corpbot/egg-corp-bot.json new file mode 100644 index 00000000..7bb94ea4 --- /dev/null +++ b/bots/discord/corpbot/egg-corp-bot.json @@ -0,0 +1,45 @@ +{ + "_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO", + "meta": { + "version": "PTDL_v1" + }, + "exported_at": "2020-04-18T15:33:17-04:00", + "name": "CorpBot", + "author": "parker@parkervcp.com", + "description": "A very clumsy python bot for discord \r\n\r\nhttps:\/\/github.com\/corpnewt\/CorpBot.py", + "image": "quay.io\/parkervcp\/pterodactyl-images:alpine_python-3", + "startup": "python Main.py", + "config": { + "files": "{\r\n \"settings_dict.json\": {\r\n \"parser\": \"json\",\r\n \"find\": {\r\n \"token\": \"{{server.build.env.TOKEN}}\",\r\n \"prefix\": \"{{server.build.env.PREFIX}}\"\r\n }\r\n }\r\n}", + "startup": "{\r\n \"done\": \"Logged in as\"\r\n}", + "logs": "{\r\n \"custom\": false,\r\n \"location\": \"logs\/latest.log\"\r\n}", + "stop": "^C" + }, + "scripts": { + "installation": { + "script": "#!\/bin\/bash\r\n# CoprBot Install Script\r\n#\r\n## create dir is it doesn't exist\r\nif [ ! -d \/mnt\/server\/ ]; then\r\n mkdir \/mnt\/server\/\r\nfi\r\n\r\n## move to directory\r\ncd \/mnt\/server\/\r\n\r\n## install deps\r\napt update\r\napt install git gcc\r\n\r\n## git clone \r\ngit clone https:\/\/github.com\/corpnewt\/CorpBot.py.git .\r\n\r\n## Modify Install.py to work properly in egg format\r\nmv Install.py Install.py.orig\r\nsed -n '\/press enter to exit\/q;p' Install.py.orig > Install.py\r\nsed -i 's\/\"-U\"\/\"-U\", \"--target\", \"\\\/mnt\\\/server\\\/\"\/g' Install.py\r\n\r\n## run Install.py script\r\npython Install.py\r\n\r\n## get config during install\r\nif [ ! -f \/mnt\/server\/settings_dict.json ]; then\r\n curl https:\/\/raw.githubusercontent.com\/parkervcp\/eggs\/master\/bots\/discord\/corpbot\/settings_dict.json\r\nfi", + "container": "python:3.8-slim", + "entrypoint": "bash" + } + }, + "variables": [ + { + "name": "Discord Bot Token", + "description": "Get your own token here - https:\/\/discordapp.com\/developers\/applications\/", + "env_variable": "TOKEN", + "default_value": "GET_YOUR_OWN", + "user_viewable": 1, + "user_editable": 1, + "rules": "required|string" + }, + { + "name": "Command Prefix", + "description": "The prefix for commands from the bot.", + "env_variable": "PREFIX", + "default_value": ".", + "user_viewable": 1, + "user_editable": 1, + "rules": "required|string" + } + ] +} \ No newline at end of file diff --git a/bots/discord/corpbot/settings_dict.json b/bots/discord/corpbot/settings_dict.json new file mode 100644 index 00000000..b876cabe --- /dev/null +++ b/bots/discord/corpbot/settings_dict.json @@ -0,0 +1,4 @@ +{ + "token": "your_token_here", + "prefix": "your_custom_prefix_here" +} \ No newline at end of file From fe7a59a5ee472f9ef75a2877cb020d25ff4669d2 Mon Sep 17 00:00:00 2001 From: Michael Parker Date: Sat, 18 Apr 2020 15:37:05 -0400 Subject: [PATCH 2/3] fix install script. --- bots/discord/corpbot/egg-corp-bot.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bots/discord/corpbot/egg-corp-bot.json b/bots/discord/corpbot/egg-corp-bot.json index 7bb94ea4..1561ca58 100644 --- a/bots/discord/corpbot/egg-corp-bot.json +++ b/bots/discord/corpbot/egg-corp-bot.json @@ -3,11 +3,11 @@ "meta": { "version": "PTDL_v1" }, - "exported_at": "2020-04-18T15:33:17-04:00", + "exported_at": "2020-04-18T15:36:40-04:00", "name": "CorpBot", "author": "parker@parkervcp.com", "description": "A very clumsy python bot for discord \r\n\r\nhttps:\/\/github.com\/corpnewt\/CorpBot.py", - "image": "quay.io\/parkervcp\/pterodactyl-images:alpine_python-3", + "image": "quay.io\/parkervcp\/pterodactyl-images:debian_python-3.8", "startup": "python Main.py", "config": { "files": "{\r\n \"settings_dict.json\": {\r\n \"parser\": \"json\",\r\n \"find\": {\r\n \"token\": \"{{server.build.env.TOKEN}}\",\r\n \"prefix\": \"{{server.build.env.PREFIX}}\"\r\n }\r\n }\r\n}", @@ -17,7 +17,7 @@ }, "scripts": { "installation": { - "script": "#!\/bin\/bash\r\n# CoprBot Install Script\r\n#\r\n## create dir is it doesn't exist\r\nif [ ! -d \/mnt\/server\/ ]; then\r\n mkdir \/mnt\/server\/\r\nfi\r\n\r\n## move to directory\r\ncd \/mnt\/server\/\r\n\r\n## install deps\r\napt update\r\napt install git gcc\r\n\r\n## git clone \r\ngit clone https:\/\/github.com\/corpnewt\/CorpBot.py.git .\r\n\r\n## Modify Install.py to work properly in egg format\r\nmv Install.py Install.py.orig\r\nsed -n '\/press enter to exit\/q;p' Install.py.orig > Install.py\r\nsed -i 's\/\"-U\"\/\"-U\", \"--target\", \"\\\/mnt\\\/server\\\/\"\/g' Install.py\r\n\r\n## run Install.py script\r\npython Install.py\r\n\r\n## get config during install\r\nif [ ! -f \/mnt\/server\/settings_dict.json ]; then\r\n curl https:\/\/raw.githubusercontent.com\/parkervcp\/eggs\/master\/bots\/discord\/corpbot\/settings_dict.json\r\nfi", + "script": "#!\/bin\/bash\r\n# CoprBot Install Script\r\n#\r\n## create dir is it doesn't exist\r\nif [ ! -d \/mnt\/server\/ ]; then\r\n mkdir \/mnt\/server\/\r\nfi\r\n\r\n## move to directory\r\ncd \/mnt\/server\/\r\n\r\n## install deps\r\napt update\r\napt install git gcc\r\n\r\n## git clone \r\ngit clone https:\/\/github.com\/corpnewt\/CorpBot.py.git .\r\n\r\n## Modify Install.py to work properly in egg format\r\nmv Install.py Install.py.orig\r\nsed -n '\/press enter to exit\/q;p' Install.py.orig > Install.py\r\nsed -i 's\/\"-U\"\/\"-U\", \"--target\", \"\\\/mnt\\\/server\\\/\"\/g' Install.py\r\n\r\n## run Install.py script\r\npython Install.py\r\n\r\n## get config during install\r\nif [ ! -f \/mnt\/server\/settings_dict.json ]; then\r\n curl https:\/\/raw.githubusercontent.com\/parkervcp\/eggs\/master\/bots\/discord\/corpbot\/settings_dict.json -o settings_dict.json\r\nfi", "container": "python:3.8-slim", "entrypoint": "bash" } From 7e1c7325767868397e989fbfbd816a65739e857d Mon Sep 17 00:00:00 2001 From: Michael Parker Date: Sat, 25 Apr 2020 10:41:37 -0400 Subject: [PATCH 3/3] fix install script adds a missing -y I had in my copy. --- bots/discord/corpbot/egg-corp-bot.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bots/discord/corpbot/egg-corp-bot.json b/bots/discord/corpbot/egg-corp-bot.json index 1561ca58..f7e46d52 100644 --- a/bots/discord/corpbot/egg-corp-bot.json +++ b/bots/discord/corpbot/egg-corp-bot.json @@ -3,7 +3,7 @@ "meta": { "version": "PTDL_v1" }, - "exported_at": "2020-04-18T15:36:40-04:00", + "exported_at": "2020-04-25T10:31:48-04:00", "name": "CorpBot", "author": "parker@parkervcp.com", "description": "A very clumsy python bot for discord \r\n\r\nhttps:\/\/github.com\/corpnewt\/CorpBot.py", @@ -17,7 +17,7 @@ }, "scripts": { "installation": { - "script": "#!\/bin\/bash\r\n# CoprBot Install Script\r\n#\r\n## create dir is it doesn't exist\r\nif [ ! -d \/mnt\/server\/ ]; then\r\n mkdir \/mnt\/server\/\r\nfi\r\n\r\n## move to directory\r\ncd \/mnt\/server\/\r\n\r\n## install deps\r\napt update\r\napt install git gcc\r\n\r\n## git clone \r\ngit clone https:\/\/github.com\/corpnewt\/CorpBot.py.git .\r\n\r\n## Modify Install.py to work properly in egg format\r\nmv Install.py Install.py.orig\r\nsed -n '\/press enter to exit\/q;p' Install.py.orig > Install.py\r\nsed -i 's\/\"-U\"\/\"-U\", \"--target\", \"\\\/mnt\\\/server\\\/\"\/g' Install.py\r\n\r\n## run Install.py script\r\npython Install.py\r\n\r\n## get config during install\r\nif [ ! -f \/mnt\/server\/settings_dict.json ]; then\r\n curl https:\/\/raw.githubusercontent.com\/parkervcp\/eggs\/master\/bots\/discord\/corpbot\/settings_dict.json -o settings_dict.json\r\nfi", + "script": "#!\/bin\/bash\r\n# CoprBot Install Script\r\n#\r\n## create dir is it doesn't exist\r\nif [ ! -d \/mnt\/server\/ ]; then\r\n mkdir \/mnt\/server\/\r\nfi\r\n\r\n## move to directory\r\ncd \/mnt\/server\/\r\n\r\n## install deps\r\napt update\r\napt install -y git gcc curl\r\n\r\n## git clone \r\ngit clone https:\/\/github.com\/corpnewt\/CorpBot.py.git .\r\n\r\n## Modify Install.py to work properly in egg format\r\nmv Install.py Install.py.orig\r\nsed -n '\/press enter to exit\/q;p' Install.py.orig > Install.py\r\nsed -i 's\/\"-U\"\/\"-U\", \"--target\", \"\\\/mnt\\\/server\\\/\"\/g' Install.py\r\n\r\n## run Install.py script\r\npython Install.py\r\n\r\n## get config during install\r\nif [ ! -f \/mnt\/server\/settings_dict.json ]; then\r\n curl https:\/\/raw.githubusercontent.com\/parkervcp\/eggs\/master\/bots\/discord\/corpbot\/settings_dict.json -o settings_dict.json\r\nfi", "container": "python:3.8-slim", "entrypoint": "bash" }