Subclassing Button class for each button, changing context interface for handlers

This commit is contained in:
Rafael Vargas
2022-07-27 17:20:57 -03:00
parent 4f11506c2b
commit ca754c6f62
36 changed files with 227 additions and 85 deletions

View File

@@ -6,10 +6,12 @@ from Handlers.HandlerResponse import HandlerResponse
from Config.Exceptions import BadCommandUsage, VulkanError, InvalidInput, NumberRequired, UnknownError
from Music.Playlist import Playlist
from Parallelism.ProcessManager import ProcessManager
from typing import Union
from discord import Interaction
class MoveHandler(AbstractHandler):
def __init__(self, ctx: Context, bot: VulkanBot) -> None:
def __init__(self, ctx: Union[Context, Interaction], bot: VulkanBot) -> None:
super().__init__(ctx, bot)
async def run(self, pos1: str, pos2: str) -> HandlerResponse: