#How can i fix this?

4 messages · Page 1 of 1 (latest)

magic blaze
#

i have created a code for whatsapp automate.js, but i have some problems withdatabases. I need a system to display everything in a table

Code:

"const { prefix } = require("../config.json");
const db = require('quick.db');
const suggestsname = "suggests";

exports.run = async (bot, message, isOwner) => {
if (!isOwner) return bot.reply(message.from, "Non sei un amministratore!", message.id);

await db.all(suggestsname)
    .then((data) => {
        bot.reply(message.from, data, message.id);
    })
    .catch((err) => {
        console.error(err);
        bot.reply(message.from, "Errore nel recuperare i dati.", message.id);
    });

};

exports.help = {
name: "Lista dei Suggerimenti",
description: "Fornisce l'elenco dei suggerimenti.\n\nRiservato agli amministratori del bot",
usage: ${prefix}admin-suggestlist,
cooldown: 1
};"

and when i run the command, the error is:

" await db.all(suggestsname)
^

TypeError: db.all is not a function"

#

How can i fix this?

pine orchid
magic blaze
#

Oh, thanks a lot