API documentation

Base URL: https://cmd-store.agi.bd

List commands
GET/miraistore/list

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
GET/miraistore/search

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
Trending
GET/miraistore/trending

Top commands sorted by likes, then views.

Query params: limit (default 3), framework, kind.

Get raw source
GET/raw/:id

Returns the raw rawCode as plain text for a given store ID.

Detect / preview classification
POST/miraistore/detect

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.

Upload / update a command
POST/miraistore/upload

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.js import, SlashCommandBuilder/interaction API usage, or an once: event-file field.
  • Telegram — detected from a telegraf / node-telegram-bot-api import, or ctx.reply / bot.sendMessage / bot.command call patterns.
  • GoatBot / Mirai — detected via a sandboxed scan of the real module.exports shape (Mirai's run() vs GoatBot's onStart()/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.

Increment install count
POST/miraistore/install/:id

Increments the install counter for a command.

Like a command
POST/miraistore/like/:id

Body: { "userID": "..." }. One like per userID.

Delete a command
POST/miraistore/delete/:id

Body: either { "secret": "ADMIN_SECRET_KEY" } to force-delete, or { "userID": "..." } matching the original uploader.

Developer profiles
GET/profile/:author

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.

GET/developers

Directory of every author who has published a command, ranked by command count.

Admin: reclassify all commands
POST/miraistore/reclassify

Re-runs framework/kind detection on every stored record and fixes stale values. Admin-secret protected. Pass ?dryRun=1 to preview.