Need help coding

I’m trying to make a code for my madden league on discord. I have a betting system going on in my league that lets user bet on the games each week and they can earn coins if they pick the winning team or lose coins if they pick the losing team. I need a code to where if a user bets on a certain user with an amount, all I have to do is say which team won and the bot will automatically give the coins to the user or take the coins from the user instead of me doing it 1 by 1.

example: user bets on the bengals vs packers game and they bet 400 coins. if the packers win the user gets 800 coins and if the user losses the bet they lose 400 coins. And all I would have to do is enter the winner of the game and the bot does everything else.

Can any help me with that or send me that code?

Hey, I’ve never built a bot, but I wrote up this Javascript code which might help you out. https://betting-system.glitch.me/

Feel free to remix it and see what you (or others) come up with.