API documentation
Base URL: https://cmd-store.agi.bd
Returns a paginated, framework-grouped list of stored commands.
Query params: limit (default 20), offset (default 0), framework (goat | mirai | other), kind (command | event), legacy type (e.g. goat-command).
GET /miraistore/list?framework=goat&limit=10
Search by name (exact → prefix → substring → fuzzy fallback), numeric ID, author, or category.
Query params: q, author, category, framework, kind, limit, offset.
GET /miraistore/search?q=antispam&framework=goat
Top commands sorted by likes, then views.
Query params: limit (default 3), framework, kind.
Returns the raw rawCode as plain text for a given store ID.
Runs the exact same syntax check, framework/kind detection, and metadata extraction as upload — but saves nothing. Useful for a bot to preview how a file will be classified before actually publishing it via /miraistore/upload.
Body (JSON): rawCode (or rawUrl).
Returns: framework, kind, name, author, version, category, aliases, description — or a syntaxError.
Uploads a new command or updates an existing one (same author + name + framework, higher version required).
Body (JSON):
{
"rawCode": "your bot's command/event file, as a string",
"rawUrl": "optional, used only if rawCode is absent",
"uploaderID": "optional platform user ID of the uploader",
"framework": "goat | mirai | discord | telegram | other (optional, auto-detected if omitted)",
"kind": "command | event (optional, auto-detected if omitted)"
}
You never need to tell the API which framework the file belongs to — just send the raw code. Detection happens entirely server-side:
- Discord — detected from a
discord.jsimport,SlashCommandBuilder/interaction API usage, or anonce:event-file field. - Telegram — detected from a
telegraf/node-telegram-bot-apiimport, orctx.reply/bot.sendMessage/bot.commandcall patterns. - GoatBot / Mirai — detected via a sandboxed scan of the real
module.exportsshape (Mirai'srun()vs GoatBot'sonStart()/onChat()), with a config-field regex fallback. - Anything that doesn't confidently match one of the above is stored as
other.
You can still force the bucket explicitly by sending framework/kind — auto-detection only runs when they're omitted. A JavaScript syntax error is rejected before saving either way.
Increments the install counter for a command.
Body: { "userID": "..." }. One like per userID.
Body: either { "secret": "ADMIN_SECRET_KEY" } to force-delete, or { "userID": "..." } matching the original uploader.
Server-rendered profile page for a single author — every command they've published, plus total likes/views/installs. Auto-created the moment an author has at least one command; there's nothing to set up separately.
Directory of every author who has published a command, ranked by command count.
Re-runs framework/kind detection on every stored record and fixes stale values. Admin-secret protected. Pass ?dryRun=1 to preview.