{"meta":{"slug":"j-music-bot","name":"J Music Bot","category":"bots","source":"pterodactyl","owner":"pterodactyl","repo":"application-eggs","branch":"main","path":"bots/discord/jmusicbot/egg-j-music-bot.json","rawUrl":"https://raw.githubusercontent.com/pterodactyl/application-eggs/main/bots/discord/jmusicbot/egg-j-music-bot.json","indexedAt":1792246788483},"egg":{"_comment":"DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PANEL","meta":{"update_url":null,"version":"PTDL_v2"},"exported_at":"2024-06-01T19:44:14+00: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}","logs":"{}","startup":"{\r\n    \"done\": \"Finished Loading\"\r\n}","stop":"^C"},"scripts":{"installation":{"container":"ghcr.io/ptero-eggs/installers:debian","entrypoint":"/bin/bash","script":"#!/bin/bash\r\n\r\napt update\r\napt install -y jq curl\r\n\r\nCONFIG_LINK=\"https://raw.githubusercontent.com/ptero-eggs/application-eggs/main/bots/discord/jmusicbot/config.txt\"\r\nPLAYLIST_LINK=\"https://raw.githubusercontent.com/ptero-eggs/application-eggs/main/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!\""}},"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"}]},"readme":"# JMusicBot\n\n___\n\n## Authors / Contributors\n\n<!-- prettier-ignore-start -->\n<!-- markdownlint-disable -->\n<table>\n    <tr>\n        <td align=\"center\">\n            <a href=\"https://github.com/jagrosh\">\n                <img src=\"https://avatars.githubusercontent.com/u/12754382\" width=\"50px;\" alt=\"\"/><br /><sub><b>John Grosh</b></sub>\n            </a>\n            <br />\n            <a href=\"https://github.com/jagrosh/MusicBot/commits?author=jagrosh\" title=\"Codes\">💻</a>\n            <a href=\"https://github.com/jagrosh/MusicBot/commits?author=jagrosh\" title=\"Original Bot Creator\">🤖</a>\n        </td>\n        <td align=\"center\">\n            <a href=\"https://github.com/parkervcp\">\n                <img src=\"https://avatars.githubusercontent.com/u/1207679\" width=\"50px;\" alt=\"\"/><br /><sub><b>parkervcp</b></sub>\n            </a>\n            <br />\n            <a href=\"https://github.com/parkervcp/eggs/commits?author=parkervcp\" title=\"Codes\">💻</a>\n            <a href=\"https://github.com/parkervcp/eggs/commits?author=parkervcp\" title=\"Original Egg Creator\">🥚</a>\n        </td>\n        <td align=\"center\">\n            <a href=\"https://github.com/Software-Noob\">\n                <img src=\"https://avatars.githubusercontent.com/u/10975908\" width=\"50px;\" alt=\"\"/><br /><sub><b>Software-Noob</b></sub>\n            </a>\n            <br />\n            <a href=\"https://github.com/parkervcp/eggs/commits?author=Software-Noob\" title=\"Codes\">💻</a>\n            <a href=\"https://github.com/parkervcp/eggs/commits?author=Software-Noob\" title=\"Contributor\">💡</a>\n        </td>\n        <td align=\"center\">\n            <a href=\"https://github.com/Proxymiity\">\n                <img src=\"https://avatars.githubusercontent.com/u/25194496\" width=\"50px;\" alt=\"\"/><br /><sub><b>Proxymiity</b></sub>\n            </a>\n            <br />\n            <a href=\"https://github.com/parkervcp/eggs/commits?author=Proxymiity\" title=\"Codes\">💻</a>\n            <a href=\"https://github.com/parkervcp/eggs/commits?author=Proxymiity\" title=\"Contributor\">💡</a>\n        </td>\n        <td align=\"center\">\n            <a href=\"https://github.com/lilkingjr1\">\n                <img src=\"https://avatars.githubusercontent.com/u/4533989\" width=\"50px;\" alt=\"\"/><br /><sub><b>Red-Thirten</b></sub>\n            </a>\n            <br />\n            <a href=\"https://github.com/parkervcp/eggs/commits?author=lilkingjr1\" title=\"Codes\">💻</a>\n            <a href=\"https://github.com/parkervcp/eggs/commits?author=iamkubi\" title=\"Contributor\">💡</a>\n        </td>\n    </tr>\n</table>\n<!-- markdownlint-enable -->\n<!-- prettier-ignore-end -->\n\n___\n\n## Bot Description & Features\n\nFrom the developer's [Github](https://github.com/jagrosh/MusicBot):\n> A Discord music bot that's easy to set up and run yourself!\n\n- Easy to run\n- Fast loading of songs\n- No external keys needed (besides a Discord Bot token)\n- Smooth playback\n- Server-specific setup for the \"DJ\" role that can moderate the music\n- Clean and beautiful menus\n- Supports many sites, including YouTube, Soundcloud, and more\n- Supports many online radio/streams\n- Supports local files\n- Playlist support (both web/youtube, and local)\n\n___\n\n## Configuration\n\n- If you can, edit the Startup Variables before starting the bot, because otherwise it will fail to start.\n- Most settings found in `config.txt` can be edited via the Startup Variables. Advanced settings not listed can still be edited manually via the File Manager. Available Startup Variables will take precedent over manual edits.\n\n___\n\n## Server Ports\n\nThere are no ports required for JMusicBot.\n___\n\n## Updating\n\nRe-Installing the server via the panel will do the following:\n\n1. Update the bot to the latest version.\n2. Update the `config.txt` file to the latest version, and place the old one at `config.txt-old`.\n3. Any local songs will remain and not be touched.\n"}