【发布时间】:2020-02-29 00:32:00
【问题描述】:
本帖(how do i make my discord.py bot play mp3 in voice channel?)推荐这段代码:
player = vc.create_ffmpeg_player('vuvuzela.mp3', after=lambda: print('done'))
这是我的台词:
self.player = await self.vc.create_ffmpeg_player('song.mp3')
但是在做同样的事情之后,我得到了这个错误:
Traceback (most recent call last):
File "/home/lam/miniconda3/lib/python3.7/site-packages/discord/client.py", line 270, in _run_event
await coro(*args, **kwargs)
File "bot.py", line 41, in on_message
self.player = await self.vc.create_ffmpeg_player('song.mp3')
AttributeError: 'VoiceClient' object has no attribute 'create_ffmpeg_player'
他们是否更改了文档?
【问题讨论】:
标签: python discord discord.py