Guest User

Untitled

a guest
Mar 14th, 2022
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if (message.channel.type == 'dm') {
  2.     let embed = new Discord.MessageEmbed()
  3.     .setAuthor(user)
  4.     .setThumbnail(message.author.displayAvatarURL())
  5.     .setColor(ee.color)
  6.     .setFooter(ee.footertext, ee.footericon)
  7.  
  8. // just in case they only send an attachment
  9. if (message.content) {
  10.     embed.setDescription(message.content)
  11. }
  12.  
  13. // if they add an image/video/file
  14. if (message.attachments.size > 0) {
  15.     if (message.attachments.first().contentType.includes('video')) {
  16.         embed.addField('Attached Video', `\u200B`)
  17.         client.channels.cache.get(channelID).send({
  18.             embeds: [embed],
  19.             files: [message.attachments.first()]
  20.         })
  21.     } else if (message.attachments.first().contentType.includes('image')) {
  22.         embed.addField('Image Below', `\u200B`)
  23.         embed.setImage(message.attachments.first().url)
  24.         client.channels.cache.get(channelID).send({
  25.             embeds: [embed]
  26.         })
  27.     } else {
  28.         embed.addField('Attached File', `\u200B`)
  29.         client.channels.cache.get(channelID).send({
  30.                 embeds: [embed],
  31.                 files: [message.attachments.first()]
  32.         })
  33. } else {
  34.     client.channels.cache.get(channelID).send
  35.         embeds: [embed]
  36.     })
  37. }
  38.  
  39.     let embed2 = new Discord.MessageEmbed()
  40.     .setTitle('Thank You')
  41.     .setColor(ee.color)
  42.     .setDescription('Your response is being carefully recorded! <:check:947079937372872704>')
  43.     .setFooter(ee.footertext, ee.footericon);
  44.       return message.author.send({
  45.         embed: embed2,
  46.         component: [button60]
  47.     })
  48.   }
  49. });
Advertisement
Add Comment
Please, Sign In to add comment