Aoi.MySQL makes it simple to connect your Aoi.js Discord bot to a MySQL database. With support for mysql2, you get reliable and fast database operations, perfect for any Aoi.js bot project
npm install aoi.mysql
const { AoiClient } = require('aoi.js');
const { Database } = require('aoi.mysql');
const client = new AoiClient({
token: 'TOKEN',
prefix: 'PREFIX',
intents: ['Guilds', 'GuildMessages', 'GuildMembers', 'MessageContent'],
events: ['onMessage', 'onInteractionCreate'],
disableAoiDB: true // ⚠️ THIS IS IMPORTANT, ensure it's set to true. You can't use both at once.
});
new Database(client, {
url: 'mysql://...', // YOUR MYSQL SERVER URI
tables: ['main']
});
client.variables({
key: 'value' // ⚠️ THIS IS IMPORTANT, you need to place this client variables under database settings.
});
• • •
Want to keep your aoi.db database? or transfer your aoi.db database?
✋ NOT POSSIBLE YET!