Did Discord.py change its API?

2020-05-11 07:29发布

问题:

For some reason the code that I have for a Discord bot worked perfectly fine just a few months ago, but now I am getting something saying that 'Bot' has no attribute to certain commands like 'say'

discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'Bot' object has no attribute 'say'

回答1:

Yes. discord.py version 1.0, the "rewrite" version, was officially released on April 8th, and has supplanted the older "async" version 0.16.

You should review the migration guide in the documentation to familiarize yourself with the changes.