botsdiscord.jsquick.db

Storing information in quick.db then sending it


I' am using quick.db to store objects in the database using

db.set('object', 'A random text')

So how would I store an argument

db.set('argument', args.slice(1).join(" ")) // This won't work I guess

After storing an argument into the database I want to push it to the channel.


Solution

  • I can't say for sure because you provided so little information, but I'm guessing your issue is that the args is meant to be a dictionary, and you are currently joining it to a string.

    // Setting an object in the database:
    db.set('userInfo', { difficulty: 'Easy' })
    // -> { difficulty: 'Easy' }
    

    Hopefully this helps.