Skip to content

Commit

Permalink
Fixes, and rework
Browse files Browse the repository at this point in the history
Rework repeat off. Set fallback owner group to have skip looped songs perms.
  • Loading branch information
BabyBoySnow committed Dec 22, 2023
1 parent 0cf25c1 commit 29a510d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
1 change: 1 addition & 0 deletions config/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@
"cmd-repeat-song-looping": "Song is now repeating.",
"cmd-repeat-song-not-looping": "Song is no longer repeating.",
"cmd-repeat-invalid": "Invalid option, please run {}help repeat to a list of available options.",
"cmd-repeat-already-off": "The player is not currently looping.",
"cmd-move-no-voice": "The bot is not in a voice channel. Use %ssummon to summon it to your voice channel.",
"cmd-move-no-songs": "No songs are currently playing. Play something with {}play.",
"cmd-move-indexes-not-intergers": "Song indexes must be integers.",
Expand Down
20 changes: 11 additions & 9 deletions musicbot/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -2145,17 +2145,19 @@ async def cmd_repeat(self, channel, option=None):
)

elif option == "off":
player.repeatsong = False
player.loopqueue = False
if player.playlist.entries.__len__() > 0:
return Response(
self.str.get("cmd-repeat-playlist-not-looping"), delete_after=30
)
if player.repeatsong:
player.repeatsong = False
return Response(self.str.get("cmd-repeat-song-not-looping"))
elif player.loopqueue:
player.loopqueue = False
return Response(self.str.get("cmd-repeat-playlist-not-looping"))
else:
return Response(
self.str.get("cmd-repeat-song-not-looping"), delete_after=30
raise exceptions.CommandError(
self.str.get(
"cmd-repeat-already-off", "The player is not currently looping."
),
expire_in=30,
)

else:
if player.repeatsong:
player.loopqueue = True
Expand Down
2 changes: 1 addition & 1 deletion musicbot/permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class Permissive:

AllowPlaylists = True
InstaSkip = True
SkipLooped = False
SkipLooped = True
Remove = True
SkipWhenAbsent = False
BypassKaraokeMode = True
Expand Down

0 comments on commit 29a510d

Please sign in to comment.