luna 🐇
luna 🐇
DIAdiscord.js - Imagine an app
Created by luna 🐇 on 9/1/2024 in #djs-questions
Bot not appearing in member list
I am trying to get started following the discordjs.guide, but the discord bot is not appearing in the channel list as online, like expected. I used the default install link on the Installation tab of the Discord Developer Portal. I am getting the expected console.logs:
client.once(Events.ClientReady, (readyClient) => {
console.log(`Ready! Logged in as ${readyClient.user.tag}`)
})

// Log in to Discord with your client's token
client.login(process.env.DISCORD_BOT_TOKEN).then((onfulfilled) => {
console.log("Logged in to client")
})
client.once(Events.ClientReady, (readyClient) => {
console.log(`Ready! Logged in as ${readyClient.user.tag}`)
})

// Log in to Discord with your client's token
client.login(process.env.DISCORD_BOT_TOKEN).then((onfulfilled) => {
console.log("Logged in to client")
})
It is showing up in Server Settings => Integrations. I also tried giving it a role with admin perms but it still doesn't show up so I assume it's just offline. I tried continuing with the guide to see if it would work after setting up slash commands but the setup script updated 0 servers and slash commands do not work. I also wanted to try manually sending a message in a channel but the channel cache is just an empty Collection so channel is undefined and theres nowhere to send the message to:
const channel = client.channels.cache.get(channelId)
console.log("client.channels.cache :>> ", client.channels.cache)
console.log("channel :>> ", channel)
const channel = client.channels.cache.get(channelId)
console.log("client.channels.cache :>> ", client.channels.cache)
console.log("channel :>> ", channel)
5 replies