LogoRobo.js
Packages@robojs/mock

MockRoboHandle

Interface: MockRoboHandle

Result of starting a mock Robo

Properties

PropertyTypeDescription
botUser{ id: string; username: string; }Bot user info
botUser.idstring-
botUser.usernamestring-
channels{ guildId: string; id: string; name: string; type: number; }[]Available channels
clientunknownThe Discord.js client (from @robojs/discordjs) - null when hmr: true
getHmrCount?() => numberGet current HMR reload count - use before file changes to track position (only when hmr: true)
getRestartCount?() => numberGet current restart count - use before file changes to track position (only when hmr: true)
guildIdstringDefault guild ID
guilds{ id: string; name: string; }[]Available guilds
process?ChildProcessChild process (only when hmr: true)
serverPortnumberThe port the Robo server is running on
sessionIdstringSession ID the bot is connected to
stop() => Promise<void>Stop the bot and clean up
tokenstringSession 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.

On this page