Connect your game to Cooky

There are two ways in. Pick the simple one first.

WebhooksRich cardsBotsExamplesLimitsRules

WebhookBot
Good forPosting news, scores and alerts into one channelReading and posting across servers, commands, game links
SetupServer settings → Webhooks → CreateDevelopers → Create app → share the install link
SecretThe webhook linkThe bot token

Webhooks

A server owner or moderator opens Server settings → Webhooks, picks a channel and copies the link. Anything that can send a web request can then post into that channel.

curl -X POST "https://cooky.jievienne.com/api/webhooks/ID/SECRET" \
  -H "content-type: application/json" \
  -d '{"username":"Arena Stats","content":"🏆 Team Caramel wins 3-1!"}'
FieldWhat it does
contentMessage text, up to 2000 characters.
usernameOptional name shown on the message (up to 40 characters).
embedsOptional list of up to 5 rich cards (below).

🔐 Treat the webhook link like a password. Keep it on your game server, never inside a game client or a public repo. If it leaks, delete the webhook and make a new one.

Rich cards (embeds)

{
  "content": "Match finished!",
  "embeds": [{
    "title": "🏆 Team Caramel wins",
    "description": "Final score **3 – 1**",
    "url": "https://example.com/match/123",
    "color": 15241530,
    "fields": [
      { "name": "MVP", "value": "Rae", "inline": true },
      { "name": "Eliminations", "value": "12", "inline": true }
    ],
    "footer": { "text": "Season 4 · Ranked" }
  }]
}

Limits: title 256, description 2000, up to 10 fields (name 100, value 500), footer 200. Links must start with https://. color is a number, for example 0xE8913A = 15241530.

Bots

  1. In Cooky, tap </> next to Messages to open Developers, and create an app.
  2. Copy the bot token. You only see it once. You can make a new one any time, which turns the old one off.
  3. Tap Install link and send it to server owners. They choose a server and the bot joins it.

Every request sends the token in a header:

Authorization: Bot APP_ID.SECRET
RequestWhat it does
GET /api/v1/meYour bot's id and name.
GET /api/v1/serversServers your bot is in, with their channels.
GET /api/v1/channels/{id}/messages?after={messageId}Recent messages. Use after to only get new ones; poll every few seconds.
POST /api/v1/channels/{id}/messagesPost a message: {"content", "embeds", "reply_to"}.

Examples

Roblox (server Script, HTTP requests turned on in Game Settings)

local HttpService = game:GetService("HttpService")
local WEBHOOK = "https://cooky.jievienne.com/api/webhooks/ID/SECRET" -- keep on the server only

local function announce(text, title, color)
  local ok, err = pcall(function()
    HttpService:PostAsync(WEBHOOK, HttpService:JSONEncode({
      username = "My Game",
      content = text,
      embeds = { { title = title, color = color or 0xE8913A } },
    }), Enum.HttpContentType.ApplicationJson)
  end)
  if not ok then warn("Cooky post failed: " .. tostring(err)) end
end

game.Players.PlayerAdded:Connect(function(p)
  announce(p.DisplayName .. " joined the game 🍪")
end)

JavaScript (Node 18+)

const TOKEN = process.env.COOKY_TOKEN, API = 'https://cooky.jievienne.com/api/v1';
const call = (p, o = {}) => fetch(API + p, { ...o, headers: { authorization: 'Bot ' + TOKEN, 'content-type': 'application/json' } }).then(r => r.json());

const { servers } = await call('/servers');
const channel = servers[0].channels[0].id;
let after = 0;
setInterval(async () => {
  const { messages } = await call(`/channels/${channel}/messages?after=${after}`);
  for (const m of messages) {
    after = Math.max(after, m.id);
    if (m.content === '!ping') await call(`/channels/${channel}/messages`, { method: 'POST', body: JSON.stringify({ content: 'pong 🍪', reply_to: m.id }) });
  }
}, 3000);

Python

import requests
requests.post("https://cooky.jievienne.com/api/webhooks/ID/SECRET",
              json={"content": "Server is back online ✅"}, timeout=10)

Limits

Each webhook can post 30 messages a minute, and each bot can post 30 messages a minute. Going over returns 429; wait and try again. Errors come back as JSON: {"error": "…"}.

Rules for bots

🍪 Cooky · Created by Jievy • Jievienne AI