def make_player(self, voice, item):
location = item['url']
if item['type'] == 0:
file_location = self.download_yt_data(location)
elif item['type'] == 1:
file_location = await self.download_sc_data(location)
elif item['type'] == 2:
file_location = await self.download_bc_data(item['sound'])
else:
file_location = location
source = discord.FFmpegPCMAudio(file_location, executable='ffmpeg')
voice.play(source)
评论列表
文章目录