mirror of
https://github.com/RafaelSolVargas/Vulkan.git
synced 2025-10-29 16:57:23 +00:00
25 lines
817 B
Python
25 lines
817 B
Python
from discord import ButtonStyle, Interaction
|
|
from discord.ui import Button
|
|
from Config.Emojis import VEmojis
|
|
from Handlers.PrevHandler import PrevHandler
|
|
from Music.VulkanBot import VulkanBot
|
|
|
|
|
|
class BackButton(Button):
|
|
def __init__(self, bot: VulkanBot):
|
|
super().__init__(label="Back", style=ButtonStyle.secondary, emoji=VEmojis().BACK)
|
|
self.__bot = bot
|
|
|
|
async def callback(self, interaction: Interaction) -> None:
|
|
await interaction.response.defer()
|
|
|
|
handler = PrevHandler(interaction, self.__bot)
|
|
response = await handler.run()
|
|
print(response)
|
|
print(response.success)
|
|
print(response.error)
|
|
print(response.error)
|
|
print(response.embed)
|
|
if response.embed:
|
|
await interaction.followup.send(embed=response.embed)
|