srbatatadb
v1.1.2
Published
Downloads
13
Maintainers
Readme
SrBATATA-DB
Banco de dados online para vc!
Discord
Como usar?
// Para conseguir um token, abra um ticket no servidor do discord.
const {DB} = require("srbatatadb")
const db = new DB("SEU-TOKEN","NOME-DB")
// CUIDANDO DE TUDO
let value = db.get("a") // pontapé de tudo
value.set(1) // seta o dado a para 1
value.add(3) // Adiciona 3 no dado a
value.subtract(2) // Remove 2 do dado a
console.log(value.get()) // Lê o dado a - Resultado esperado: 6
// CUIDANDO DE ARRAY
let valor1 = db.get("b") // pontapé de tudo
// seta a variável b como um array
valor1.set([])
// adiciona oi no array da variável b
valor1.push("oi")
// adiciona sim no array da variável b
valor1.push("sim")
// remove o primeiro valor do array
valor1.slice(1)
// verifica a variável b
console.log(valor1.get())
// CUIDANDO DE JSONS
let valor2 = db.get("p") // pontapé de tudo
valor2.set({}) // criando o json
valor2.setvalue("a",1) // setando o valor a do json p para 1
console.log(valor2.getvalue("a")) // resultado esperado: 1
db.End() // acaba o processo da db
Ah, deu um problema, oque faço?
- Simples! Reporte para o suporte no servidor do discord
Como consigo um token?
- Abra um ticket no servidor de suporte!