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
5
votes
1 answer

better-sqlite3 - compiled against a different Node.js - discord.js bot

/Users/dhyan/Downloads/Dhyan99-bot-v14 (4)/node_modules/bindings/bindings.js:121 throw e; ^ Error: The module '/Users/dhyan/Downloads/Dhyan99-bot-v14 (4)/node_modules/better-sqlite3/build/Release/better_sqlite3.node' was compiled…
D99
  • 84
  • 6
3
votes
4 answers

Issue installing better-sqlite3 on Mac

The reason I'm trying to install it is to use quick.db as its the default driver however I can't seem to figure out what the error is. Perhaps the kind people of stack overflow will be able to provide some assistance. It seems like it manages to run…
larkx
  • 71
  • 1
  • 9
3
votes
1 answer

Bot assigns user a role, even if user doesn't own role

Sorry for the confusing title, I'll clarify. I'm trying to make the bot check if a user has a certain role in their quick.db inventory, and if they do, it'll equip that role. The problem I'm having is that even with the role in the inventory, it…
washingm
  • 87
  • 1
  • 11
2
votes
1 answer

Discord,js quick.db db.get() is not a function

I am trying to make an economy bot using quick.db, but for some reason, its .get() function doesn't get recognised. I have looked into the library's documentation to check if it really does exist and it does. This is my code that gives the error, it…
2
votes
0 answers

InteractionCollector is is not being set properly in Quick.DB .sqlite file discord.js

I'm trying to use quick.db for an InteractionCollector manager in discord.js with typescript, and since there can't be more than 1 collector active, whenever a user uses a command that has a collector, it gets set into a map with the user id, and…
clapmemereview
  • 371
  • 1
  • 4
  • 14
2
votes
2 answers

commandFetch.includes is not a function, but its in a array

i have a toggle system for commands but in the message event file, once i try to disable a command, the command is disabled but when i try the command again it comes up with the error: TypeError: commandFetch.includes is not a function at…
D3V1L
  • 21
  • 1
2
votes
0 answers

Trying to save in quick.db channel after interaction but cannot save channel and prevent making channnel

I am using 'discord.js' v13 library with 'quick.db' npm package. I am trying to save the channel from the interaction, but when I do it for first time bot sends me that I have already the channel. When I try for a second and third time, it sends me…
Peaky
  • 21
  • 3
2
votes
2 answers

How to convert number with "e" to a full number

How can a bot convert number with "e" (3e6) to a full number (3,000,000)? Here's an example: USER: !donation add @USER2 3e6 BOT: ✔️Added 3,000,000 coins to @USER2's donations. const db = require("quick.db"); module.exports = { name:…
Fl1ck
  • 35
  • 3
2
votes
1 answer

Welcome Message - TypeError: Cannot read property 'user' of undefined

I Am Trying To Make A Welcome Message With My Discord.js Bot I Keep Getting user is not defined while trying to get the bot to mention the new user client.on('guildMemberAdd', async (message, member) => { const welcomechannel =…
shawn
  • 42
  • 8
2
votes
0 answers

Node JS - Discord js - Chat logging with winston to quick-db

So, I want to add a chat logging system with sql with quick-db, currently I have this as a temporary fix, but its just to ugly how it logs. yumi.on('ready', () => { winston.add(winston.transports.File, { filename: 'yumi.log', level: 'info'…
1
vote
1 answer

How to store the ID of the user who sent a slash command and compare with user who interacted with a button in Discord.js

I'm using the following code to create a quick database to store the ID of the user who called a bot via a slash command. I then want to compare this ID with the ID of the person interacting with the bot. My aim is to prevent anyone but the user…
1
vote
0 answers

How to get items sticker in quick.db

I always get undefined when I want to use x.st, and I'm asking this because I want to add a sticker and if I add a sticker maybe it will look more interesting code for buy const { MessageEmbed } = require("discord.js"); exports.execute = async…
Meflems
  • 11
  • 2
1
vote
1 answer

npm rebuild doesn't work when trying to fix different node module version error

I'm getting an error where the better_sqlite3 package is using a different version of node, and it says to try npm rebuild and npm install but this doesn't solve anything and I'm still getting the same…
Existentialist
  • 177
  • 2
  • 9
1
vote
2 answers

Can't send a message to a specific channel

I'm trying to create a modmail system and whenever I try to make it, it says "channel.send is not a function, here is my code." const Discord = require("discord.js") const client = new Discord.Client() const db = require('quick.db') //…
Cmb
  • 334
  • 2
  • 18
1
vote
1 answer

time returns negative numbers

I am trying to create a 24hr timer on a database using quick.db, but my timer isn't ticking, and time logs negative number. const db = require('quick.db'); const Discord = require('discord.js'); const ms = require('parse-ms'); let timer = await…
MrLlamaDev
  • 21
  • 5
1
2 3
8 9