mirror of
https://github.com/RafaelSolVargas/Vulkan.git
synced 2025-10-29 16:57:23 +00:00
Adding Reset and Shuffle Controller and some fix
This commit is contained in:
20
Controllers/ResetController.py
Normal file
20
Controllers/ResetController.py
Normal file
@@ -0,0 +1,20 @@
|
||||
from discord.ext.commands import Context
|
||||
from discord import Client, Member
|
||||
from Controllers.AbstractController import AbstractController
|
||||
from Controllers.ControllerResponse import ControllerResponse
|
||||
from Controllers.PlayerController import PlayersController
|
||||
|
||||
|
||||
class ResetController(AbstractController):
|
||||
def __init__(self, ctx: Context, bot: Client) -> None:
|
||||
super().__init__(ctx, bot)
|
||||
self.__controller = PlayersController(self.bot)
|
||||
|
||||
async def run(self) -> ControllerResponse:
|
||||
try:
|
||||
await self.player.force_stop()
|
||||
await self.bot_member.move_to(None)
|
||||
self.__controller.reset_player(self.guild)
|
||||
return ControllerResponse(self.ctx)
|
||||
except Exception as e:
|
||||
print(f'DEVELOPER NOTE -> Reset Error: {e}')
|
||||
Reference in New Issue
Block a user