2021年4月9日星期五

How would I check a Discord message for an image?

I am currently trying to make a bot for my friend so he can finish making his Discord server, and he wants the bot to be able to add a reaction to a image with Discord.py. Here is my code to check for the image so far:

async def on_message(ctx, message)      pic_ext = ['.jpg','.png','.jpeg']      for ext in pic_ext:      if message.content.endswith(ext):          ctx.send("Image!")```  
https://stackoverflow.com/questions/67029567/how-would-i-check-a-discord-message-for-an-image April 10, 2021 at 07:51AM

没有评论:

发表评论