問題描述
我知道這似乎很容易,但我沒有深入研究 Javascript 或任何代碼,但我現(xiàn)在正在這樣做,因?yàn)槲艺谥谱饕粋€不和諧的機(jī)器人,我似乎找不到制作方法我的不和諧機(jī)器人的計(jì)數(shù)器,所以如果有人說!pointsadd 100",那么它會在余額中增加 100,這可以從 ect 中扣除.可以找到其他計(jì)數(shù)器,如 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.
這篇關(guān)于Discord.js 計(jì)數(shù)器和存儲的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!