Questions tagged [quick.db]

Quick.db is an easy to use database wrapper for better-sqlite3. Use this tag for questions about the usage of quick.db.

Quick.db is an easy to use database wrapper for better-sqlite3, it was designed to be simple to let new users who are just getting into development and don't want to worry about learning SQL just quite yet.

better-sqlite3 is a Node.js library for SQLite3.

129 questions
0
votes
1 answer

I have a better_sqlite3.node error when i require quick.db

i dont have errors when i install but when i require quick.db in my main.js (its a discord.js bot in v12) const db = require('quick.db') i have an better_sqlite3.node error in my terminal -C:\Users\Fatsah\Desktop\Wizzy…
0
votes
1 answer

How to check if a specific thing exists in quick.db?

So i was making a discord game bot where you collect chracters by opening chests, but the problem is that the characters appear again when you already have them. I used the method db.push the code: if(has === true){ console.log(has) let embed =…
Tahmid GS
  • 1
  • 1
0
votes
1 answer

how to make quick.db read async

I want to make this read calls async. It should output to the console 'finish' and then 'done'. But the script wait first to finish the loop. Why it's not working? const db = require('quick.db'); var balance = null; var items =…
0
votes
1 answer

Check if a user has a specific object with quick.db

Hello I am trying to check if someone has an object in his inventory witch quick.db But when I try, whatever the artist is it always says that it's the inventory of the user. Here's the code that I use. const db = require('quick.db'); let discord =…
Cryopt
  • 29
  • 6
0
votes
1 answer

How to list stored data using quick db?

I trying to make list command to list the stored data for this code , I tried a lot but it doesn't work for me, client.on("message", message=>{ if(!message.guild)return; if(message.content.startsWith(prefix + "add")){ let user =…
Sarite
  • 41
  • 6
0
votes
2 answers

store a username in a quick.db database

I want to store a word that was provided as an arg after a command from a user in a quick.db database. I'm pretty new to quick.db and it's my first time using it. Can someone help? Thank you sm!
Jan
  • 29
  • 7
0
votes
1 answer

Quick.db + Discord.js Leader Board

Hello I Was Making A Leader Board For My Xp System And The Points One Worked! But The Mention Gives An Unknown Id And Its The Same Always Here Is What It Shows So The Code Is In Quick.db If You Can Help Me It Would Mean The World For…
0
votes
1 answer

how do i filter a data in quickmongoi so that it would show only names of users who are in the guild only in the leaderboard command

js and quickmongo for a leaderboard command but it shows the named of all the users in the database and I want it to show names of users who are in the guild only. Any help is highly appreciated . I tried filtering it too... My current code const…
0
votes
1 answer

How do I compare the ID of the new members with the ones in the database?

I am trying to make a jail command when the members who has this role leave the server and rejoin again the role stay with them ,i want when new members enter the server to compare their ID with the one in the database, if is it true it gives a role…
Sarite
  • 41
  • 6
0
votes
1 answer

How can I make it where if you have multiple of an item, it shows like "Fishing Pole (x3)"? [Inventory Command]

One question, how can I make it where if you have multiple of an item, it shows like "Fishing Pole (3)"? << change the 3 to for number of items Since Discord will return with an error if the embed reaches over the max size. Thanks! Inventory…
Fl1ck
  • 35
  • 3
0
votes
2 answers

Trouble sending DM to Message to stored user in DB discord.js

So Im making a ticket command and when you say .new it will open a channel and store message.author so it can dm you a transcript later on when you close it. When I log Console.log(message.author) and the stored person in the db, the message.author…
Chuli
  • 3
  • 1
0
votes
1 answer

how to fix that quick.db doesn't make a negative output

I am doing an economic system at my discord bot. It went well but when I use some subtract command or withdraw command or your balance will be subtract it got to negative number like I minus my balance to 50 but my balance is only 25 now my balance…
0
votes
1 answer

sorting data from quick.db

const db = require('quick.db') let data = db.get(`someidhere.reviews`).sort((a, b) => b.data - a.data) data.length = 5; var final = ""; var i = 0; for (i in data) { final += `${data[i]} \n` } message.channel.send(final ||…
tekeke
  • 133
  • 3
  • 15
0
votes
1 answer

trying to make a leaderboard command and got this error TypeError: Cannot read property 'split' of undefined

const { MessageEmbed } = require('discord.js'); const fs = require('fs'); const db = require('quick.db'); const bot = ('Discord.Client') module.exports = { name: 'leaderboard', description: "idk something", execute(message, args)…
nebula
  • 1
  • 1
0
votes
1 answer

target is not a number quick.db

I am trying to update a value every so often, but now a line of code that was function is showing up the error: target is not a number const db = require('quick.db'); module.exports = { name: 'farmstart', description: 'Gives you your first…
Devalina
  • 11
  • 2
1 2 3
8 9