Dokter
Dokter
Explore posts from servers
CDCloudflare Developers
Created by Dokter on 10/16/2023 in #general-help
Blocking IPs
No description
14 replies
CDCloudflare Developers
Created by Dokter on 8/14/2023 in #general-help
Cloudflare stopped working
No description
11 replies
DIAdiscord.js - Imagine an app
Created by Dokter on 7/22/2023 in #djs-questions
message fetching
const joinMessage = await client.channels.cache
.get(docsSetup.ArchiveChannel)
.messages.fetch(docsOpen.JoinMessageID);
const joinMessage = await client.channels.cache
.get(docsSetup.ArchiveChannel)
.messages.fetch(docsOpen.JoinMessageID);
unfortunately it doesnt properly fetch the message. I get folloing error: DiscordAPIError[10008]: Unknown Message The IDs are checked and are perfectly fine,
20 replies
DIAdiscord.js - Imagine an app
Created by Dokter on 7/15/2023 in #djs-questions
user undefined
I am encounting following error: TypeError: Cannot read properties of undefined (reading 'user') Here is the code:
const { SlashCommandBuilder } = require("discord.js");

module.exports = {
data: new SlashCommandBuilder()
.setName("status")
.setDescription("Sets the status of the bot")
.addStringOption((option) =>
option
.setName("type")
.setDescription("Choose which one you want it to be")
.setRequired(true)
.addChoices(
{ name: "Online", value: "online" },
{ name: "Idle", value: "idle" },
{ name: "Do not disturb", value: "dnd" },
{ name: "Invisible", value: "invisible" }
)
),
async execute(interaction, client) {
const { options } = interaction;
const type = options.getString("type");

try {
await client.user.setPresence({ status: type });
} catch (error) {
console.log(error);
}
},
};
const { SlashCommandBuilder } = require("discord.js");

module.exports = {
data: new SlashCommandBuilder()
.setName("status")
.setDescription("Sets the status of the bot")
.addStringOption((option) =>
option
.setName("type")
.setDescription("Choose which one you want it to be")
.setRequired(true)
.addChoices(
{ name: "Online", value: "online" },
{ name: "Idle", value: "idle" },
{ name: "Do not disturb", value: "dnd" },
{ name: "Invisible", value: "invisible" }
)
),
async execute(interaction, client) {
const { options } = interaction;
const type = options.getString("type");

try {
await client.user.setPresence({ status: type });
} catch (error) {
console.log(error);
}
},
};
Any Ideas why?
39 replies
DIAdiscord.js - Imagine an app
Created by Dokter on 7/13/2023 in #djs-questions
Structuring within discord.js
I am fairly new to discord.js but have quite a bit of experience in web-development. I know that structuring a project is very important (the files), so I wanted to ask how that is usually done within discord.js/how people usually do it. Thanks for answers in advance 🙂
7 replies