【问题标题】:Discord music bot NoneType' object has no attribute 'play'Discord 音乐机器人 NoneType' 对象没有属性 'play'
【发布时间】:2020-10-05 00:14:40
【问题描述】:

这是我的代码:

voice.play(discord.FFmpegPCMAudio("song.mp3"), after=lambda e: print("Song done!"))
voice.source = discord.PCMVolumeTransformer(voice.source)
voice.source.volume = 0.07

我收到了这个错误:

discord.ext.commands.errors.CommandInvokeError:命令引发了 异常:AttributeError:“NoneType”对象没有属性“play”

【问题讨论】:

    标签: python discord.py-rewrite


    【解决方案1】:

    这意味着声音是无...

    您是否尝试连接到频道? 您是否在与该频道相同的公会中执行命令?

    https://discordpy.readthedocs.io/en/latest/api.html#discord.Guild.voice_channels https://discordpy.readthedocs.io/en/latest/api.html#discord.Guild.voice_client

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-12-12
      • 2021-05-27
      • 1970-01-01
      • 2020-10-22
      • 2019-04-30
      • 2021-05-24
      相关资源
      最近更新 更多