Discord.js计数器和存储 [英] Discord.js Counter and storing

查看:26
本文介绍了Discord.js计数器和存储的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道这似乎很容易,但是对此我并没有太深入地研究Javascript或任何代码,但是我现在正在做一个不和谐的机器人,我似乎找不到一种制造方法.我的不和谐机器人的计数器,因此,如果有人说!pointsadd 100",那么它将使余额增加100,并且可以从ect中扣除.可以找到其他计数器,例如HTML,CSS,但是如果有人可以帮助您,那么这种格式会让我感到困惑

I know this may seem easy but I haven't delved too deeply into Javascript or any code for that matter but I'm doing so now that I am making a discord bot I can't seem to find a way to make a counter for my discord bot so if someone says "!pointsadd 100" then it would add 100 to the balance and that can be taken away from ect. can find other counters like HTML, CSS but the format is confusing to me if anyone could help much appreciated

推荐答案

如果您想要一种可靠的方式来存储点值,请尝试使用类似MongoDB的方法.如果您愿意,我可以帮助您.尽管如果您只想将其存储在一个普通的旧JSON文件中(不建议这样做,它们在被频繁写入后可能会损坏)

If you would like a reliable way to store the points value, try using something like MongoDB. I could help with it if you want. Although if you just want to store it in a plain old JSON file (wouldn't recommend, they can corrupt after being written to too often) https://www.youtube.com/watch?v=Aw4b2VN1KW8 this is a good video to follow.

这篇关于Discord.js计数器和存储的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆