Welcome! This guide assumes you have a basic understanding of aoi.js. It also assumes you defined your AoiClient as client
AoiClient
client
npm i aoi.mysql
yarn add aoi.mysql
pnpm add aoi.mysql
1// Import packages2const { AoiClient } = require("aoi.js");3const { Database } = require("aoi.mysql");4 5// Aoi.js client6const client = new AoiClient({7 token: 'TOKEN',8 prefix: 'PREFIX',9 intents: ['Guilds', 'GuildMessages', 'GuildMembers', 'MessageContent'],10 events: ['onMessage', 'onInteractionCreate'],11 disableAoiDB: true // ⚠️ THIS IS IMPORTANT, ensure it's set to true. You can't use both at once.12});13 14new Database(client, {15 url: 'mysql://...', // YOUR MYSQL SERVER URI16 tables: ['main']17});18 19client.variables({20 key: 'value' // ⚠️ THIS IS IMPORTANT, you need to place this client variables under database settings.21});22 23 24 25• • •
Want to backup your aoi.db database? or transfer your aoi.db database? 🤚 NOT POSSIBLE YET!