discord.py-AttributeError:模块“ discord”没有属性“ PCMVolumeTransformer”

 收藏

这是用于更改语音通道中机器人音量的代码,并且发生错误。

class vol(discord.PCMVolumeTransformer):

错误:

AttributeError: module 'discord' has no attribute 'PCMVolumeTransformer'

如何解决这个问题? 附言我已经下载了discord.py和discord.py [voice]模块。 (0.16.12版)

回复
  • 唯1的唯一 回复

    As Benjin said in a commment, V0.16.12 is part of the old async branch, which does not have PCMVolumeTransformer. You need to update to the newest version, V1.2.0A (also known as discord.py-rewrite) if you wish to use that command.