Did Discord.py change its API?

北战南征 提交于 2020-01-11 14:49:08

问题


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.



来源:https://stackoverflow.com/questions/55940993/did-discord-py-change-its-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!