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)
well when i would @soandso the bot would send out the message fopr somereason
61 replies
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)
because tagging someone counts as an attachment for some reason
61 replies
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)
thats why it was crashing when i was just tagging someone
61 replies
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)
it works too but i dont understand how. can you explain that? if you dont mind
61 replies
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 just did the other code the message.attachments.first()?.url
61 replies
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)
lol
61 replies
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)
it works perfectly
61 replies
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)
if (message.attachments.size && message.attachments.first().url){ message.channel.send('@everyone It looks like someone is sending pics again!'); } else{};
61 replies
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 did this
61 replies
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)
conditional chaining
61 replies
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)
thats a little over my head. what does that mean?
61 replies
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)
if (message.attachments.first().url){ message.channel.send('@everyone It looks like someone is sending pics again!'); } else{}; });
61 replies
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)
you wasnt the whole index.js or just this segment?
61 replies
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)
thats the full thing. If i tag someone that error happens
61 replies
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)
TypeError: Cannot read properties of undefined (reading 'url') at Client.<anonymous> (C:\Users\bmill\OneDrive\Documents\Code\DiscordBot\src\index.js:38:34) at Client.emit (node:events:519:28) at MessageCreateAction.handle (C:\Users\bmill\OneDrive\Documents\Code\DiscordBot\node_modules\discord.js\src\client\actions\MessageCreate.js:28:14) at module.exports [as MESSAGE_CREATE] (C:\Users\bmill\OneDrive\Documents\Code\DiscordBot\node_modules\discord.js\src\client\websocket\handlers\MESSAGE_CREATE.js:4:32) at WebSocketManager.handlePacket (C:\Users\bmill\OneDrive\Documents\Code\DiscordBot\node_modules\discord.js\src\client\websocket\WebSocketManager.js:355:31) at WebSocketManager.<anonymous> (C:\Users\bmill\OneDrive\Documents\Code\DiscordBot\node_modules\discord.js\src\client\websocket\WebSocketManager.js:239:12) at WebSocketManager.emit (C:\Users\bmill\OneDrive\Documents\Code\DiscordBot\node_modules@vladfrangu\async_event_emitter\dist\index.cjs:282:31) at WebSocketShard.<anonymous> (C:\Users\bmill\OneDrive\Documents\Code\DiscordBot\node_modules@discordjs\ws\dist\index.js:1173:51) at WebSocketShard.emit (C:\Users\bmill\OneDrive\Documents\Code\DiscordBot\node_modules@vladfrangu\async_event_emitter\dist\index.cjs:282:31) at WebSocketShard.onMessage (C:\Users\bmill\OneDrive\Documents\Code\DiscordBot\node_modules@discordjs\ws\dist\index.js:988:14)
61 replies
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)
Cannot read properties of undefined (reading 'url')
61 replies
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'm very new to coding and stuff so i apologise
61 replies
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)
ok using essage.attachments.first().url works great however is I tag someone it causes the bot to crash
61 replies
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)
like should i do message.attachments.size > 0
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 see. thank you!!
7 replies