<Client>.guilds.fech returns a collection of OAuth2Guild instead of the guild itself

For some reason, using <Client>.guilds.fetch(<guildId>) returns a Collection of OAuth2Guild instead of the guild itself. The type says Guild but the return is something else.
7 Replies
d.js toolkit
d.js toolkit2d ago
JustEvil
JustEvilOP2d ago
discord.js 14.22.1 node v22.20.0
monbrey
monbrey2d ago
Fetching a single guild id would never return a Collection, which suggests that your guild id is null
Inky
Inky2d ago
It means you provided undefined instead of a string
monbrey
monbrey2d ago
Or undefined, yeah
JustEvil
JustEvilOP2d ago
really? yup I didn't check that lol I only checked the guild instead alr, I fixed it -# Thank you for the fast response!
d.js toolkit
d.js toolkit2d ago
The thread owner has marked this issue as solved.

Did you find this page helpful?