Get channel by id

Hi, im trying to get a channel by it's id but i get undefined
7 Replies
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Parogo_72
Parogo_722y ago
Then either the id is wrong, or you use that code outside an event Or missing Guilds intent
Waxer59
Waxer59OP2y ago
Can't you get a channel by its id outside an event ?
Parogo_72
Parogo_722y ago
If the bot isnt logged in the cache will be empty
Waxer59
Waxer59OP2y ago
and what would be the way for the cache to be loaded using a function outside of an event, if any?
Parogo_72
Parogo_722y ago
As I said the bot needs to be logged in So you either call that function inside an event, or somewhere where you know for sure that the bot already logged in
Waxer59
Waxer59OP2y ago
ok ty
Want results from more Discord servers?
Add your server