DiscordAPI如何获取发送的图像?(Python)

时间:2020-04-29 14:27:14

标签: python image bots discord discord.py-rewrite

我想教我的Discord Bot从发送给它的图像中识别文本。这就是我想要的方式: “!到文本 ” 但是我不知道如何捕获发送的图像。请帮忙!

@bot.command(pass_context=True)  
async def totext(ctx, arg):  
     await ctx.send(pytesseract.image_to_string(arg,lang="rus")) 

0 个答案:

没有答案