Clashi

Untitled

Jan 10th, 2020
257
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if (message.content.indexOf("https://tenor.com/view/") > -1) {
  2.         try {
  3.             message.guild.fetchWebhooks()
  4.                 .then(webhooks => {
  5.                     let wh = webhooks.find("name", message.channel.name)
  6.                     if (!wh) {
  7.                         message.channel.createWebhook(message.channel.name)
  8.                             .then(webhook => {
  9.                                 webhook.send({
  10.                                     username: message.author.username, "avatarURL": message.author.avatarURL, file: message.content + ".gif"
  11.  
  12.                                 })
  13.                             })
  14.                         return
  15.                     }
  16.                     wh.send({
  17.                         username: message.author.username, "avatarURL": message.author.avatarURL, file: message.content + ".gif"
  18.  
  19.                     })
  20.                 })
  21.         } catch (err) {
  22.             message.channel.send(err)
  23.         }
  24.     }
Advertisement
Comments
  • User was banned
Add Comment
Please, Sign In to add comment