python - 我收到“AttributeError:模块'discord.ext.commands'没有属性'bot”错误
问题描述
client = commands.bot(command_prefix = '>', help_command=None)
这是我从中得到错误的代码。即使我在 discord.ext.commands 中有一个 bot.py 并且我确实从 discord.ext 导入命令
from discord.ext import commands
import discord
解决方案
它Bot
带有大写B。
commands.Bot(...)
推荐阅读
- java - 通过网络发送时spring是否对二进制数据进行编码?
- r - Shiny - 在用于 ggplot 的反应性 dplyr 表达式中使用来自 sliderInput 的日期范围
- docker - 为什么我不能暴露 portainer 代理端口 9001?
- mongodb - 从包含 180 亿个文档的 mongo 集合中删除 5 亿个文档
- node.js - 是否可以使用 pg-promise 在同一查询中使用多个数据库?
- javascript - Tabulator 保留 Tabulator 加载后所做的更改
- android - Android Studio:需要 407 代理身份验证
- python - 使用 python 进行安静的分页
- c# - 使用 Mailkit 或 mimekit 向多个收件人发送一封电子邮件
- java - 如何使用 Java 将 JSON 字符串解析为 ArrayList?