aoi.canvas is a aoi.js extension that allows you to utilize canvas functions with aoi.js bot.
npm install @aoijs/aoi.canvas
const {AoiClient} = require("aoi.js");
const {AoiCanvas} = require("@aoijs/aoi.canvas");
const client = new AoiClient({
intents: ["Guilds", "GuildMessages", "MessageContent"],
events: ["onMessage", "onInteractionCreate"],
prefix: "Discord Bot Prefix",
token: "Discord Bot Token",
database: {
type: "aoi.db",
db: require("@aoijs/aoi.db"),
dbType: "KeyValue",
tables: ["main"],
securityKey: "a-32-characters-long-string-here"
}
});
const canvas = new AoiCanvas(client);
// Ping Command Example
client.command({
name: "ping",
code: `Pong! $pingms`
});
If you have any questions or need help, ask in the official aoi.js server.
Enjoy coding with aoi.canvas! ❤