mirror of
https://github.com/parkervcp/eggs.git
synced 2024-11-30 11:12:55 +08:00
5620a4ad8b
* Fix GH-2474 * Update JMusicBot images switch to Java LTS and use the official installer image
143 lines
10 KiB
JSON
143 lines
10 KiB
JSON
{
|
|
"_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO",
|
|
"meta": {
|
|
"version": "PTDL_v2",
|
|
"update_url": null
|
|
},
|
|
"exported_at": "2023-09-20T21:17:10+02:00",
|
|
"name": "JMusicBot",
|
|
"author": "parker@parkervcp.com",
|
|
"description": "A Discord music bot that's easy to set up and run yourself!",
|
|
"features": null,
|
|
"docker_images": {
|
|
"ghcr.io\/pterodactyl\/yolks:java_17": "ghcr.io\/pterodactyl\/yolks:java_17"
|
|
},
|
|
"file_denylist": [],
|
|
"startup": "java -Dnogui=true -jar JMusicBot.jar",
|
|
"config": {
|
|
"files": "{\r\n \"config.txt\": {\r\n \"parser\": \"file\",\r\n \"find\": {\r\n \"token =\": \"token = \\\"{{server.build.env.BOT_TOKEN}}\\\"\",\r\n \"owner =\": \"owner = {{server.build.env.BOT_OWNER}}\",\r\n \"prefix =\": \"prefix = \\\"{{server.build.env.BOT_PREFIX}}\\\"\",\r\n \"game =\": \"game = \\\"{{server.build.env.BOT_GAME}}\\\"\",\r\n \"status =\": \"status = {{server.build.env.BOT_STATUS}}\",\r\n \"songinstatus =\": \"songinstatus = {{server.build.env.BOT_SONG_STATUS}}\",\r\n \"altprefix =\": \"altprefix = \\\"{{server.build.env.BOT_ALT_PREFIX}}\\\"\",\r\n \"npimages =\": \"npimages = {{server.build.env.BOT_NPIMAGES}}\",\r\n \"stayinchannel =\": \"stayinchannel = {{server.build.env.BOT_STAY_IN_CHANNEL}}\",\r\n \"maxtime =\": \"maxtime = {{server.build.env.BOT_MAXTIME}}\",\r\n \"alonetimeuntilstop =\": \"alonetimeuntilstop = {{server.build.env.BOT_ALONE_TIME}}\"\r\n }\r\n }\r\n}",
|
|
"startup": "{\r\n \"done\": \"Finished Loading\"\r\n}",
|
|
"logs": "{}",
|
|
"stop": "^C"
|
|
},
|
|
"scripts": {
|
|
"installation": {
|
|
"script": "#!\/bin\/bash\r\n\r\napt update\r\napt install -y jq curl\r\n\r\nCONFIG_LINK=\"https:\/\/raw.githubusercontent.com\/parkervcp\/eggs\/master\/bots\/discord\/jmusicbot\/config.txt\"\r\nPLAYLIST_LINK=\"https:\/\/raw.githubusercontent.com\/parkervcp\/eggs\/master\/bots\/discord\/jmusicbot\/example_playlist.txt\"\r\n\r\n\r\nif [ -z \"${GITHUB_USER}\" ] && [ -z \"${GITHUB_OAUTH_TOKEN}\" ] ; then\r\n echo -e \"using anon api call\"\r\nelse\r\n echo -e \"user and oauth token set\"\r\n alias curl='curl -u ${GITHUB_USER}:${GITHUB_OAUTH_TOKEN} '\r\nfi\r\n\r\n## get release info and download links\r\nLATEST_JSON=$(curl --silent \"https:\/\/api.github.com\/repos\/jagrosh\/MusicBot\/releases\/latest\")\r\nRELEASES=$(curl --silent \"https:\/\/api.github.com\/repos\/jagrosh\/MusicBot\/releases\")\r\nMATCH=JMusicBot\r\n\r\nif [ -z \"${VERSION}\" ] || [ \"${VERSION}\" == \"latest\" ]; then\r\n DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i ${MATCH})\r\nelse\r\n VERSION_CHECK=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .tag_name')\r\n if [ \"${VERSION}\" == \"${VERSION_CHECK}\" ]; then\r\n DOWNLOAD_URL=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .assets[].browser_download_url' | grep -i ${MATCH})\r\n else\r\n echo -e \"defaulting to latest release\"\r\n DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url)\r\n fi\r\nfi\r\n\r\n## JMusicBot Setup\r\n[ ! -d \/mnt\/server ] && mkdir \/mnt\/server\r\ncd \/mnt\/server\r\necho -e \"\\nInstalling\/Updating JMusicBot...\\n\"\r\n\r\nif [ -f JMusicBot.jar ]; then\r\n echo -e \"Updating JMusicBot.jar to latest version...\"\r\n echo -e '\\t(Old version can be found at \"JMusicBot.jar-old\")'\r\n mv -f JMusicBot.jar JMusicBot.jar-old\r\nfi\r\n\r\necho -e \"Running: curl -sSLo JMusicBot.jar ${DOWNLOAD_URL}\\n\"\r\ncurl -sSLo JMusicBot.jar ${DOWNLOAD_URL}\r\n\r\nif [ -f config.txt ]; then\r\n echo -e \"Updating config.txt to latest version...\"\r\n echo -e '\\t(Old version can be found at \"config.txt-old\")'\r\n mv -f config.txt config.txt-old\r\nfi\r\necho -e \"Running: curl -sSLo config.txt ${CONFIG_LINK}\\n\"\r\ncurl -sSLo config.txt ${CONFIG_LINK}\r\n\r\n[ ! -d Playlists ] && mkdir Playlists\r\ncd Playlists\r\nif [ -f example_playlist.txt ]; then\r\n echo -e \"example_playlist.txt already exists. Skipping default download.\"\r\nelse\r\n echo -e \"example_playlist.txt not found. Downloading default example_playlist...\"\r\n echo -e \"Running: curl -sSLo example_playlist.txt ${PLAYLIST_LINK}\"\r\n curl -sSLo example_playlist.txt ${PLAYLIST_LINK}\r\nfi\r\n\r\necho -e \"\\nJMusicBot Successfully Installed!\"",
|
|
"container": "ghcr.io\/parkervcp\/installers:debian",
|
|
"entrypoint": "\/bin\/bash"
|
|
}
|
|
},
|
|
"variables": [
|
|
{
|
|
"name": "[REQUIRED] Discord Bot Token",
|
|
"description": "The token for your Discord bot. Learn how to obtain a token and configure your bot application properly here: https:\/\/jmusicbot.com\/getting-a-bot-token\/",
|
|
"env_variable": "BOT_TOKEN",
|
|
"default_value": "",
|
|
"user_viewable": true,
|
|
"user_editable": true,
|
|
"rules": "required|string",
|
|
"field_type": "text"
|
|
},
|
|
{
|
|
"name": "[REQUIRED] Bot Owner ID",
|
|
"description": "This is the Discord User ID of the bot owner. Learn how to obtain this ID here: https:\/\/jmusicbot.com\/finding-your-user-id\/",
|
|
"env_variable": "BOT_OWNER",
|
|
"default_value": "Change This To Your Discord User ID",
|
|
"user_viewable": true,
|
|
"user_editable": true,
|
|
"rules": "required|digits_between:17,18",
|
|
"field_type": "text"
|
|
},
|
|
{
|
|
"name": "Bot Prefix",
|
|
"description": "This sets the prefix for the bot. The prefix is used to control the commands. If you use !, the play command will be !play. If you do not set this, the prefix will be a mention of the bot (@Botname play).",
|
|
"env_variable": "BOT_PREFIX",
|
|
"default_value": "@mention",
|
|
"user_viewable": true,
|
|
"user_editable": true,
|
|
"rules": "nullable|string|max:20",
|
|
"field_type": "text"
|
|
},
|
|
{
|
|
"name": "Bot Alternate Prefix",
|
|
"description": "If you set this, the bot will also use this prefix in addition to \"Bot Prefix\". Set to NONE to not have an alternate prefix.",
|
|
"env_variable": "BOT_ALT_PREFIX",
|
|
"default_value": "NONE",
|
|
"user_viewable": true,
|
|
"user_editable": true,
|
|
"rules": "required|string|max:20",
|
|
"field_type": "text"
|
|
},
|
|
{
|
|
"name": "Bot Default Game",
|
|
"description": "If you change this, it modifies the default game of the bot. Set this to NONE to have no game. Set this to DEFAULT to use the default game. You can make the game \"Playing X\", \"Listening to X\", or \"Watching X\" where X is the title. If you don't include an action, it will use the default of \"Playing\".",
|
|
"env_variable": "BOT_GAME",
|
|
"default_value": "DEFAULT",
|
|
"user_viewable": true,
|
|
"user_editable": true,
|
|
"rules": "nullable|string|max:20",
|
|
"field_type": "text"
|
|
},
|
|
{
|
|
"name": "Bot Default Status",
|
|
"description": "[ Accepted Values: ONLINE IDLE DND INVISIBLE ] Will modify the default status of bot.",
|
|
"env_variable": "BOT_STATUS",
|
|
"default_value": "ONLINE",
|
|
"user_viewable": true,
|
|
"user_editable": true,
|
|
"rules": "required|string|in:ONLINE,IDLE,DND,INVISIBLE",
|
|
"field_type": "text"
|
|
},
|
|
{
|
|
"name": "Bot Show Song in Status",
|
|
"description": "If you set this to true, the bot will list the title of the song it is currently playing in its \"Playing\" status. NOTE: This will ONLY work if the bot is playing music on ONE Discord server; if the bot is playing in multiple servers, this will not work!",
|
|
"env_variable": "BOT_SONG_STATUS",
|
|
"default_value": "false",
|
|
"user_viewable": true,
|
|
"user_editable": true,
|
|
"rules": "required|string|in:true,false",
|
|
"field_type": "text"
|
|
},
|
|
{
|
|
"name": "Bot Show Images for \"Now Playing\"",
|
|
"description": "If set to true, the \"nowplaying\" command will show YouTube thumbnails. NOTE: If you set this to true, the nowplaying boxes will NOT refresh. This is because refreshing the boxes causes the image to be reloaded every time it refreshes.",
|
|
"env_variable": "BOT_NPIMAGES",
|
|
"default_value": "false",
|
|
"user_viewable": true,
|
|
"user_editable": true,
|
|
"rules": "required|string|in:true,false",
|
|
"field_type": "text"
|
|
},
|
|
{
|
|
"name": "Bot Stay In Channel",
|
|
"description": "If set to true, the bot will not leave a voice channel after it finishes a queue. Keep in mind that being connected to a voice channel uses additional bandwidth, so this option is not recommended if bandwidth is a concern.",
|
|
"env_variable": "BOT_STAY_IN_CHANNEL",
|
|
"default_value": "false",
|
|
"user_viewable": true,
|
|
"user_editable": true,
|
|
"rules": "required|string|in:true,false",
|
|
"field_type": "text"
|
|
},
|
|
{
|
|
"name": "Bot Alone Time Until Disconnect",
|
|
"description": "This sets the amount of seconds the bot will stay alone on a voice channel until it automatically leaves the voice channel and clears the queue. If not set or set to any number less than or equal to zero, the bot won't leave when alone.",
|
|
"env_variable": "BOT_ALONE_TIME",
|
|
"default_value": "0",
|
|
"user_viewable": true,
|
|
"user_editable": true,
|
|
"rules": "required|integer",
|
|
"field_type": "text"
|
|
},
|
|
{
|
|
"name": "Bot Max Song Length",
|
|
"description": "This sets the maximum amount of seconds any track loaded can be. If not set or set to any number less than or equal to zero, there is no maximum time length. This time restriction applies to songs loaded from any source.",
|
|
"env_variable": "BOT_MAXTIME",
|
|
"default_value": "0",
|
|
"user_viewable": true,
|
|
"user_editable": true,
|
|
"rules": "required|integer",
|
|
"field_type": "text"
|
|
}
|
|
]
|
|
}
|