dis-db
A mongoDB database manager designed for discord bots
Quick start
const disdb = ;let dataManger = connectUrl: "mongodb_connection_url" defaultPrefix: "!" let Quickstart = async { await dataManger; let prefix = await dataManger; console; // ! let newPrefix = await dataManger; console; // !! let mogLogID = await dataManger; console; // null let newModLog = await dataManger; console; // 123456789 let guildData = await dataManger; console; // { config: { prefix: '!!' }, id: '123' } let deleteData = await dataManger; console; // { config: { prefix: '!!' }, id: '123' } let fetchPing = await dataManger; console // Fetch ping in ms let createAndDeletePing = await dataManger; console // { create: pingInMs, delete: pingInMs } } ;
Emits
connecting
connected
disconnecting
disconnected
uninitialized
Example
dataMangerevents
All functions
/* Fake emits */ /* Data manger */ // Retunrs the guilds prefix // Changes a guilds prefix and returns new prefix // Retunrs the modlog // Changes the modLog and retunrs the new modLog data // Retunrs a guilds data // If data was deleted it returns the data /* Others */ // Returns the ping in ms // Ping object
Support server => Click me