【问题标题】:Storing information in quick.db then sending it将信息存储在 quick.db 中然后发送
【发布时间】:2020-10-20 00:38:46
【问题描述】:

我正在使用 quick.db 在数据库中存储对象

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

那么我将如何存储argument

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

将参数存储到数据库后,我想将其推送到频道。

【问题讨论】:

    标签: bots discord.js quick.db


    【解决方案1】:

    我不能肯定地说,因为你提供的信息太少,但我猜你的问题是 args 是一个字典,而你目前正在将它加入一个字符串。

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

    希望这会有所帮助。

    【讨论】:

    • 是的,我用我定义的参数替换了{ difficulty: 'Easy' }。谢谢
    猜你喜欢
    • 1970-01-01
    • 2015-10-28
    • 1970-01-01
    • 2021-09-05
    • 1970-01-01
    • 2017-07-15
    • 1970-01-01
    • 2019-12-11
    • 2020-10-20
    相关资源
    最近更新 更多