"script":"#!\/bin\/bash\r\n## this is a simple script to use the github API for release versions.\r\n## this requires the egg has a variable for GITHUB_PACKAGE and VERSION\r\n## this supports using oauth\/personal access tokens via GITHUB_USER and GITHUB_OAUTH_TOKEN (both are required.)\r\n## if you are getting hit with GitHub API limit issues then you need to have the user and token set.\r\napt update\r\napt install -y jq curl\r\n\r\n\r\nCONFIG_LINK=\"https:\/\/raw.githubusercontent.com\/parkervcp\/eggs\/master\/bots\/discord\/ree6\/config.yml\"\r\nLATEST_JSON=$(curl --silent \"https:\/\/api.github.com\/repos\/Ree6-Applications\/Ree6\/releases\/latest\")\r\nRELEASES=$(curl --silent \"https:\/\/api.github.com\/repos\/Ree6-Applications\/Ree6\/releases\")\r\nMATCH=jar-with-dependencies.jar\r\n\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}\" | head -1 )\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}\" | head -1)\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 | grep -i *.jar)\r\n fi\r\nfi\r\n\r\n## Ree6 Setup\r\n[ ! -d \/mnt\/server ] && mkdir -p \/mnt\/server\r\n\r\nif [ ! -z \"${DOWNLOAD_URL}\" ]; then \r\n if curl --output \/dev\/null --silent --head --fail ${DOWNLOAD_URL}; then\r\n echo -e \"link is valid. setting download link to ${DOWNLOAD_URL}\"\r\n DOWNLOAD_LINK=${DOWNLOAD_URL}\r\n else \r\n echo -e \"link is invalid closing out\"\r\n exit 2\r\n fi\r\nfi\r\n\r\ncd \/mnt\/server\r\necho -e \"\\nInstalling\/Updating Ree6...\\n\"\r\n\r\nif [ -f Ree6.jar ]; then\r\n echo -e \"Updating Ree6.jar to latest version...\"\r\n echo -e '\\t(Old version can be found at \"Ree6.jar-old\")'\r\n mv -f Ree6.jar Ree6.jar-old\r\nfi\r\n\r\necho -e \"Running: curl -sSL -o Ree6.jar ${DOWNLOAD_LINK}\\n\"\r\ncurl -sSL -o Ree6.jar ${DOWNLOAD_LINK}\r\n\r\nif [ -f config.yml ]; then\r\n echo -e \"Updating config.yml to latest version...\"\r\n echo -e '\\t(Old version can be found at \"config.yml-old\")'\r\n mv -f config.yml config.yml-old\r\nfi\r\n\r\necho -e \"Running: curl -sSL -o config.yml ${CONFIG_LINK}\\n\"\r\ncurl -sSL -o config.yml ${CONFIG_LINK}\r\n \r\n\r\necho -e \"\\nRee6 Successfully Installed!\"",
"container":"debian:bullseye-slim",
"entrypoint":"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":"Dagpi token",
"description":"Your Dagpi.xyz API-Token, for tweet image generation!",
"env_variable":"DAGPI_TOKEN",
"default_value":"",
"user_viewable":true,
"user_editable":true,
"rules":"nullable|string|max:128",
"field_type":"text"
},
{
"name":"Sentry DSN",
"description":"Your Sentry DSN, for error reporting!",
"env_variable":"SENTRY_DSN",
"default_value":"",
"user_viewable":true,
"user_editable":true,
"rules":"nullable|string|max:128",
"field_type":"text"
},
{
"name":"Spotify Client Id",
"description":"Spotify Application Configuration, used to parse Spotify Tracks\/Playlists to YouTube search queries.",
"env_variable":"SPOTIFY_CLIENT_ID",
"default_value":"",
"user_viewable":true,
"user_editable":true,
"rules":"nullable|string|max:128",
"field_type":"text"
},
{
"name":"Spotify Client Secret",
"description":"Spotify Application Configuration, used to parse Spotify Tracks\/Playlists to YouTube search queries.",
"env_variable":"SPOTIFY_CLIENT_SECRET",
"default_value":"",
"user_viewable":true,
"user_editable":true,
"rules":"nullable|string|max:128",
"field_type":"text"
},
{
"name":"Heartbeat Url",
"description":"The URL to the Heartbeat-Server",
"env_variable":"HEARTBEAT_URL",
"default_value":"none",
"user_viewable":true,
"user_editable":true,
"rules":"string",
"field_type":"text"
},
{
"name":"Heartbeat Interval",
"description":"The interval between the heartbeats.",
"env_variable":"HEARTBEAT_INTERVAL",
"default_value":"60",
"user_viewable":true,
"user_editable":true,
"rules":"integer",
"field_type":"text"
},
{
"name":"Amari Token",
"description":"Your Amari API-Token, for Amari Level imports!",
"env_variable":"AMARI_TOKEN",
"default_value":"",
"user_viewable":true,
"user_editable":true,
"rules":"nullable|string|max:128",
"field_type":"text"
},
{
"name":"Twitch Client Id",
"description":"Twitch Application Configuration, used for the StreamTools and Twitch Notifications.",
"env_variable":"TWITCH_CLIENT_ID",
"default_value":"",
"user_viewable":true,
"user_editable":true,
"rules":"nullable|string|max:128",
"field_type":"text"
},
{
"name":"Twitch Client Secret",
"description":"Twitch Application Configuration, used for the StreamTools and Twitch Notifications.",