我试图让我的不和谐机器人发送一个jpg文件到我的不和谐服务器,但我不断收到一个错误,似乎是相当罕见的,因为我找不到任何解决方案,在互联网上。。。
错误是。。。 discord.ext.commands.errors.CommandInvokeError:命令引发异常:ClientRequestError:无法为https://discordapp.com/api/v6/channels/454374995758678029/messages写入请求正文
我的进口货是
import time
import discord
from discord.ext import commands
from discord.ext.commands import Bot
import asyncio
我将提取出与错误相关的代码是
@bot.command(pass_context = True)
async def image(ctx):
await bot.send_file(ctx.message.channel, open('halogen.jpg'))
我只是缺少导入,还是我的代码有问题?
谢谢你们
试着这样做。
你可以参考这里的不和谐文档link
相关问题 更多 >
编程相关推荐