Skip to main content
Defined in: dev/defineBot.ts:105 Is the module that owns meta (pass import.meta) the process entry point, i.e. was it started with node <file> rather than imported? Use it to guard the “connect the real provider” block so botmesh dev (and your tests) can import the factory without connecting to a real transport. Uses import.meta.main when the runtime provides it (Node >= 22.18 / 24.2) and otherwise compares the module’s real path with process.argv[1]. Caveat: process managers that import() your file from their own wrapper (e.g. pm2 in ESM mode) make this false; point them at a tiny start file that imports the factory and starts it instead.

Parameters

Returns

boolean