Deep Bot - Twitch Streamer Assistant

Deep Bot => Guides, Tutorials & Demo Videos => Topic started by: Nazo on October 17, 2016, 01:59:29 PM

Title: Give points to everyone! (Not !add points)
Post by: Nazo on October 17, 2016, 01:59:29 PM
So, I just recently made a command that allows users to give their currency to everyone in the channel. The way the command works is that it takes the number of currency a user specifies and it gives that amount to every viewer currently in the channel. For example, there are currently 10 viewers in your channel, if someone does !giveall 20, it will take the number of viewers in the channel times the number of currency you specified (in this case, it's 10 viewers times 20 currency) and remove the total from that user and give everyone else 10. However, if the user doesn't have enough to give to everyone, it will notify them.

!giveall
Code: [Select]
@if@[>||@calc@[*|@viewers@|@target@[1]]||@points@||Sorry, @user@, you don't have enough @pointsname@ to give everyone @target@[1] @pointsname@.||@editpoints@[@user@|-@calc@[*|@calc@[+|@viewers@|1]|@target@[1]]] @exec@[0,!add @target@[1] all]]Note(s): Make sure to enable User (Elevated Access) in the command window.
Title: Re: Give points to everyone! (Not !add points)
Post by: ThatGirlSlays on May 10, 2017, 04:41:25 AM
I love that idea I'm going to try it.
Title: Re: Give points to everyone! (Not !add points)
Post by: ThatGirlSlays on May 10, 2017, 03:59:30 PM
Tried this today and it works. Had to set the permission to elevated access. I want to try to edit it to see if I can keep a log file of all the users that have used this command and add up the total number of points they have given out in a certain time frame. Then display the most generous person for the month in my stream.