Disdata
token
dbname
(optional, defaultnull
)
This is a modified version of Disdata that includes caching to reduce the load on the discord API.
const Disdata = require('disdata');
async function main(){
const db = new Disdata("NzE3NzI2Njgz.x.x.x.ClUADtk")
await db.login()
await db.useDB("test")
// console.log(await db.inviteDB())
await db.set("hello","World")
console.log("Hello =>"+await db.get("hello"))
}
BotToken
string? Bot token (optional, defaultthis.token
)
Returns Promise
name
string? name of db (optional, defaultthis.dbname
)
Returns Promise
name
string? Name of the DB (optional, defaultthis.dbname
)createIfNotExist
boolean create database if note exist (optional, defaulttrue
)
Returns Promise
key
stringdata
string (use JSON.stringify for object)editIfAlredyExist
boolean edit key if already used (optional, defaulttrue
)
Returns Promise
Returns Promise
key
string
Returns Promise<String> Data of this key
key
string
Returns Promise<Boolean> Boolean if key exist
key
string
Returns Promise