python - Discord.py 不显示它所在的服务器数量
问题描述
我的代码:
@bot.command()
async def servers(ctx):
await ctx.send( f"I'm in {str(len(client.guilds))} servers")
当我使用命令时,它说:I'm in 0 servers
,但它不在 0 个服务器中。
解决方案
推荐阅读
- php - 无法在 php 中设置动态类名
- java - 为两个不同的移动实例化一个撤销方法
- python - Pycharm:无法基于python 3.9.01+制作venv
- wpf - Powershell GUI 冻结,即使使用运行空间
- javascript - Javascript innerText - 回车 - 正则表达式不起作用
- python - Python 和 SQLite 需要帮助 --> TypeError: 'NoneType' object is not subscriptable
- python-3.x - 使用另一个列表创建一个列表
- firebase - 使用从前端应用程序获取的 firebase 令牌处理 Spring Boot REST API 中的身份验证
- python - 为数据集绘制图形以在 Python 上开发 SVM
- c++ - 有没有办法在不使用系统时钟的情况下在 C++ 中获取时间和日期?