ошибка discord.ext.commands.errors.CommandNotFound: Command "play" is not found

Есть код для бота с функцией "прослушивание музыки" но несколько раз пытался настроить код и появляется все таже ошибка"команда не найдена" может быть кто то поможет.. буду благодарен!

@client.command()
    async def play(ctx, url : str):
        song_there = os.path.isfile('song.mp3')

        try:
            if song_there:
                os.remove('song.mp3')
                print('[log] Старый файл удалён')
        except PermissionError:
            print('[log] Не удалось удалить файл')

        await ctx.send('Пожалуйста ожидайте')

        voice = get(client.voice_clients, guild = ctx.guild)

        ydl_opts = {
            'format' : 'bestaudio/best',
            'postprocessors' : [{
                'key' : 'FFmpegExtractAudio',
                'preferredcodec' : 'mp3',
                'preferredquality' : '192'
            }],
        }

        with youtube_dl.YoutubeDL(ydl_opts) as ydl:
            print('[log] Загружаю музыку...')
            ydl.download([url])

        for file in os.listdir('./'):
            if file.endswith('.mp3'):
                name = file
                print(f'[log] Переименовываю файл: {file}')
                os.rename(file, 'song.mp3')

        voice.play(discord.FFmpegPCMAudio('song.mp3'), after = lambda e: print(f'[log] {name}, музыка закончила своё проигрывание'))
        voice.source = discord.PCMVolumeTransformer(voice.source)
        voice.source.volume = 0.07

        song_name = name.rsplit('-', 2)
        await ctx.send(f'Сейчас проигрывает музыка: {song.name[0]}')
    ```

Ответы (0 шт):