mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 19:28:17 +00:00
change filter logic
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import { cacheHandlers } from "../../cache.ts";
|
||||
import { cache } from "../../cache.ts";
|
||||
|
||||
/** Gets an array of all the channels ids that are the children of this category. */
|
||||
export async function categoryChildren(id: bigint) {
|
||||
return await cacheHandlers.filter("channels", (channel) => channel.parentId === id);
|
||||
/** Gets an array of all the channels ids that are the children of this category.
|
||||
* ⚠️ This does not work for custom cache users!
|
||||
*/
|
||||
export function categoryChildren(parentChannelId: bigint) {
|
||||
return cache.channels.filter((channel) => channel.parentId === parentChannelId);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user