Skip to content

tyowk/aoi.mysql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Aoi.MySQL


NPM downloads   NPM version   NPM License


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: '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.
});



  

❓ DOCUMENTATION

Aoi.DB

Want to keep your aoi.db database? or transfer your aoi.db database?
✋ NOT POSSIBLE YET!








Made with ♥️ by Tyowk
Inspired by Fafa