На replit'е писал код для бота, чтобы играл в голосовом канале 24/7. Бот в канал заходит и тишина... Он отказывается кушать подставляемые потоковые трансляции. Собственно код:
from discord import FFmpegPCMAudio, Activity, ActivityType
from discord.ext.commands import Bot
import os
import keep_alive
bot = Bot(command_prefix="-", help_command=None)
@bot.event
async def on_ready() -> None:
print(f"Бот {bot.user} успешно запущен.")
await bot.change_presence(activity=Activity(name="Радио ДАЧА", type=ActivityType.listening))
voice_channel = bot.get_channel(IDChanell) #secret
player = await voice_channel.connect()
player.play(FFmpegPCMAudio("http://217.19.211.252:8022/RadioDacha"))
keep_alive.keep_alive()
bot.run(os.environ["Token"]) #secret
Текст ошибки:
Ignoring exception in on_ready
Traceback (most recent call last):
File "/home/runner/Rdacha/venv/lib/python3.10/site-packages/discord/client.py", line 343, in _run_event
await coro(*args, **kwargs)
File "main.py", line 14, in on_ready
player.play(FFmpegPCMAudio("http://217.19.211.252:8022/RadioDacha"))
File "/home/runner/Rdacha/venv/lib/python3.10/site-packages/discord/player.py", line 225, in __init__
super().__init__(source, executable=executable, args=args, **subprocess_kwargs)
File "/home/runner/Rdacha/venv/lib/python3.10/site-packages/discord/player.py", line 138, in __init__
self._process = self._spawn_process(args, **kwargs)
File "/home/runner/Rdacha/venv/lib/python3.10/site-packages/discord/player.py", line 147, in _spawn_process
raise ClientException(executable + ' was not found.') from None
discord.errors.ClientException: ffmpeg was not found.