aoi.fb - A Firebase database of wrapper using aoi.fb as API
npm install aoi.fb
sh-session
npm install aoi.fb
`
Aoi.js v5.1.0 or newer is required. Check how to use in Package.json
$3
Then, in your index file, configure aoi.fb:
`js
const aoifb = require("aoi.fb")
const firebase = aoifb.Create({
apiKey: "",
authDomain: "",
databaseURL: "",
projectId: "",
storageBucket: "",
messagingSenderId: "",
appId: "",
measurementId: ""
})
const aoijs = require("aoi.js")
const bot = new aoijs.Bot({
token: "TOKEN", // Discord Bot Token
prefix: "PREFIX",// Discord Bot Prefix
intents: ["GUILDS", "GUILD_MESSAGES"], //Discord Bot Intents
database: {
type: "aoi.fb",
db: firebase
} // Change database to aoi.fb
})
// LoadCommands
const loader = new aoijs.LoadCommands(bot);
loader.load(bot.cmd, './Commands/', false)
// Events
bot.onMessage();
bot.onMessageUpdate();
bot.onMessageDelete();
bot.onInteractionCreate();
// Command Example for Database Latency
bot.command({
name: "ping",
code: Pong!
})
bot.readyCommand({
channel: "",
code: $log[Ready on $userTag[$clientID]]
})
``
aoi.fb - A Firebase database of wrapper using aoi.fb as API
Copyright © 2022 @MiraiDevelopment