@evodev/discord.db
v1.0.0
Published
Make database that store information in discord.
Downloads
2
Readme
Discord.DB
Is package to store datas in discord messages.
Methods
DB(client/config, config?)
- client/config (Discord#Client/Object [JSON])
- config (Object [JSON])
To make new db.
Example:
const DBC = require("@evodev/discord.db");
const db = new DBC({
token: "TOKEN",
channelID: "channelIDForDatabase"
});
db#create()
Create a variable. (WIll return a key)
Example:
await db.create(); ///XXXXXXXXXXXXXX
db#set(key, value, path)?
- key (String/Object)
- value (Non Circular Object/String/Number)
- path (String/Object)
To set value.
Example:
await db.set("1901", 0, "count");
db#get(key, path?)
- key (String/Object)
- path (String/Object)
To get value of variable.
Example:
await db.get("xxxxxx", "count");
db#push(key, value, path?)
- key (String/Object)
- value (String/Non Circular Object/Number)
- oath (String/Object)
To push a value.
Example:
await db.push("xxxx", [], "test");
db#keys(key, path?)
- key (String/Object)
- oath (String/Object)
To get keys.
Example:
await db.keys("xxxxxx:", "test");
db#values(key, path?)
- key (String/Object)
- oath (String/Object)
To get values.
Example:
await db.values("xxxxxx:", "test");