如何存储数据并重用来自我的 mangoDB 数据库的数据?

问题描述

我已经建立了数据库,但我什至不知道如何存储数据?我试着看教程,但他们的解释对我来说没有任何意义。

我希望来自两个人的兼容性得分的数据几乎保持不变。

这是我想要存储和重用数据的代码

if(cmd === `${prefix}ship`){
  
   let shipUser = message.mentions.users.first()
  if (!shipUser) return message.channel.send("You must mention a user!");
  
    const ship = Math.round(Math.random() *100);
    const shipIndex = Math.floor(ship / 10);
    const shipLevel = "◽".repeat(shipIndex) + "◾".repeat(20 - shipIndex);
    
    let shipEmbed = new discord.MessageEmbed()
    .setTitle("Ship compatibility")
    .setColor("#42f4c2")
    .setDescription(`${usern} and ${shipUser} are this much compatible: ${ship}%\n\n${shipLevel}`)
    
  message.channel.send(shipEmbed);
    return;
  }

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)