aoi.db-fixer

1.0.2 • Public • Published

aoi.db-fixer


Imagine a package, where you can recover your local aoi.js database, this is our function, with this package, you can recover your corrupted or no longer defined database

How to recover?

First, just get the main folder from your database Second, delete your old database and start Third, after starting, aoi.js will create a new database, that's all we need Fourth, place the old folder called main in the new database

Usage example:

const { AoiClient } = require("aoi.js");
const { DatabaseBackup } = require("aoi.db-fixer");

const client = new AoiClient({
    token: "Discord Bot Token",
    prefix: "!",
    intents: ["MessageContent", "Guilds", "GuildMessages"],
    events: ["onMessage", "onInteractionCreate"],
    database: {
        type: "aoi.db",
        db: require("@aoijs/aoi.db"),
        dbType: "KeyValue",
        tables: ["main"],
        securityKey: "a-32-characters-long-string-here"
    }
});

const dbBackup = new DatabaseBackup(client, {
    pathTo: "path", // path to your database
    table: "main" // only adjust if necessary
}); // everything ok to start

Aoi.js credits to leref

Package Sidebar

Install

npm i aoi.db-fixer

Weekly Downloads

0

Version

1.0.2

License

ISC

Unpacked Size

5.2 kB

Total Files

3

Last publish

Collaborators

  • sunnyshine_.