Please describe the problem you are having in as much detail as possible:
you can't pin a message sent by webhook
Include a reproducible code sample here, if possible:
const webmessage = await webhookClient.send('', {
username: `${message.guild.name}'s music service`,
avatarURL: `${icon}`,
embeds: [embed],
});
webmessage.pin();
Further details:
Relevant client options:
Webhook#send returns a discord.js Message instance, which has the pin message
WebhookClient#send does not and instead returns the raw API message data
For now you can work around this by fetching a Webhook instance from Guild/TextChannel#fetchWebhooks instead
We can reproduce this in our resource webhook project as well. https://github.com/discordjs/resource-webhooks/blob/main/src/index.ts#L73-L77
This is neither reflected in typings nor documented, typings show a Message instance, documentation suggests implementation of Webhook#send which also documents Message
Please keep this issue open, the typings are wrong and what the inheritance suggests documentation wise isn't intuitive either.
If you don't want to be notified you can set that in the right pane of the issue view.
no you cant Webhooks can get pinned(by a bot)