Skip to content

Commit

Permalink
Merge branch 'dev' into pr/2431
Browse files Browse the repository at this point in the history
  • Loading branch information
BabyBoySnow committed Oct 16, 2024
2 parents 4b76c9c + 86de796 commit 91e39e5
Show file tree
Hide file tree
Showing 28 changed files with 2,748 additions and 617 deletions.
23 changes: 22 additions & 1 deletion config/example_aliases.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,29 @@
{
"--comment": [
"Aliases allow you to rename or shorten existing commands. ",
"Alias names may contain anything, except for spaces. ",
"The keys must be valid commands, and can have simple, space separated arguments. ",
"Arguments passed by the user will be appended to any command arguments set here. ",
" ",
"For example, (replace _cmd_name_ with the command of your choice): ",
"This will map _cmd_name_ to multiple aliases, alias1 & a_long_alias ",
{
"_cmd_name_": ["alias1", "a_long_alias"]
},
" ",
"To alias a command with arguments, use something like the following: ",
{
"_cmd_name_ arg1 arg2 argN": ["macro_alias"]
},
"Lets say you have the following alias: ",
{"config set MusicBot": ["setcfg"]},
"Users can use `setcfg DefaultVolume 0.40` to set default playback volume to 40%. "
],

"play": ["p"],
"skip": ["s"],
"queue": ["q"],
"latency": ["ping"],
"summon": ["join", "connect", "come"],
"disconnect": ["leave", "stop"]
}
}
44 changes: 44 additions & 0 deletions config/example_options.ini
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@ Token = bot_token
Spotify_ClientID =
Spotify_ClientSecret =

# Sets the YouTube API Client ID, used by Yt-dlp OAuth2 plugin.
# Optional, unless built-in credentials are not working.
YtdlpOAuth2ClientID =

# Sets the YouTube API Client Secret key, used by Yt-dlp OAuth2 plugin.
# Optional, unless YtdlpOAuth2ClientID is set.
YtdlpOAuth2ClientSecret =


[Permissions]
# This option determines which user has full permissions and control of the bot.
# Only one user can be the bot's owner. You can generally leave this as "auto".
Expand Down Expand Up @@ -132,6 +141,10 @@ DeleteInvoking = no
# resume from where it left off.
PersistentQueue = yes

# Enable MusicBot to download the next song in the queue while a song is playing.
# Currently this option does not apply to auto-playlist or songs added to an empty queue.
PreDownloadNextSong = yes

# Determines what messages are logged to the console. The default level is INFO, which is
# everything an average user would need. Other levels include CRITICAL, ERROR, WARNING,
# DEBUG, VOICEDEBUG, FFMPEG, NOISY, and EVERYTHING. You should only change this if you
Expand All @@ -152,6 +165,9 @@ DebugLevel = INFO
# {p0_url} = The track url for the currently playing track.
StatusMessage =

# If enabled, status message updates will count and report paused players.
StatusIncludePaused = no

# Write what the bot is currently playing to the data/<server id>/current.txt FILE.
# This can then be used with OBS and anything else that takes a dynamic input.
WriteCurrentSong = no
Expand Down Expand Up @@ -252,6 +268,34 @@ SavePlayedHistoryGuilds = no
# to play files from the local MediaFileDirectory path.
EnableLocalMedia = no

# Allow MusicBot to automatically unpause when play commands are used.
UnpausePlayerOnPlay = no

# Experimental, HTTP/HTTPS proxy settings to use with ytdlp media downloader.
# The value set here is passed to `ytdlp --proxy` and aiohttp header checking.
# Leave blank to disable.
YtdlpProxy =

# Experimental option to set a static User-Agent header in yt-dlp.
# It is not typically recommended by yt-dlp to change the UA string.
# For examples of what you might put here, check the following two links:
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent
# https://www.useragents.me/
# Leave blank to use default, dynamically generated UA strings.
YtdlpUserAgent =

# Experimental option to enable yt-dlp to use a YouTube account via OAuth2.
# When enabled, you must use the generated URL and code to authorize an account.
# The authorization token is then stored in the `data/auth.token` file.
# This option should not be used when cookies are enabled.
# Using a personal account may not be recommended.
YtdlpUseOAuth2 = no

# Optional youtube URL used at start-up for triggering OAuth2 authorization.
# This starts the OAuth2 prompt early, rather than waiting for a song request.
# Authorization must be completed before start-up will continue when this is set.
YtdlpOAuth2URL =


[Files]
# Configure automatic log file rotation at restart, and limit the number of files kept.
Expand Down
16 changes: 10 additions & 6 deletions config/example_permissions.ini
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,18 @@
; that the bot is already joined in the server. It is also expected that the user have ability to invoke summon command to
; use this option.
;
; Extractors = spotify:musicbot youtube youtube:playlist youtube:tab youtube:search
; Extractors = spotify:musicbot youtube generic soundcloud Bandcamp
; Specify yt-dlp extractor names that MusicBot will allow users to play media from.
; Each extractor name should be separated by spaces.
; If left empty, all services will be allowed. Including porn services.
; The yt-dlp project has a list of supported services here:
; Each extractor name should be separated by spaces or commas.
; If left empty, hard-coded defaults will be allowed.
; The yt-dlp project has a list of supported services / extractor names here:
; https://github.com/yt-dlp/yt-dlp/blob/master/supportedsites.md
;
; The extractor `spotify:musicbot` is provided by MusicBot, not yt-dlp.
; The extractor `spotify:musicbot` is provided by MusicBot, not by yt-dlp.
; To allow ALL services, including porn services, add "__" to the list, without quotes.
; Example to allow all:
;
; Extractors = __
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Expand Down Expand Up @@ -130,7 +134,7 @@ SkipWhenAbsent = no
BypassKaraokeMode = no
SummonNoVoice = no
SkipLooped = no
Extractors = generic youtube youtube:playlist youtube:tab youtube:search spotify:musicbot
Extractors = generic youtube spotify:musicbot Bandcamp soundcloud

; This group has full permissions.
[MusicMaster]
Expand Down
5 changes: 4 additions & 1 deletion config/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,15 @@
"cmd-save-exists": "This song is already in the autoplaylist.",
"cmd-save-invalid": "There is no valid song playing.",
"cmd-save-success": "Added <{0}> to the autoplaylist.",
"cmd-save-success-multiple": "Added {0} songs to the autoplaylist.",
"cmd-unsave-does-not-exist": "This song is not yet in the autoplaylist.",
"cmd-unsave-success": "Removed <{0}> from the autoplaylist.",
"cmd-autoplaylist-does-not-exist": "This song is not yet in the autoplaylist.",
"cmd-autoplaylist-invalid": "The supplied song link is invalid.",
"cmd-autoplaylist-option-invalid": "Invalid option \"{0}\" specified, use +, -, add, or remove",
"cmd-autoplaylist-success": "Removed <{0}> from the autoplaylist.",
"cmd-autoplaylist-add-all-empty-queue": "The queue is empty. Add some songs with `{0}play`!",
"cmd-save-all-exist": "All songs in the queue are already in the autoplaylist.",
"cmd-joinserver-response": "Click here to add me to a server: \n{}",
"cmd-play-spotify-album-process": "Processing album `{0}` (`{1}`)",
"cmd-play-spotify-album-queued": "Enqueued `{0}` with **{1}** songs.",
Expand Down Expand Up @@ -81,7 +84,7 @@
"cmd-resume-reply": "Resumed music in `{0.name}`",
"cmd-resume-none": "Player is not paused.",
"cmd-shuffle-reply": "Shuffled `{0}`'s queue.",
"cmd-clear-reply": "Cleared `{0}`'s queue",
"cmd-clear-reply": "Cleared `{0}'s` queue",
"cmd-remove-none": "There's nothing to remove!",
"cmd-remove-reply": "Removed `{0}` added by `{1}`",
"cmd-remove-missing": "Nothing found in the queue from user `%s`",
Expand Down
2 changes: 1 addition & 1 deletion install.bat
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ CD "%~dp0"

SET InstFile="%~dp0%\install.ps1"
IF exist %InstFile% (
powershell.exe -noprofile -executionpolicy bypass -file "%InstFile%"
powershell.exe -noprofile -executionpolicy bypass -file "%InstFile%" %*
) ELSE (
echo Could not locate install.ps1
echo Please ensure it is available to continue the automatic install.
Expand Down
Loading

0 comments on commit 91e39e5

Please sign in to comment.