4.9.0 • Published 6 months ago

aoijs.mysql v4.9.0

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

NPM downloads   NPM version   NPM License

npm install aoijs.mysql
const { AoiClient } = require('aoi.js');
const { Database } = require('aoijs.mysql');  // Import the Aoi.MySQL package

const client = new AoiClient({
    token: 'YOUR_TOKEN',
    prefix: 'YOUR_PREFIX',
    intents: ['Guilds', 'GuildMessages', 'GuildMembers', 'MessageContent'],
    events: ['onMessage', 'onInteractionCreate'],
    database: { ... },  // Your Aoi.DB options
    disableAoiDB: true | false  // Set to true if using only Aoi.MySQL
});

// Initialize the MySQL Database
new Database(client, {
    url: 'mysql://YOUR_DATABASE_URL',  // Replace with your MySQL server URI
    tables: ['main'],  // Specify your database tables
    keepAoiDB: true | false,  // Set to true to use both aoi.db and MySQL
    debug: true | false  // Set to true for debug information during development
});

// Client variables setup
client.variables({
    key: 'value'  // Define client variables here
});

// Continue with the rest of your bot's setup...

📁 Keep Your Aoi.DB Database

If you have an existing aoi.db database, you can continue to use it alongside aoijs.mysql. Just ensure that your setup is correctly configured:

const client = new AoiClient({
    // ... Your client options
    database: { ... },  // Your Aoi.DB options
    disableAoiDB: false  // Must be false to use both databases
});

// Initialize the MySQL Database
new Database(client, {
    // ... Your MySQL database options
    keepAoiDB: true  // This should be set to true
});

And these functions can only work if you set keepAoiDB to true

$mysqlAdvanceCooldown
$mysqlChannelCooldown
$mysqlCloseTicket
$mysqlCooldown
$mysqlCreateTemporaryVar
$mysqlDatabasePing
$mysqlDeleteVar
$mysqlGetChannelVar
$mysqlGetCooldownTime
$mysqlGetGlobalUserVar
$mysqlGetGuildVar
$mysqlGetLeaderboardInfo
$mysqlGetMessageVar
$mysqlGetTimeout
$mysqlGetUserVar
$mysqlGetVar
$mysqlGlobalCooldown
$mysqlGlobalUserLeaderBoard
$mysqlGuildCooldown
$mysqlGuildLeaderBoard
$mysqlIsTicket
$mysqlIsVariableExist
$mysqlNewTicket
$mysqlRawLeaderboard
$mysqlResetGlobalUserVar
$mysqlResetGuildVar
$mysqlResetUserVar
$mysqlSetChannelVar
$mysqlSetGlobalUserVar
$mysqlSetGuildVar
$mysqlSetMessageVar
$mysqlSetUserVar
$mysqlSetVar
$mysqlStopTimeout
$mysqlTimeoutList
$mysqlUserLeaderBoard

📂 Migrating from Aoi.DB

If you're considering transferring your aoi.db database to MySQL, 🚫 Migration Is Not Currently Possible!

4.7.0

6 months ago

4.9.0

6 months ago

4.8.0

6 months ago

4.5.0

7 months ago

4.6.0

6 months ago

4.0.0

7 months ago

3.0.0

7 months ago

2.0.0

7 months ago

1.0.0

8 months ago