Appearance
@verse-bot/core
Platform-neutral types and utilities shared by the Telegram and VK adapters.
Install
bash
npm install @verse-bot/coreMain exports
UniversalContext,Platform, shared message and keyboard types, andUniversalCommandButton;- optional callback capabilities for normalized data, acknowledgements and message edits;
- original update payloads and asynchronous
UniversalAdminCheckcontract; checkUniversalAdminfor combining the configured admin status with an optional asynchronous check;- shared photo sending and keyboard options, plus an optional file-sending capability;
dispatchUniversalCommandfor common command routing;requireAdminandrequirePrivateChatcommand guards;catchErrorsfor consistent command error handling;httpfor small JSON HTTP requests;- authentication and command logging middleware;
BotDatabaseand related persistence contracts.
The package is ESM-only and has no runtime dependencies. It does not contain Telegram- or VK-specific code.
License
Apache-2.0