mirror of
https://github.com/Matthww/TuneBot.git
synced 2026-09-21 22:57:48 +00:00
Removed controls
This commit is contained in:
@@ -53,11 +53,10 @@ class MusicCog(BaseCog, name="Music"):
|
||||
channel_id = int(event.player.fetch("channel"))
|
||||
channel: TextChannel = self.bot.get_channel(channel_id)
|
||||
|
||||
controls = track_embed.create_embed_controls(self.bot)
|
||||
embed = track_embed.create_track_embed(
|
||||
event.player.current, event.player.queue, []
|
||||
)
|
||||
await channel.send(embed=embed, view=controls)
|
||||
await channel.send(embed=embed)
|
||||
elif isinstance(event, lavalink.events.TrackEndEvent):
|
||||
await helper.fill_player_queue(self.bot, event.player, 1)
|
||||
|
||||
|
||||
@@ -85,9 +85,8 @@ class MusicCommands(app_commands.Group):
|
||||
await ctx.response.send_message(embed=embed)
|
||||
return
|
||||
|
||||
controls = track_embed.create_embed_controls(self.bot)
|
||||
embed = track_embed.create_track_embed(player.current, player.queue, [])
|
||||
await ctx.response.send_message(embed=embed, view=controls)
|
||||
await ctx.response.send_message(embed=embed)
|
||||
|
||||
@app_commands.command(name="queue", description="See what's ahead")
|
||||
async def queue(self, ctx: Interaction):
|
||||
|
||||
@@ -70,19 +70,3 @@ def create_track_embed(
|
||||
embed.set_image(url=f"https://i3.ytimg.com/vi/{current.identifier}/mqdefault.jpg")
|
||||
embed.set_footer(text=f"Uploaded by: {current.author}")
|
||||
return embed
|
||||
|
||||
|
||||
def create_embed_controls(bot: "TuneBot") -> "EmbedControls":
|
||||
return EmbedControls(bot)
|
||||
|
||||
|
||||
class EmbedControls(discord.ui.View):
|
||||
def __init__(self, bot: "TuneBot"):
|
||||
super().__init__()
|
||||
self.bot = bot
|
||||
|
||||
@discord.ui.button(label="Skip")
|
||||
async def skip(self, ctx: discord.Interaction, button: discord.ui.Button):
|
||||
player = helper.get_player(ctx.client, ctx.guild_id)
|
||||
await player.skip()
|
||||
await ctx.response.defer()
|
||||
|
||||
Reference in New Issue
Block a user