Код: Выделить всё
@drav.slash_command(name='play', description='Plays a song', guild_ids=[server])
async def play(interaction: Interaction, song: wavelink.YouTubeTrack):
await interaction.response.defer(ephemeral=True, with_message=True)
if not interaction.guild.voice_client:
vc = wavelink.Player = await interaction.user.voice.channel.connect(cls=wavelink.Player)
elif not getattr(interaction.user.voice, "channel", None):
return await interaction.followup.send(embed=nextcord.Embed(title=':x: Join a voice channel yourself first!', color=nextcord.Colour.red()))
else:
vc: wavelink.Player = interaction.guild.voice_client
await vc.play(song)
await interaction.followup.send(Playing!)
Я пробовал использовать несколько способов, но не смог понять
Подробнее здесь: https://stackoverflow.com/questions/714 ... ng-a-tutor
Мобильная версия