试图发送图像
从帖子中复制了这段代码,我添加了一些。
ch = get(member.guild.channels, name="general")
# where i want to send an image
#this is my animated gif from this line I copied but no idea where Image function come from
image = Image.open("./images/welcome.gif")
with BytesIO() as image_binary:
image.save(image_binary, "gif")
image_binary.seek(0)
await ch.send(file=discord.File(fp=image_binary))
我通过 pip 安装了 Image 并添加了 import Image 然后出现错误
所以我认为这不是来自 pip 的模块
有任何想法吗?
陪伴而非守候
相关分类