Webhook avatar

Hi, I'm trying to create a webhook linked to my bot, which works correctly, but the avatar is not displayed even though the URL is correct. What am I doing wrong in my request? The webhook is correctly created with the right name but without the avatar. Request:
import axios from 'axios';

(async () => {
const createWebhook = await axios(
'https://discord.com/api/v10/channels/1051883385179611260/webhooks',
{
method: 'POST',
headers: {
Authorization: 'Bot ....',
},
data: {
name: 'Webhook Name',
avatar: 'https://cdn.discordapp.com/icons/891685895781113886/36d2a944341ab14888afa1523ce19b57.png',
},
},
);

console.log(createWebhook.data);
})();
import axios from 'axios';

(async () => {
const createWebhook = await axios(
'https://discord.com/api/v10/channels/1051883385179611260/webhooks',
{
method: 'POST',
headers: {
Authorization: 'Bot ....',
},
data: {
name: 'Webhook Name',
avatar: 'https://cdn.discordapp.com/icons/891685895781113886/36d2a944341ab14888afa1523ce19b57.png',
},
},
);

console.log(createWebhook.data);
})();
3 Replies
d.js toolkit
d.js toolkit•4mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - ✅ Marked as resolved by OP
treble/luna
treble/luna•4mo ago
Seems like a question for #other-js-ts or #useful-servers ddevs
William
William•4mo ago
Oops sorry, thank's !
Want results from more Discord servers?
Add your server