Skip to content
Image & Canvas createCanvas

$createCanvas — Creates a canvas and makes it the current one; the optional code runs right away.

Creates a canvas and makes it the current one; the optional code runs right away.

Syntax

$createCanvas[name;width;height;(code)]

Parameters

  • name (String, required) — Canvas name
  • width (Number, required) — Width in pixels
  • height (Number, required) — Height in pixels
  • code (String, optional) — Code to run once the canvas exists

Return Value

  • None.

Usage

$createCanvas[name;width;height;code] → result

Example

$sendMessage[$createCanvas[name;width;height;code]]

Try it

Paste an example into the playground to preview its message (functions that act on Discord are not run), or build the same thing with blocks.