cant get guilds?
interacts dont give me a .guild only a .guildId
cache does not have this guild nor can i fetch it (
DiscordAPIError[10004]: Unknown Guild
)15 Replies
const client = new Client({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMembers, GatewayIntentBits.GuildPresences] });
i have all the intents
just prints 0GitHub
GitHub - SollyBunny/Discord-Cake-Throw-Revived: Discord bot to thro...
Discord bot to throw cakes at eachother. Contribute to SollyBunny/Discord-Cake-Throw-Revived development by creating an account on GitHub.
using a different (older) bot clientid/token works
as far as i can tell the bot settings are the exact same
it doesn't sound like your bot is actually in any guilds then
have you double checked that you invited your bot with the
bot
scope instead of just the applications.commands
scope?ah no bot scope
i only need to get display names (of the interactor and of a user inputted in an interaction)
is there any way to do so without being a bot
afaik even when in a raw guild, you should still be able to access
<ChatInputCommandInteraction>.member
, <ChatInputCommandInteraction>.options.getMember()
, and the equivalent properties for user
so you should be able to put together something similar to <GuildMember>.displayName
thats what i thought
(didnt know getMember was an option)
but display* is nowhere to be seen
<ChatInputCommandInteraction>.member
and getMember
would just return raw member data rather than GuildMember
objectswell i did see .nick available but i wanted the convenience of .displayName
(incase .nick is nonexistant)
then you'd need to recreate
<GuildMember>.displayName
yourself
you can take a peek under the hood if you'd like
(though you'd need to use <Interaction>.user
and .options.getUser()
for the user)okay
thank u for the help
👍
The issue has been marked as solved by support staff