Maxi130
DIAdiscord.js - Imagine an app
•Created by Maxi130 on 12/25/2024 in #djs-questions
Can't change channel of webhook
I'm trying to change the channel of a webhook, to a channel. The channel does exist and the bot has all permissions (the bot owns the guild). The id of the channel also is correctly shown in the requestBody given in the error message.
Error:
DiscordAPIError[10003]: Unknown Channel
at handleErrors (/home/max/Documents/DiscordMessageLinkBot/node_modules/@discordjs/rest/dist/index.js:727:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async SequentialHandler.runRequest (/home/max/Documents/DiscordMessageLinkBot/node_modules/@discordjs/rest/dist/index.js:1128:23)
at async SequentialHandler.queueRequest (/home/max/Documents/DiscordMessageLinkBot/node_modules/@discordjs/rest/dist/index.js:959:14)
at async _REST.request (/home/max/Documents/DiscordMessageLinkBot/node_modules/@discordjs/rest/dist/index.js:1272:22)
at async Webhook.edit (/home/max/Documents/DiscordMessageLinkBot/node_modules/discord.js/src/structures/Webhook.js:284:18)
at async Client.<anonymous> (/home/max/Documents/DiscordMessageLinkBot/index.js:35:7) {
requestBody: {
files: undefined,
json: {
name: 'SWORD FIGHT',
avatar: null,
channel_id: '1068865955054223401'
}
},
rawError: { message: 'Unknown Channel', code: 10003 },
code: 10003,
status: 404,
method: 'PATCH',
url: 'https://discord.com/api/v10/webhooks/1321112938597060669'
}
13 replies
DIAdiscord.js - Imagine an app
•Created by Maxi130 on 10/18/2024 in #djs-questions
How to delete reply of an interaction that caused my interaction after 3 seconds?
31 replies
DIAdiscord.js - Imagine an app
•Created by Maxi130 on 1/15/2024 in #djs-questions
How do I get premium_type of a user or is there no way in discord.js?
I looked in the docs, but couldn't find anything.
The user is not partial and fully fetched.
I tested it with curl and it is accessible without 0Auth2
https://discord.com/developers/docs/resources/user#user-object-user-structure
https://discord.com/developers/docs/resources/user#user-object-premium-types
5 replies
DIAdiscord.js - Imagine an app
•Created by Maxi130 on 1/15/2024 in #djs-questions
message.mentions.users being incomplete
When using message.mentions.users user who are not in the guild/cached by the bot, aren't in the collection.
I pinged them using <@id> and <@!id> instead of using discords built in selector, if that matters. The pings are shown correctly on my client.
10 replies
DIAdiscord.js - Imagine an app
•Created by Maxi130 on 1/2/2024 in #djs-questions
message.channel.totalMesssgeSent returning undefined
Message and message.channel are the value that they are supposed to be.
I have the MessageContent, Guilds and MessageCreate intents.
I do not have any partials,
9 replies
DIAdiscord.js - Imagine an app
•Created by Maxi130 on 10/9/2023 in #djs-questions
How do I properly use a built in emoji?
8 replies
DIAdiscord.js - Imagine an app
•Created by Maxi130 on 9/16/2023 in #djs-questions
How do I fire an event once a rate limit has been reached?
I'm aware that discord.js handles right limits, but I want to be sure that it doesn't change the channel topic, because of a rate limit.
2 replies
DIAdiscord.js - Imagine an app
•Created by Maxi130 on 4/22/2023 in #djs-questions
data.choices[0][MODEL_TYPE_CONVERT]: Only dictionaries may be used in a ModelType
That is what I am responding with:
What am I doing wrong?
6 replies
DIAdiscord.js - Imagine an app
•Created by Maxi130 on 2/11/2023 in #djs-questions
[Solved] guildMemberUpdate event only firing after second nickname change
I'm trying to detect when someone changes their nickname.
Output:
17 replies
DIAdiscord.js - Imagine an app
•Created by Maxi130 on 8/27/2022 in #djs-questions
Convert discord.js collection to json with keeping keys and values
I already tried Collection.toJSON() but it removes the key name and converts it into an array.
Code:
Output:
15 replies
DIAdiscord.js - Imagine an app
•Created by Maxi130 on 8/6/2022 in #djs-questions
Error WebSocket was closed before the connection was established
Version: ^13.8.1 (I will try upgrading but I don't think this is the issue)
6 replies