Skip to content

Latest commit

 

History

History
52 lines (41 loc) · 1.54 KB

README.md

File metadata and controls

52 lines (41 loc) · 1.54 KB

Aoi.MySQL


NPM downloads   NPM version  


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.


Installation

npm install aoi.mysql

Setup

const { AoiClient } = require('aoi.js');
const { Database } = require('aoi.mysql');

const client = new AoiClient({
    token: 'client_token',
    prefix: 'client_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.
});

const db = new Database(client, {
    url: 'mysql://...', // your MySQL server uri
    tables: ['main']
});


// rest of your index.js..