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
0 answers

Discord.js v14 - db.get is not a function when getting guild prefix

I created an event for messageCreate for my discord bot, it looked entirely fine but then I started getting this: TypeError: db.get is not a function I thought quick.db might have updated it but it is still the same in the latest version so I…
0
votes
1 answer

How to use packages that require fs & path with React

I need to use quick.db package in my ReactAPP for hook, but React don't let use FS & Path, that is require for package I got this errors: ERROR in ./node_modules/file-uri-to-path/index.js 5:10-29 Module not found: Error: Can't resolve 'path' in…
0
votes
1 answer

Discord.js v14.3.0 creating an invitation to a given guild

i want create invite bot, but a lot errors. I use discord.js v14.3.0. Idk how repair this, in discord.js support any ideas. (for my bad english sorry but i from poland) My code: const Discord = require("discord.js") const { QuickDB } =…
Smkv 2022
  • 3
  • 2
0
votes
1 answer

How to use quick.db variable in client.users.fetch discordjs

I am trying to use a value (Discord User ID stored as a string) stored via quick.db in my code, but it returns me the error user_id: Value "[object Promise]" is not snowflake. I've spent hours trying to figure it out but it just doesn't work. If I…
0
votes
1 answer

Quick.db, SQLite database file wiping on Bot reboot. Discord.js

I'm trying to save a value of the server being "Down" or "Up", it seems to be working fine, however, when I clear the console, then run the bot again, it looks to have reset the database fully, is there a way to make the database, work like a normal…
Hamoodi youtube
  • 213
  • 1
  • 9
0
votes
1 answer

Quick.db .add function not working correctly

Im making an addmoney cmd for my discord bot but when the money, it gets added weirdly. Eg. normally it would be 200 if i add 100 and there was already 100 but im my occasion its 100100. Anyways code: const { QuickDB } = require('quick.db'); const…
stixyyST5
  • 89
  • 5
0
votes
1 answer

how to get a list of database in quick.db?

I want to get a list of a key inside my database I use db.set(`fuel_${car}`, amount of fuel) and then I want to get a list of all cars fuel, here is my code : /*set the fuel of lol9*/ client.on('message', async message => { if(message.content ===…
0
votes
1 answer

How to get a list of particular data from quickdb?

I'm trying to make list command to list the stored data for this code , I tried a lot but it doesn't work for me run: async (client, message, args) => { message.delete({ timeout: 1000 }) if (!client.config.bowner.includes(message.author.id))…
0
votes
1 answer

Discord.js bot error with repeated message that seemingly comes from nowhere

I am getting a problem where when i try to 1v1 someone, it continues to say "Looks like the user you are trying to 1v1 is passive!" This is using the latest version of quick db and discord js. I am guessing this is just a silly mistake i made when…
J3B
  • 15
  • 2
0
votes
0 answers

Access every variable individually in quick.db?

I code a discord bot in discord.js and I have an economy with hunger and fun as a variable. I want those variables to decrease over time, and I would need a for loop to do this, but I don't know how I would access every single account hunger…
0
votes
1 answer

Discord.js command cooldowns with ms and quick.db

I want to set cooldown on the /rep command. But I have the problem. When user use command, the cooldown is correct. But when user run command secondly, the second cooldown is wrong, it is 52 years but it must be 12 hours. Why? There is my code. I…
johnacek
  • 25
  • 1
  • 1
  • 3
0
votes
1 answer

Error while installing quick.db in discord.js

This is my error. I constantly keep getting this error while trying to npm install quick.db I am using Visual Studio Code, Node version 17.0.0, discord.js version 13.3.1, please help me, any help would be appreciated.
Lapuroid
  • 23
  • 1
  • 5
0
votes
2 answers

Discord.js err: It's deleting the entire array. Quick.db and discord.js

I am extremely new to to JavaScript, so I decided to give myself a challenge by creating a discord bot. What I am trying to do is detect if the user has item called "Rod", if he does, the bot replies with "You already own this item!" Otherwise, the…
0
votes
1 answer

How to check if Key inv_ has the value of Deer Quick.db

Hello I am making a discord economy bot and I made a hunt command now I want to know that how to detect if the key inv_ has the value of deer for hunting I used this code well I added only 1 animal till now for hunting if(message.content ===…
0
votes
1 answer

discord.js manual levelling system with quick.db

I'm trying to make a levelling system configured for my server that gives XP to users when admins use >givexp, sends a message when a user reaches a new level, resets a user's XP & levels when admins use >resetxp, and displays the user's level & XP…
aerviix
  • 13
  • 5
1 2
3
8 9