我试图从存储在mySQL数据库中的日志中读取,每当我使用这个代码时,它总是吐出底部的位 . 有谁知道为什么会这样?

# ModLogs
@is_admin()
@client.command()
async def modlogs(self, ctx, logid):
    """
    checks logs via id (temp)
    """
    query = "SELECT * FROM server_logs WHERE logid = %s"
    cursor.execute(query, (logid,))
    result = cursor.fetchone()
    if result is None:
        await ctx.channel.send("Nothing Found")
    else:
        user = client.get_user(int(result["userid"]))
        await ctx.channel.send(user.mention)

忽略命令modlog中的异常:Traceback(最近一次调用最后一次):文件“C:\ Program Files(x86)\ Python37-32 \ lib \ site-packages \ discord \ ext \ commands \ core.py”,第61行, in wrapped ret = await coro(* args,** kwargs)文件“C:... \ discordbot python \ cogs \ mod.py”,第30行,在modlogs中等待ctx.channel.send(user.mention)AttributeError: 'NoneType'对象没有属性'提及'以上异常是以下异常的直接原因:Traceback(最近一次调用last):文件“C:\ Program Files(x86)\ Python37-32 \ lib \ site-packages \ discord \ ext \ commands \ bot.py“,第898行,在调用await ctx.command.invoke(ctx)文件”C:\ Program Files(x86)\ Python37-32 \ lib \ site-packages \ discord \ ext \ commands \ core.py“,第550行,在调用await inject(* ctx.args,** ctx.kwargs)文件”C:\ Program Files(x86)\ Python37-32 \ lib \ site-packages \ discord \ ext \ commands \ core.py“,第70行,来自e discord.ext.commands.errors.CommandInvokeError的包装引发CommandInvokeError(e):命令引发异常:Att ributeError:'NoneType'对象没有属性'提及'