npm i @aoijs/aoi.canvas
yarn add @aoijs/aoi.canvas
pnpm add @aoijs/aoi.canvas
1const { AoiClient } = require("aoi.js");2const { AoiCanvas } = require("aoi.canvas");3 4const client = new AoiClient({5 intents: ["Guilds", "GuildMessages", "MessageContent"],6 events: ["onMessage", "onInteractionCreate"],7 prefix: "Discord Bot Prefix",8 token: "Discord Bot Token",9 database: {10 type: "aoi.db",11 db: require("@aoijs/aoi.db"),12 dbType: "KeyValue",13 tables: ["main"],14 securityKey: "a-32-characters-long-string-here"15 }16});17 18const canvas = new AoiCanvas(client);19 20// Ping Command Example21client.command({22 name: "ping",23 code: `Pong! $pingms`24});25 26// Canvas Command Example27client.command({28 name: "house",29 code: `30$attachCanvas[mycanvas]31$drawLines[mycanvas;draw;#03a9f4;10;50;140;150:60;250:140]32$fillRect[mycanvas;#03a9f4;130;190;40;60]33$strokeRect[mycanvas;#03a9f4;75;140;150;110]34$createCanvas[mycanvas;300;320]35 `36})