Clashi icon

Untitled

Clashi | PRO | 01/10/20 03:36:22 PM UTC | 0 ⭐ | 299 👁️ | Never ⏰ | []
JavaScript |

670 B

|

None

|

0 👍

/

0 👎

if (message.content.indexOf("https://tenor.com/view/") > -1) {
        try {
            message.guild.fetchWebhooks()
                .then(webhooks => {
                    let wh = webhooks.find("name", message.channel.name)
                    if (!wh) {
                        message.channel.createWebhook(message.channel.name)
                            .then(webhook => {
                                webhook.send({
                                    username: message.author.username, "avatarURL": message.author.avatarURL, file: message.content + ".gif"
 
                                })
                            })
                        return
                    }
                    wh.send({
                        username: message.author.username, "avatarURL": message.author.avatarURL, file: message.content + ".gif"
 
                    })
                })
        } catch (err) {
            message.channel.send(err)
        }
    }

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎