Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (message.channel.type == 'dm') {
- let embed = new Discord.MessageEmbed()
- .setAuthor(user)
- .setThumbnail(message.author.displayAvatarURL())
- .setColor(ee.color)
- .setFooter(ee.footertext, ee.footericon)
- // just in case they only send an attachment
- if (message.content) {
- embed.setDescription(message.content)
- }
- // if they add an image/video/file
- if (message.attachments.size > 0) {
- if (message.attachments.first().contentType.includes('video')) {
- embed.addField('Attached Video', `\u200B`)
- client.channels.cache.get(channelID).send({
- embeds: [embed],
- files: [message.attachments.first()]
- })
- } else if (message.attachments.first().contentType.includes('image')) {
- embed.addField('Image Below', `\u200B`)
- embed.setImage(message.attachments.first().url)
- client.channels.cache.get(channelID).send({
- embeds: [embed]
- })
- } else {
- embed.addField('Attached File', `\u200B`)
- client.channels.cache.get(channelID).send({
- embeds: [embed],
- files: [message.attachments.first()]
- })
- } else {
- client.channels.cache.get(channelID).send
- embeds: [embed]
- })
- }
- let embed2 = new Discord.MessageEmbed()
- .setTitle('Thank You')
- .setColor(ee.color)
- .setDescription('Your response is being carefully recorded! <:check:947079937372872704>')
- .setFooter(ee.footertext, ee.footericon);
- return message.author.send({
- embed: embed2,
- component: [button60]
- })
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment