All templates

Messaging

Mock the Discord API

Build a bot without a test server full of debug messages.

3 routes · live immediately · no account needed

Discord bots are awkward to develop against: you need a server, a bot token, and somewhere to put the messages you send while getting it wrong. These routes return Discord's message object — the snowflake ids as strings, the numeric type, the nested author — so you can build and test the sending and reading paths before a real token is anywhere near your code.

What you get

POST/api/v10/channels/{channel_id}/messagestemplated200 OK
GET/api/v10/channels/{channel_id}/messages/{message_id}templated200 OK
DELETE/api/v10/channels/{channel_id}/messages/{message_id}204 No Content

Response template

POST /api/v10/channels/{channel_id}/messages

Values in double braces are rendered per request.

{
  "id": "334385199974967042",
  "type": 0,
  "content": "{{ request.body.content }}",
  "channel_id": "{{ request.path_params.channel_id }}",
  "author": {
    "id": "53908099506183680",
    "username": "Mason",
    "discriminator": "9999",
    "avatar": "a_bab14f271d565501444b2ca3be944b25"
  },
  "timestamp": "{{ now_iso() }}",
  "edited_timestamp": null,
  "tts": false,
  "mention_everyone": false,
  "attachments": [],
  "embeds": [],
  "pinned": false
}

Good for

  • Develop a Discord bot without a token or a test server
  • Assert on the exact payload your bot sends, in the Inspector
  • Run bot tests in CI with no Discord connection

Response payloads are representative examples using this API's real field names and object shapes, not an exhaustive replica of its schema. MockBase is an independent tool and is not affiliated with, endorsed by, or sponsored by Discord.