Zeroknights
Zeroknights
DIAdiscord.js - Imagine an app
Created by Zeroknights on 6/5/2023 in #djs-questions
interaction.channel = null
Sometimes interaction.channel = null. This is often fixed by restarting the bot. But I don't want to restart the bot every 24 hours. It's a command interaction that was executed in a guild. The bot is in this guild and the guild is cached.
// It returned "true" anyways
if (!interaction.inCachedGuild()) await client.guilds.fetch(client.config.guild_id);
// It returned "true" anyways
if (!interaction.inCachedGuild()) await client.guilds.fetch(client.config.guild_id);
Along with that I fetch the channel if I am receiveing a chanel partial
const channel = interaction.channel == null ? await interaction.channel.fetch() : interaction.channel;
const channel = interaction.channel == null ? await interaction.channel.fetch() : interaction.channel;
But I am still getting this error
| [ERR] | DiscordAPIError[10003]: Unknown Channel
/root/DiscordBot/Multibot/node_modules/@discordjs/rest/dist/index.js:640
throw new DiscordAPIError(data, "code" in data ? data.code : data.error, status, method, url, requestData);
| [ERR] | DiscordAPIError[10003]: Unknown Channel
/root/DiscordBot/Multibot/node_modules/@discordjs/rest/dist/index.js:640
throw new DiscordAPIError(data, "code" in data ? data.code : data.error, status, method, url, requestData);
41 replies
DIAdiscord.js - Imagine an app
Created by Zeroknights on 4/1/2023 in #djs-questions
Stop the cap
It’s 1st of April. Discord.js is being maintained. But nice joke 🤣😂 We all love our discord.js developers ❤️
5 replies
DIAdiscord.js - Imagine an app
Created by Zeroknights on 9/25/2022 in #djs-questions
Discord New Auto Mod Features
Hey there, this is just a small question regarding the new auto mod functions discord added. I looked it up in the internett, but didn't find anything usefull. I just want to know when the whole new auto mod feature is getting added to Discord.js.
4 replies