MockRoboHandle
Result of starting a mock Robo
| Property | Type | Description |
|---|
botUser | { id: string; username: string; } | Bot user info |
botUser.id | string | - |
botUser.username | string | - |
channels | { guildId: string; id: string; name: string; type: number; }[] | Available channels |
client | unknown | The Discord.js client (from @robojs/discordjs) - null when hmr: true |
getHmrCount? | () => number | Get current HMR reload count - use before file changes to track position (only when hmr: true) |
getRestartCount? | () => number | Get current restart count - use before file changes to track position (only when hmr: true) |
guildId | string | Default guild ID |
guilds | { id: string; name: string; }[] | Available guilds |
process? | ChildProcess | Child process (only when hmr: true) |
serverPort | number | The port the Robo server is running on |
sessionId | string | Session ID the bot is connected to |
stop | () => Promise<void> | Stop the bot and clean up |
token | string | Session token |
waitForFullRestart? | (timeout?: number, fromCount?: number) => Promise<void> | Wait for full restart to complete (only when hmr: true). Pass fromCount from getRestartCount() captured before file changes. |
waitForHmrReload? | (timeout?: number, fromCount?: number) => Promise<void> | Wait for HMR reload to complete (only when hmr: true). Pass fromCount from getHmrCount() captured before file changes. |