K
Docs
Building Bots

🎞️ The Darkroom

Images for your bot. Grab avatars and pictures from any message, design rank cards and welcome bannersin the Studio, touch them up, and send them back — animated GIFs included. Unboxing it also unlocks your bot's Gallery.

🎁 Free to unbox · works on Interaction Only bots

🧰What's in the box

📥Getting pictures in

Image fields take any of these — no download piece needed:

WriteGets youWhere
{{user.avatar}}Whoever triggered the flowEvery flow
{{member.avatar}}The member who joined / left (server avatar first)Member triggers
{{target.user.avatar}}Whoever was right-clickedRight-click spells
{{target.message.image}}First picture on the right-clicked messageRight-click a message
{{message.image}} · {{message.images}}Pictures on the message that fired the triggerNew / edited message (Full Bot)
{{options.picture}}A file someone uploaded with your spell (File / image input)Slash spells
{{guild.icon}}The server's iconEvery flow
gallery:welcome-bannerAn image from your Gallery, by labelEvery flow
✨Right-click spells
Make a spell of kind Right-click a messageand it shows up in Discord's Apps menu on every message — the perfect way to read a picture out of any conversation. See Spells.

🎨The Studio

Design an image once; the bot develops a personalised copy every run.

Drop a Develop in Studio piece and hit Open the Studio. Lay out avatars, text, shapes and progress bars on a canvas, then put sparks wherever things should change — {{user.displayName}} in a text layer, {{vars.xp}} in a progress bar, {{avatar}} as a picture. Preview as… lets you try any name, number or picture before you go live.

🏅 Rank card👋 Welcome banner🪪 Profile card💬 Quote card🤣 Meme🏆 Achievement🤠 Wanted poster⬜ Blank canvas
  • Drag, resize (Shift keeps proportions), rotate, and snap to edges and centres.
  • Layers: pictures (circle / rounded / hexagon masks, rings, filters), text (12 fonts, auto-shrink, outlines, gradients), shapes, progress bars and rings.
  • Show only when… hides a layer unless a spark is truthy — a crown for rank #1, a badge for boosters.
  • If a picture in the design is an animated GIF (like an animated avatar), the result is an animated GIF too.
  • ⌘Z / ⇧⌘Z undo and redo · ⌘D duplicate · arrows nudge · space-drag to pan · ⌘-scroll to zoom.
a /rankcard flowJSON
{
  "nodes": [
    { "id": "read",   "piece": "base.db.read", "config": { "table": "xp", "filterColumn": "user_id", "filterValue": "{{input.user.id}}", "as": "result" } },
    { "id": "studio", "piece": "img.studio",   "config": { "as": "card", "scene": { "width": 934, "height": 282, "layers": ["…"] } } },
    { "id": "send",   "piece": "base.embed",   "config": { "title": "{{user.displayName}}'s rank", "image": "{{card}}" } }
  ]
}
📐Under the hood — how the bot develops it
TypeScript
// What the bot does for a Studio design, every run:
const canvas = createCanvas(934, 282);              // @napi-rs/canvas (Skia)
drawLayers(canvas, scene, { avatar, xp, level });   // same renderer as the Studio preview
const card = animatedAvatar
  ? encodeGif(frames)                               // GIF when a picture moves
  : await canvas.encode("png");
await interaction.editReply({ embeds: [embed], files: [{ attachment: card, name: "card.png" }] });

✂️Touch Up

Quick edits, applied top to bottom. GIFs stay animated.

✂️ Crop to a shape — Square, circle (great for avatars), widescreen or tall
📐 Resize — Make it bigger or smaller — leave one side blank to keep the shape
⬜ Round the corners — Soft corners, like an app icon
🔄 Rotate — Turn it by any angle
🪞 Flip — Mirror it left-to-right or upside down
🎚️ Adjust colours — Brightness, contrast, saturation, black & white, sepia, blur, pixelate…
🖼️ Add a border — A solid frame around the edge
💬 Meme captions — Big white Impact-style text, top and bottom
🍳 Deep-fry — Crank everything to eleven
⏩ Change speed — Play a GIF faster or slower
⏪ Play backwards — Reverse a GIF
🪃 Boomerang — Forwards then backwards, forever
❄️ Freeze frame — Keep only the first frame of a GIF

📤Sending pictures

Two ways, and both work everywhere a message goes out:

  • Embed — put an image spark in Big image, Thumbnail, or the author/footer icons. Pictures that already live online (avatars, the Gallery, links) are shown by URL; ones your flow made are uploaded with the message.
  • Attach Image — stages a file onto the next Reply, Follow-up, Send, DM, or Update the Message (where it replaces the old picture — great for "next" buttons). Alt text and spoilers included.

📏Limits

  • Pictures the bot downloads: up to 10 MB, PNG / JPEG / GIF / WebP. Links to private networks are blocked.
  • Studio canvases: 16–2048 px a side, 40 layers.
  • Animated results: up to 60 frames / 8 s. Too big for Discord? Frames get dropped first, then it sends a still.
  • 10 pictures per message. Image pieces can't run in a flow that opens a pop-up form — do the image work in the Form Submitted trigger.