aoi.sqlite
v7.0.1
Published
Package which brings SQL support to aoi.js
Maintainers
Readme
aoi.sqlite
- Easy to use package for the implementation of SQLite in aoi.js with minimal changes.
Requires Node.js v14.21.1 or later.
Setup
To get started with aoi.sqlite, we have to do a couple things.
- Install the package.
npm install aoi.sqlite- Update your index.js file.
const { AoiClient, LoadCommands } = require("aoi.js");
const { Database } = require("aoi.sqlite");
const client = new AoiClient({
token: "DISCORD BOT TOKEN",
prefix: "DISCORD BOT PREFIX",
intents: ["Guilds", "GuildMessages", "GuildMembers", "MessageContent"],
events: ["onInteractionCreate", "onMessage"],
disableAoiDB: true // This is important, ensure it's set to true. You can't use both at once.
});
new Database(client, {
location: "./database.db", // your SQLite file location
tables: ["main"],
logging: true, // default is true
debug: true, // default is false
});
client.variables({
variable: "value"
}); // just like you did before.
// rest of your index.js..