fahimfaisaal
DIAdiscord.js - Imagine an app
•Created by fahimfaisaal on 8/4/2023 in #djs-questions
Accessing Specific Guild from Bot's Cache is not working
I hope this message finds you well. I am currently facing an issue with my Discord bot, and I'm seeking some guidance from the community.
Here's the problem I'm encountering:
1. When my bot joins a new guild, I can successfully access that guild using the
Events.GuildCreate
event. I retrieve it from the cache using client.guilds.cache
.
2. However, when I attempt to access a specific guild from the cache using the same client instance, I am getting "undefined." Additionally, when I check the Collection map, it appears to be empty.
I'm puzzled by this behavior and unsure why it's happening. Is there something I might be missing or doing incorrectly?
Am sharing my bot scopes, codes and output that am getting18 replies
DIAdiscord.js - Imagine an app
•Created by fahimfaisaal on 6/21/2023 in #djs-questions
`guildCreate` event doesn't give the discord user ID who added a bot inside guild except super admin
When the
guildCreate
event is triggered, I am only able to retrieve the ownerId
of the guild. However, when a moderator adds the guild, the moderator's ID is not provided. Is there a method available to obtain the Discord user ID of that particular moderator?
v14.3.0
7 replies