Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const Discord = require('discord.js');
- const client = new Discord.Client();
- let prefix = "!";
- client.on("message", message => {
- let args = message.content.split(" ").slice(1);
- if (message.content.startsWith(prefix + "test")) {
- message.channel.createWebhook("Example Webhook", "https://i.imgur.com/p2qNFag.png")
- .then(webhook => webhook.edit("Example Webhook", "https://i.imgur.com/p2qNFag.png")
- .then(wb => message.author.send(`Here is your webhook https://canary.discordapp.com/api/webhooks/${wb.id}/${wb.token}`))
- .catch(console.error))
- .catch(console.error);
- mentionHook = new Discord.WebhookClient(`${wb.id}`, `${wb.token}`);
- mentionHook.send("You were mentioned!");
- }
- });
Add Comment
Please, Sign In to add comment