add discord go
Adds a generic discordgo egg. builds and moves the resulting executable to the server folder. resolves #694
This commit is contained in:
		
							
								
								
									
										6
									
								
								bots/discord/discordgo/README.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								bots/discord/discordgo/README.md
									
									
									
									
									
										Normal file
									
								
							| @@ -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. | ||||||
							
								
								
									
										45
									
								
								bots/discord/discordgo/egg-discordgo-generic.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										45
									
								
								bots/discord/discordgo/egg-discordgo-generic.json
									
									
									
									
									
										Normal file
									
								
							| @@ -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" | ||||||
|  |         } | ||||||
|  |     ] | ||||||
|  | } | ||||||
		Reference in New Issue
	
	Block a user