William
William
DIAdiscord.js - Imagine an app
Created by William on 7/6/2024 in #djs-questions
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);
})();
4 replies
DIAdiscord.js - Imagine an app
Created by William on 6/30/2024 in #djs-questions
Guild Create and Guild Delete only
Hello, is there a way to get only the guild create/guild delete events? I don't need all the other events because I'm using interaction endpoints, and I would like to receive only those two events without the others since I'm using a VPS with a small connection for a bot that is on many servers.
6 replies
DIAdiscord.js - Imagine an app
Created by William on 6/18/2024 in #djs-questions
awaitMessageComponent
Hi, I'm currently building a bot but solely using interaction endpoints with express / nestjs, so I don't have a client in my project. The issue is that sometimes I need the 'awaitMessageComponent' method for messages with buttons. Is it possible to use a client without a token or a framework for interaction endpoints?
4 replies