Discord.py 代码I';中int类出错的原因是什么;你写了什么?

Discord.py 代码I';中int类出错的原因是什么;你写了什么?,discord.py,Discord.py,是什么导致了init类中的错误? 我正试图声明一个类,但我不确定该怎么做。 (这是discord.ext) 我的代码是: import discord from discord.ext import commands client = commands.Bot(command_prefix='!') token = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" #Client = command_prefix @client.even

是什么导致了init类中的错误? 我正试图声明一个类,但我不确定该怎么做。 (这是discord.ext) 我的代码是:

import discord
from discord.ext import commands

client = commands.Bot(command_prefix='!')
token = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" 
#Client = command_prefix

@client.event
async def on_ready():
    print('Logged in as')
    print(client.user.name)
    print(client.user.id)
    print('------')

@client.command()
async def ping(ctx):
    await ctx.send('pong')

async def on_message(message):

@commands.Bot(name="<<kick", pass_context= True)
@commands.has_permissions(administrator=True)
async def _kick(ctx, *, username: discord.Member, reason=None):
    await user_name.kick(reason=reason)
    await ctx.send(str(user_name) + '\n```User was kick!```')
        
        

    
client.run(token)
导入不一致
从discord.ext导入命令
client=commands.Bot(命令前缀='!')
令牌=“xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”
#Client=命令前缀
@客户端事件
_ready()上的异步定义:
打印('登录为')
打印(client.user.name)
打印(client.user.id)
打印('----')
@client.command()
异步定义ping(ctx):
等待ctx发送('pong')
异步def on_消息(消息):
@commands.Bot(name=“您有
@commands.Bot(名称=”