Register one or more routers or collectors. Supports nesting of collectors.
Routers or collectors to merge.
This collector for chaining.
Example: Organizing multiple interaction routes with a collector.
import { InteractionRouterCollector } from "discord.https/router";
// Recommend using PascalCase and ending with the 'Route' suffix
// for variable naming convention
import PingRoute from "./ping.js";
import GithubRoute from "./github.js";
export default new InteractionRouterCollector().register(
PingRoute,
GithubRoute
);
Collector for InteractionRouter.
Example
Example: Organizing multiple interaction routes with a collector.