【发布时间】:2020-09-22 06:10:16
【问题描述】:
当我使用 quick.db 时,我曾经这样做过:
const table = new require('quick.db').table('table') // quick.db table
let guildID = msg.guild.id // snowflake generated by Discord; let's say it's equal to '1234567890'
table.set(`${guildID}.name`, `Cool Name`) // here, the variable name changes in function of guildID : so, to get 'Cool Name', I would have to look for '1234567890.name'.
我正在尝试在 mongoDB 上做同样的事情。在我看来,它比 quick.db 更好更完整,但我仍然找不到如何在 mongo 上做同样的事情。
我想这可能是不可能的,但我想知道您是否知道我可以如何替换它以轻松获取有关具有相应公会ID的公会的信息。
【问题讨论】: