0.0.9 • Published 2 months ago
@akarui/aoi.panel v0.0.9
Table of Contents
Installation
npm i @akarui/aoi.panel
Setup
const {Panel} = require("@akarui/aoi.panel")
const {AoiClient} = require("aoi.js");
const client = new AoiClient({
intents: ["MessageContent", "Guilds", "GuildMessages"],
events: ["onMessage", "onInteractionCreate"],
prefix: "Discord Bot Prefix",
token: "Discord Bot Token",
database: {
type: "aoi.db",
db: require("@akarui/aoi.db"),
dbType: "KeyValue",
tables: ["main"],
securityKey: "a-32-characters-long-string-here",
}
});
client.loadCommands("./commands/", true);
const panel = new Panel({
port: 3000,
client: client
})
panel.loadAPI({
auth: "Authentication-Key"//No spaces, keep it only alphanumeric.
})
panel.loadGUI({
username: ["username 1"],
password: ["Password 1"],
})
Adding Multiple Users
panel.loadGUI({
username: ["username 1", "username 2", "username 3"],
password: ["Password 1", "Password 2", "Password 3"],
})
Making Custom Pages
const app = panel.app;
app.get("/example", (req, res) => {
res.send("This is an example page.");
})