#Button interaction failed but it did work
1 messages · Page 1 of 1 (latest)
async def pause_(self, ctx):
vc = ctx.voice_client
if not vc or not vc.is_playing():
embed = discord.Embed(title="",
description=str(ctx.author.mention) + '**,
žiadny song sa neprehráva**',
color=discord.Color.blue())
return await ctx.respond(embed=embed)
elif vc.is_paused():
return
vc.pause()
await ctx.respond("**Paused** ⏸️") #here
Respond by using await interaction.response.send_message() or edit
Maybe edit the original embed with like {user} skipped the current song
In the callback
If your issue is fixed please use /close. It is is not you can continue using this thread :)
I have button on my music player which are used to pause/resume/skip song, but after i click button it does it's thing, but tells me interaction failed
how can i hide that message?
code:
button = Button(label=label, style=discord.ButtonStyle.secondary, emoji=emoji)
async def button_callback(interaction):
if emoji == '⏸️':
await self._cog.pause_(source.requester)
if emoji == '▶️':
await self._cog.resume_(source.requester)
if emoji == '⏩':
await self._cog.skip_(source.requester)
button.callback = button_callback
return button
view = View()
view.add_item(await get_button(':fast_forward:', None))
view.add_item(await get_button(':pause_button:', None))
view.add_item(await get_button(':arrow_forward:', None))```