Board Api
Your own bot can ask OFFlimits to draw a results board and get the picture back. Every board — including custom boards — is free for every server.
Usage
Send a POST request to https://api.offlimitsbot.com/api/board with the header Authorization: Bearer <your API key>.
| field | required | description |
|---|---|---|
server_id (or guild) | yes | the server id, or a serialised discord.js Guild |
board_number | yes | 1, 2 (text), 3, 4, 6, 7, 8 or 5 / "custom" for the server's custom board |
messages | no | results lines, e.g. ["[TEAM A] 1 12", "[TEAM B] 2 5"] |
channel_id | when no messages | a channel whose name contains results; OFFlimits reads its last 70 messages |
share_link | no | share link of a custom board (/setboard custom) |
server_name | no | name drawn in the board header |
The server's own points system (set with /setpoints or on the dashboard) is used.
Result
{ "image": "data:image/png;base64,iVBORw0KGgo..." }
Text boards (1 and 2) return { "content": "```...```" }; problems return { "error": "..." } with HTTP 422. Add ?format=png to the URL to get the PNG file itself instead of JSON.
Code Snippets
JavaScript
const { AttachmentBuilder } = require("discord.js");
const response = await fetch("https://api.offlimitsbot.com/api/board?format=png", {
method: "POST",
headers: { Authorization: `Bearer ${API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({
server_id: interaction.guild.id,
channel_id: resultsChannel.id, // or: messages: ["[TEAM A] 1 12", ...]
board_number: 3,
}),
});
if (!response.ok) throw new Error((await response.json()).error);
const attachment = new AttachmentBuilder(Buffer.from(await response.arrayBuffer()), {
name: "OFFlimits-board.png",
});
await interaction.editReply({ files: [attachment] });
Python
import aiohttp
async with aiohttp.ClientSession() as session:
async with session.post(
"https://api.offlimitsbot.com/api/board?format=png",
headers={"Authorization": f"Bearer {API_KEY}"},
json={"server_id": guild_id, "channel_id": channel_id, "board_number": 3},
) as resp:
png_bytes = await resp.read() # the board picture
