mirror of
https://github.com/RafaelSolVargas/Vulkan.git
synced 2025-10-29 16:57:23 +00:00
Finishing PrevController
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
from discord.ext.commands import Context
|
||||
from discord import Client
|
||||
from Controllers.AbstractController import AbstractController
|
||||
from Exceptions.Exceptions import ImpossibleMove, UnknownError
|
||||
from Exceptions.Exceptions import BadCommandUsage, ImpossibleMove, UnknownError
|
||||
from Controllers.ControllerResponse import ControllerResponse
|
||||
|
||||
|
||||
@@ -27,6 +27,11 @@ class PrevController(AbstractController):
|
||||
embed = self.embeds.UNKNOWN_ERROR()
|
||||
return ControllerResponse(self.ctx, embed, error)
|
||||
|
||||
if self.player.playlist.looping_all or self.player.playlist.looping_one:
|
||||
error = BadCommandUsage()
|
||||
embed = self.embeds.FAIL_DUE_TO_LOOP_ON()
|
||||
return ControllerResponse(self.ctx, embed, error)
|
||||
|
||||
await self.player.play_prev(self.ctx)
|
||||
|
||||
def __user_connected(self) -> bool:
|
||||
|
||||
Reference in New Issue
Block a user