timotejroiko/discord.js-light

how do i get all channels in a guild?

Milo123459 opened this issue · 1 comments

so If I pass in the options for no channelCaching, how can I get all channels in a guild? Would It be like:

<Guild>.channels.fetch();
//do something
<Guild>.channels.cache.deleteAll();

or does it automatically remove it from the cache?

(answered on discord, but reposting here for visibility)

You can use <Guild>.channels.fetch(false) which will fetch all channels and return a collection of channels, without caching them.