Discord.py是否更改了其API? [英] Did Discord.py change its API?

查看:68
本文介绍了Discord.py是否更改了其API?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于某种原因,几个月前我为Discord机器人编写的代码运行良好,但现在我得到的提示是 Bot对某些命令(如 say)没有属性

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:命令引发了异常:AttributeError:'Bot'对象没有属性'say'

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

推荐答案

是。 discord.py 1.0版, 重写版本于4月8日正式发布,并取代了较早的异步版本0.16。

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.

这篇关于Discord.py是否更改了其API?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆