Skip to content

Commit

Permalink
More player updates (#2390)
Browse files Browse the repository at this point in the history
* Update spotify.py with doc strings, and linted/typed code.

* Refactor Config and add constants for default file paths.
Refactor server_specific_data into its own class.
Adds bot commands `blockuser` and `blocksong`
Removes command `blacklist` replaced by `blockuser`
Adds a bunch of doc strings and linting/typing changes.

* Make sure Files section get validated as well!

* Update .gitignore

* Update downloader.py, entry.py, json.py, and 4 more files

* Update event_emitter.py

* Update bot.py

* Update config.py  comma

* Update en.json

* Add blocklists to example_options.ini 
and add basic extractors to example_permissions.ini

---------

Co-authored-by: Snow <135516526+BabyBoySnow@users.noreply.github.com>
  • Loading branch information
itsTheFae and BabyBoySnow committed Feb 14, 2024
1 parent d741aa2 commit 7dfd0be
Show file tree
Hide file tree
Showing 13 changed files with 3,289 additions and 1,750 deletions.
22 changes: 22 additions & 0 deletions config/example_options.ini
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,13 @@ LeavePlayerInactiveFor = 0
# When enabled the bot will automatically rotate between user requested songs.
RoundRobinQueue = no

# This setting allows you to quickly enable or disable use of User Blocklist.
EnableUserBlocklist = yes

# This setting allows you to quickly enable or disable the use of Song Blocklist.
EnableSongBlockList = no


[Files]
# Path to your i18n file. Do not set this if you do not know what it does.
i18nFile =
Expand All @@ -212,3 +219,18 @@ i18nFile =
# Default folder is named "audio_cache" in the current working directory.
# This directory is used for temporary storage even if SaveVideos is disabled.
AudioCachePath =

# A file path where you can add discord User ID numbers and prevent those users
# from using any bot commands.
# Leave this blank to use the default file location.
# MusicBot will create it if it does not exist.
# Default file: config/blocklist_users.txt
UserBlocklistFile =

# A file path where you can add URLs, video IDs, or other words and phrases
# to prevent users from playing track if their URL or song title contains any
# matched line from this block list file.
# Leave this blank to use the default file location.
# MusicBot will create it if it does not exist.
# Default file: config/blocklist_songs.txt
SongBlocklistFile =
6 changes: 3 additions & 3 deletions config/example_permissions.ini
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ SkipWhenAbsent = no
BypassKaraokeMode = no
SummonNoVoice = no
SkipLooped = no
Extractors = generic youtube youtube:playlist soundcloud
Extractors = generic youtube youtube:playlist youtube:tab youtube:search spotify:musicbot

; This group has full permissions.
[MusicMaster]
Expand Down Expand Up @@ -162,7 +162,7 @@ SkipWhenAbsent = no
BypassKaraokeMode = yes
SummonNoVoice = yes
SkipLooped = yes
Extractors = generic youtube youtube:playlist soundcloud
Extractors = generic youtube youtube:tab youtube:search youtube:playlist soundcloud soundcloud:set spotify:musicbot Bandcamp Bandcamp:album

; This group can only use the listed commands, can only use play/skip when in the bot's voice channel,
; can't request songs longer than 3 and a half minutes, and can only request a maximum of 8 songs at a time.
Expand All @@ -181,4 +181,4 @@ SkipWhenAbsent = yes
BypassKaraokeMode = no
SummonNoVoice = no
SkipLooped = no
Extractors = generic youtube youtube:playlist
Extractors = generic youtube youtube:playlist youtube:tab
4 changes: 2 additions & 2 deletions config/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@
"cmd-cache-clear-no-cache": "No cache found to clear.",
"cmd-queue-more": "\n... and %s more",
"cmd-queue-none": "There are no songs queued! Queue something with {}play.",
"cmd-queue-playing-author": "Currently playing: `{0}` added by `{1}` {2}\n",
"cmd-queue-playing-noauthor": "Currently playing: `{0}` {1}\n",
"cmd-queue-playing-author": "Currently playing: `{0}`\nAdded by: `{1}`\nProgress: {2}\n",
"cmd-queue-playing-noauthor": "Currently playing: `{0}`\nProgress: {1}\n",
"cmd-queue-entry-author": "{0} -- `{1}` by `{2}`",
"cmd-queue-entry-noauthor": "{0} -- `{1}`",
"cmd-clean-invalid": "Invalid parameter. Please provide a number of messages to search.",
Expand Down
Loading

0 comments on commit 7dfd0be

Please sign in to comment.