You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Egg:
- Updated image to use new yolks Java image.
- Removed unused `-Djavax.accessibility.assistive_technologies=" "` flag from startup command.
- Updated and added as many Startup Variables as possible for basic/common settings in the `config.txt` file.
- Updated the install script to (1.) have more verbose/clear logging, (2.) update old `config.txt` files with newer versions (while retaining the old one for posterity at `config.txt-old`), and (3.) moving the `example_playlist.txt` file to the correct directory.
`config.txt` File:
- Updated to the latest version.
`playlist.txt` File:
- Renamed to `example_playlist.txt`.
- Updated in general to match Wiki's example.
Readme:
- Added authors
- Added a better bot description.
- Improved "Configuration" section.
- Added "Updating" section.
Edit the startup variables before starting the bot, otherwise it will fail to start
53
+
___
54
+
### Bot Description & Features
55
+
From the developer's [Github](https://github.com/jagrosh/MusicBot):
56
+
> A Discord music bot that's easy to set up and run yourself!
8
57
58
+
- Easy to run
59
+
- Fast loading of songs
60
+
- No external keys needed (besides a Discord Bot token)
61
+
- Smooth playback
62
+
- Server-specific setup for the "DJ" role that can moderate the music
63
+
- Clean and beautiful menus
64
+
- Supports many sites, including YouTube, Soundcloud, and more
65
+
- Supports many online radio/streams
66
+
- Supports local files
67
+
- Playlist support (both web/youtube, and local)
68
+
___
69
+
### Configuration
70
+
- If you can, edit the Startup Variables before starting the bot, because otherwise it will fail to start.
71
+
- 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.
72
+
___
9
73
### Server Ports
10
-
There are no ports required for JMusicBot
74
+
There are no ports required for JMusicBot.
75
+
___
76
+
### Updating
77
+
Re-Installing the server via the panel will do the following:
78
+
79
+
1. Update the bot to the latest version.
80
+
2. Update the `config.txt` file to the latest version, and place the old one at `config.txt-old`.
81
+
3. Any local songs will remain and not be touched.
"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\n\r\napt update\r\napt install -y jq curl\r\n\r\nGITHUB_PACKAGE=\"jagrosh\/MusicBot\"\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\/playlist.txt\"\r\n\r\nif [ -z \"${GITHUB_USER}\" ] && [ -z \"${GITHUB_OAUTH_TOKEN}\" ] ; then\r\n echo -e \"no github user set, 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\/${GITHUB_PACKAGE}\/releases\/latest\")\r\nRELEASES=$(curl --silent \"https:\/\/api.github.com\/repos\/${GITHUB_PACKAGE}\/releases\")\r\n\r\nif [ -z \"${VERSION}\" ] || [ \"${VERSION}\" == \"latest\" ]; then\r\n DOWNLOAD_LINK=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url)\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_LINK=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .assets[].browser_download_url' | grep -i config)\r\n else\r\n echo -e \"defaulting to the latest release\"\r\n DOWNLOAD_LINK=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url)\r\n fi\r\nfi\r\n\r\n[ ! -d \/mnt\/server ] && mkdir \/mnt\/server\r\n\r\ncd \/mnt\/server\r\n\r\nif [ -f JMusicBot.jar ]; then\r\n mv -f JMusicBot.jar JMusicBot.jar-old\r\nfi\r\n\r\ncurl -Lo JMusicBot.jar ${DOWNLOAD_LINK}\r\n\r\nif [ -f config.txt ]; then\r\n echo -e \"config already exists\"\r\nelse\r\n echo -e \"config not found, downloading default config\"\r\n curl -Lo config.txt ${CONFIG_LINK}\r\nfi\r\n\r\nif [ -f playlist.txt ]; then\r\n echo -e \"playlist already exists\"\r\nelse\r\n echo -e \"playlist not found, downloading default playlist\"\r\n curl -Lo playlist.txt ${PLAYLIST_LINK}\r\nfi\r\n\r\necho \"Job's Done\"",
24
+
"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\n\r\napt update\r\napt install -y jq curl\r\n\r\nGITHUB_PACKAGE=\"jagrosh\/MusicBot\"\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\nif [ -z \"${GITHUB_USER}\" ] && [ -z \"${GITHUB_OAUTH_TOKEN}\" ] ; then\r\n echo -e \"no github user set, 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\/${GITHUB_PACKAGE}\/releases\/latest\")\r\nRELEASES=$(curl --silent \"https:\/\/api.github.com\/repos\/${GITHUB_PACKAGE}\/releases\")\r\n\r\nif [ -z \"${VERSION}\" ] || [ \"${VERSION}\" == \"latest\" ]; then\r\n DOWNLOAD_LINK=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url)\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_LINK=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .assets[].browser_download_url' | grep -i config)\r\n else\r\n echo -e \"defaulting to the latest release\"\r\n DOWNLOAD_LINK=$(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\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\ncurl -sSLo JMusicBot.jar ${DOWNLOAD_LINK}\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\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 curl -sSLo example_playlist.txt ${PLAYLIST_LINK}\r\nfi\r\n\r\necho -e \"\\nJMusicBot Successfully Installed!\"",
25
25
"container": "debian:buster-slim",
26
-
"entrypoint": "\/bin\/bash"
26
+
"entrypoint": "bash"
27
27
}
28
28
},
29
29
"variables": [
30
30
{
31
-
"name": "Discord Bot Token",
32
-
"description": "The token for your discord bot.\r\n\r\nhttps:\/\/discord.com\/developers\/applications\/",
31
+
"name": "[REQUIRED] Discord Bot Token",
32
+
"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\/",
33
33
"env_variable": "BOT_TOKEN",
34
34
"default_value": "You need to get a token",
35
35
"user_viewable": true,
36
36
"user_editable": true,
37
37
"rules": "required|string|max:64"
38
38
},
39
+
{
40
+
"name": "[REQUIRED] Bot Owner ID",
41
+
"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\/",
42
+
"env_variable": "BOT_OWNER",
43
+
"default_value": "Change This To Your Discord User ID",
44
+
"user_viewable": true,
45
+
"user_editable": true,
46
+
"rules": "required|digits:18"
47
+
},
39
48
{
40
49
"name": "Bot Prefix",
41
-
"description": "The prefix for the bot.\r\n\r\nDefault is to @mention the bot.",
50
+
"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).",
42
51
"env_variable": "BOT_PREFIX",
43
52
"default_value": "@mention",
44
53
"user_viewable": true,
45
54
"user_editable": true,
55
+
"rules": "nullable|string|max:20"
56
+
},
57
+
{
58
+
"name": "Bot Alternate Prefix",
59
+
"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.",
60
+
"env_variable": "BOT_ALT_PREFIX",
61
+
"default_value": "NONE",
62
+
"user_viewable": true,
63
+
"user_editable": true,
46
64
"rules": "required|string|max:20"
47
65
},
48
66
{
49
-
"name": "Bot Owner ID",
50
-
"description": "This is the user ID of the bot owner. It's a long numeric ID, such as 4440512350692326306",
51
-
"env_variable": "BOT_OWNER",
52
-
"default_value": "Change This To Your Discord User ID",
67
+
"name": "Bot Default Game",
68
+
"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\".",
69
+
"env_variable": "BOT_GAME",
70
+
"default_value": "DEFAULT",
71
+
"user_viewable": true,
72
+
"user_editable": true,
73
+
"rules": "nullable|string|max:20"
74
+
},
75
+
{
76
+
"name": "Bot Default Status",
77
+
"description": "[ Accepted Values: ONLINE IDLE DND INVISIBLE ] Will modify the default status of bot.",
"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!",
87
+
"env_variable": "BOT_SONG_STATUS",
88
+
"default_value": "false",
89
+
"user_viewable": true,
90
+
"user_editable": true,
91
+
"rules": "required|string|in:true,false"
92
+
},
93
+
{
94
+
"name": "Bot Show Images for \"Now Playing\"",
95
+
"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.",
96
+
"env_variable": "BOT_NPIMAGES",
97
+
"default_value": "false",
98
+
"user_viewable": true,
99
+
"user_editable": true,
100
+
"rules": "required|string|in:true,false"
101
+
},
102
+
{
103
+
"name": "Bot Stay In Channel",
104
+
"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.",
105
+
"env_variable": "BOT_STAY_IN_CHANNEL",
106
+
"default_value": "false",
107
+
"user_viewable": true,
108
+
"user_editable": true,
109
+
"rules": "required|string|in:true,false"
110
+
},
111
+
{
112
+
"name": "Bot Alone Time Until Disconnect",
113
+
"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.",
114
+
"env_variable": "BOT_ALONE_TIME",
115
+
"default_value": "0",
116
+
"user_viewable": true,
117
+
"user_editable": true,
118
+
"rules": "required|integer"
119
+
},
120
+
{
121
+
"name": "Bot Max Song Length",
122
+
"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.",
0 commit comments