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
1
vote
1 answer

How to download heroku running file?

Is there any possibility to download running app file? Im using quick.db for my discord bot database and I need that running json database file with user data before restarting. When I will deploy a new build, then the old json database file from…
1
vote
1 answer

A simple database command using quick.db

Question I'm kind of new to quick.db and I want to make a command to set values for a user by !add <@user> and when I use !total <@user> it shows all the values of the user in an embed. I've given my code below. It adds the values to the…
Darshan B
  • 658
  • 1
  • 5
  • 19
1
vote
2 answers

How to remove an item from a table?

How to add a counter to items in a quick.db table? db.set('myItems', ['Blue', 'red']) const content = db.get('myItems') channel.send(content) I get the output as: Blue Black Red I expect the output to be like this: 1 Blue 2 Black 3 Red How to…
1
vote
2 answers

Discord.js sending a message to every channel id stored in the database

I'm trying to make a command that sends a message to every channel id stored using quick.db db.set(`channelID_${message.guıld.ıd}`, message.channel.id) so this is how i would store channel id is there a possible way to send a message to every…
Meme Loke
  • 97
  • 1
  • 9
1
vote
2 answers

Issues with autorole using Quick.db (Discord.js)

I'm trying to make an autorole code using quick.db, but it returns the error: UnhandledPromiseRejectionWarning: TypeError [INVALID_TYPE]: Supplied roles is not a Role, Snowflake or Array or Collection of Roles or Snowflakes My "setautorole"…
davi0880 _
  • 35
  • 4
1
vote
0 answers

How to search for Specific item in User's Quick.db Inventory

Pretty much, I'm having difficulty being able to find a role in a user's Quick.db inventory. I'd like to do this to: allow them to only buy a role once; allow them to equip an owned role only if it's found in their inventory. Problem is that the…
washingm
  • 87
  • 1
  • 11
1
vote
0 answers

I can't install the package quick.db

I'm new to this platform and new to coding so please be kind :3 maybe it's just a dumb error or something, :| This is what happens when I use "npm i quick.db" to install the package. If it's a code error please tell me :3 it says something about…
pixxel
  • 11
  • 1
1
vote
0 answers

Discord.js Quick.db highlight command

I've been trying to make a Discord.JS Highlight command which basically when a specified word is said it DMS you saying that word was said. I'm trying to make it work for multiple servers I've tried as much as I can and it's not working any help…
LinusDropTips
  • 71
  • 1
  • 1
  • 4
1
vote
0 answers

Discord.js Leaderboard command not working

I've been trying to get this command to work, but when I execute it, it doesn't send anything and it doesn't even give me an error message. Help would be much appreciated :) const db = require('quick.db'); const Discord =…
chickenloveryt
  • 43
  • 1
  • 2
  • 8
1
vote
2 answers

Trying to make a leader board command for my discord.js bot but all values stay 0 except for the first place value

So I'm trying to make a leader board command for my xp system using quick.db in my discord.js bot. The code for the command: const db = require("quick.db"); const Discord = require("discord.js"); let firstplace = 0; let…
xeretis
  • 65
  • 1
  • 8
1
vote
1 answer

TypeError: db.startsWith is not a function

I want a leaderboard of users on my server but here is error in db.startsWith :(( maybe in a new version quick.db ? const Discord = require("discord.js"); const db = require("quick.db"); module.exports.run = async (bot, message, args) => { let…
te1m0z
  • 11
  • 2
  • 3
1
vote
0 answers

I installed the quick.db, but it still doesn't working

internal/modules/cjs/loader.js:983 throw err; ^ Error: Cannot find module 'quick.db' Require stack: - C:\Users\Igor\github\litchbot\index.js My dependencies: "dependencies": { "discord.js": "^12.2.0", "fs": "0.0.1-security", …
Duca
  • 87
  • 9
1
vote
1 answer

Using quick.db to store username change history

So I know this is possible because I've seen some bots do it, including logger bot where it shows all previous username change history if someone joins your server, or when you trigger a command such as -username @somediscord it fetches the audit…
havap
  • 9
  • 3
0
votes
0 answers

getting undefined on discord from getting db

here is my cmd code i want to get this items on sepretaly ways like closed - acceptedby or ... { id: 'tickets_1083331733912559716', value: { id: 136, category: [Object], reason: 'No reason provided', creator:…
AminCoder
  • 11
  • 1
0
votes
1 answer

How to get result after filter db on discord.js?

I want to get the result from filter of db but I got undefined and I don't know why. const IDD = discordsearchf const all = (await client.db.all()).filter(data => data.id.startsWith("tickets_")); const mfilter = all.filter(data => data.value.creator…
AminCoder
  • 11
  • 1
1
2
3
8 9