python - Discord.py bot - TypeError:“模块”对象不可调用
问题描述
刚开始制作机器人,正在测试它是否会上线。
命令:
C:\Users\Allied Gaming\hello> & D:/Games/python.exe "c:/Users/Allied Gaming/hello/bot.py"
错误:
Traceback (most recent call last):
File "c:\Users\Allied Gaming\hello\bot.py", line 2, in <module>
client = discord.client()
TypeError: 'module' object is not callable
PS C:\Users\Allied Gaming\hello>
这是代码:
import discord
client = discord.client()
这就是我目前拥有的所有代码,除了我的令牌。
解决方案
推荐阅读
- laravel - Laravel 迁移 - 将列放在另一列之前
- elasticsearch - How to turn off autocomplete for easticsearch match_phrase or match_phrase_prefix?
- vue.js - HTML 属性中的 Vue 数据,即 src="{{images[0].src}}"
- android - Activity 为 AppCompatActivity null,如何解决?
- excel - 基于标准的 Vlookup
- hibernate - 从已经存在的实体、父实体的副本、新父实体中移除子实体
- html - CSS 菜单图标不可见
- java - 如果用户在第一个 JTable 中选择另一行,如何删除第二个 JTable 的反射行?
- symfony - 如何在订单过程中更新 Shopware 6 中的订单自定义字段?
- html - 前端按ID从代码内容中永久删除DIV