Package Exports
- @akarui/aoi.panel
- @akarui/aoi.panel/src/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@akarui/aoi.panel) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@akarui/aoi.panel
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.");
})