ResourcesLib
With lib we can manage any resources in bot.
Resource can be
User's resource
let res = Libs.ResourcesLib.userRes("money");
Bot.sendMessage("Cur your money: " + res.value());Chat's resource
let res = Libs.ResourcesLib.chatRes("money");
Bot.sendMessage("Cur your money: " + res.value());Methots for user's and chat resources
Basic functions
Current res amount
Set amount for this res
Add amount for this res
Res have such amount?
Take away amount from resource
Access to another resources
Access to another user's resources
Access to another chat's resources
Resource transfering
If have resource...
...or anyway, even resource is not enough
Can exchange different resources
Growth for resource.
Add 5 every hour with max value 100.
Value can be negative. Remove 5 every 30 hours.
Can limit max iteration count
Can growh by percent.
Can grow by compound interest.
Reset growth
Other methods for res.growth:
How to add growth to another resources?
Init: on /start command (or any other command)
/start command (or any other command)On /wallet command or etc
/wallet command or etcHow to
Q: How to give to referrer 5% of referral user deposit?
Q: How to give a bonus to all users every day?
Q: How to make time limit bonus?
Last updated