Arkstorm
Arkstorm
DIAdiscord.js - Imagine an app
Created by Arkstorm on 3/8/2024 in #djs-questions
Make a Discord bot reply when a user sends an image in chat (continued)
I have a discord bot up and running and working on slash commands. But I'm having trouble getting it to reply when someone sends an image. I posted this yesterday where I couldnt get the discord bot to respond if someone uploaded an image. A member of the discord helped me out(thank you again). however, Ive run into another issue. My bot cannot distinguish the type of attachment sent. If I tag someone in a message: i.e. "@someone what's up" the bot responds. I only want the bot to respond if a .png or a .jpeg is sent into the channel. currently my code looks like this: if (message.attachments){ message.channel.send('everyone It looks like someone is sending something you like 😉 '); } If you can help i'd be in debt to you forever!!
61 replies
DIAdiscord.js - Imagine an app
Created by Arkstorm on 3/7/2024 in #djs-questions
I'm trying to make my Discord Bot Reply when a user sends an Image in Chat
I have a working discord bot that responds to people and I'm even getting it to tell me the weather and time of a specific Zip code through a slash command. But I'm having trouble getting it to reply when someone sends an image. I want the discord bot to reply with "Looks like someone is sending..." when a user uploads an image into a channel. Can anyone help a brotha out? I found a few solutions but they're like 5+ years old and I'm not getting anywhere with them.
7 replies