Как проверить, имеет ли сообщение Discord JS Discord
if (<Message>.attachments.size > 0) {
//DO STUFF
}
iKurasad
if (<Message>.attachments.size > 0) {
//DO STUFF
}
const discord = require('discord.js');
const pornhub = require('pornhub);
const command = args[0]
const prefix = "!"
if (command = "${prefix}porn" {
const pornImage = await pornhub.image.get(random)
message.channel.send({files: [pornImage]})
}
if(Message.attachments.size) {
//Code
}