Discord.js 计数器和存储

Discord.js Counter and storing(Discord.js 计数器和存储)
本文介绍了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 文件中(不推荐,它们在被频繁写入后可能会损坏)https://www.youtube.com/watch?v=Aw4b2VN1KW8 这是一个很好的视频.

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 计数器和存储的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

Auto-reply to direct messages(自动回复直接消息)
Play local music files using djs v13(使用 djs v13 播放本地音乐文件)
Making a bot delete its own message after a timeout(让机器人在超时后删除自己的消息)
How do I upload a custom emoji to my discord bot(如何将自定义表情符号上传到我的不和谐机器人)
Discord.js meme command with meme subreddit returns image as 403 forbidden(带有 meme subreddit 的 Discord.js meme 命令将图像返回为 403 禁止)
How to get snekfetch results into an object?(如何将 snekfetch 结果放入对象中?)