mirror of
https://github.com/tiennm99/miti99bot.git
synced 2026-04-17 19:22:09 +00:00
Each module now has a README.md documenting commands, architecture, and database schema (KV keys, JSON structure, field descriptions). Trading README enhanced with full schemas for user portfolio and price cache objects.
Misc Module
Health check and DB demonstration. Exercises all three visibility levels.
Commands
| Command | Visibility | Description |
|---|---|---|
/ping |
public | Health check — replies "pong" and records timestamp |
/mstats |
protected | Shows last /ping timestamp |
/fortytwo |
private | Easter egg — replies "The answer." |
Architecture
/pingwrites a timestamp to KV on every call (best-effort — KV failure doesn't block the reply)./mstatsreads the last ping timestamp and formats it as ISO string./fortytwois a hidden command demonstrating private visibility.
Database
KV namespace prefix: misc:
| Key | Type | Description | Example |
|---|---|---|---|
last_ping |
JSON | Timestamp of the most recent /ping call |
{ "at": 1713100000000 } |
Schema: last_ping
{
"at": 1713100000000
}
at— Unix epoch milliseconds (Date.now())