Slight code modification to make it work for another bot

Hello, the following code is fully functional and does the following: After a random amount of messages in the server the bot will drop a random amount of server currency, letting any member pick it up using "!pick", using the tatsu api. Now, I want to use this exact same code for another bot, with the difference that I want it to take server currency from the member instead. What would I need to change in order to make that possible? I am not sure what to change here. https://pastebin.com/3JtPTRer
Pastebin
messageCount++; const randomThreshold = Math.floor(Math.rand...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
3 Replies
d.js toolkit
d.js toolkit7mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - Marked as resolved by OP
duck
duck7mo ago
This isn't really related to djs, but if I had to guess, it's probably related to the action you use when sending the amount to the tatsu api You should probably ask their support
Forensic psychology nerd | Sai
Thank you for the advice, I'll ask the question in #other-js-ts maybe. Oh, actually, I looked again and you were right, thank you.

Did you find this page helpful?