【发布时间】:2021-07-05 20:00:00
【问题描述】:
我目前正在尝试为我的朋友制作一个机器人,以便他可以完成他的 Discord 服务器的制作,他希望该机器人能够使用 Discord.py 对图像添加反应。 到目前为止,这是我检查图像的代码:
async def on_message(ctx, message)
pic_ext = ['.jpg','.png','.jpeg']
for ext in pic_ext:
if message.content.endswith(ext):
ctx.send("Image!")```
【问题讨论】:
-
您可以查看attachments。你已经这样做了吗?
标签: python discord discord.py bots