mirror of
https://github.com/RafaelSolVargas/Vulkan.git
synced 2025-10-29 16:57:23 +00:00
Subclassing Button class for each button, changing context interface for handlers
This commit is contained in:
30
UI/Views/PlayerView.py
Normal file
30
UI/Views/PlayerView.py
Normal file
@@ -0,0 +1,30 @@
|
||||
from typing import Optional
|
||||
from discord.ui import View
|
||||
from Config.Emojis import VEmojis
|
||||
from UI.Buttons.PauseButton import PauseButton
|
||||
from UI.Buttons.BackButton import BackButton
|
||||
from UI.Buttons.SkipButton import SkipButton
|
||||
from UI.Buttons.StopButton import StopButton
|
||||
from UI.Buttons.SongsButton import SongsButton
|
||||
from UI.Buttons.PlayButton import PlayButton
|
||||
from UI.Buttons.LoopAllButton import LoopAllButton
|
||||
from UI.Buttons.LoopOneButton import LoopOneButton
|
||||
from UI.Buttons.LoopOffButton import LoopOffButton
|
||||
from Music.VulkanBot import VulkanBot
|
||||
|
||||
emojis = VEmojis()
|
||||
|
||||
|
||||
class PlayerView(View):
|
||||
def __init__(self, bot: VulkanBot, timeout: float = 180):
|
||||
super().__init__(timeout=timeout)
|
||||
self.__bot = bot
|
||||
self.add_item(BackButton(self.__bot))
|
||||
self.add_item(PauseButton())
|
||||
self.add_item(PlayButton())
|
||||
self.add_item(StopButton())
|
||||
self.add_item(SkipButton())
|
||||
self.add_item(SongsButton())
|
||||
self.add_item(LoopOneButton())
|
||||
self.add_item(LoopOffButton())
|
||||
self.add_item(LoopAllButton())
|
||||
Reference in New Issue
Block a user