Answer the question
In order to leave comments, you need to log in
How to manage webhooks with discord.js?
How to find a webhook in a channel by its url and send a message through it?
Answer the question
In order to leave comments, you need to log in
for this, it is not necessary to specify the channel, the URL will be enough:
const { MessageEmbed, WebhookClient } = require('discord.js');
const url = "url_вебхука";
const webhookClient = new WebhookClient({ id: url.split("/")[5], token: url.split("/")[6]});
webhookClient.send({
content: 'контент',
username: 'имя_пользователя',
avatarURL: 'url_аватара',
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question