Author Topic: Add # Argument to Commands  (Read 1776 times)

0 Members and 1 Guest are viewing this topic.

Marstead

  • Padawan
  • **
  • Posts: 51
  • Karma: +1/-0
    • View Profile
  • Twitch Name: Marstead
Add # Argument to Commands
« on: September 28, 2015, 02:03:05 PM »
I am currently using the Commands system to let viewers keep a running vote on the next game I am going to play. One such command looks like this:

!game01
Code: [Select]
@user@, you have spent @cost@ SP to add 1 vote to Dark Souls. You now have @points@ SP. Dark Souls has @counter@ votes. @savefile@[C:\Users\Marstead\Google Drive\$voteGame01.txt,@counter@]
The command costs 60 points to use.

I have a Google spreadsheet that calls the value in $voteGame01.txt from Google Drive and dynamically updates the total once an hour or so.

This works great! However, if viewers want to make a LOT of votes at once, they have to spam chat with the command. I would like to see the ability to add a # argument to some commands (enable it with a checkmark). If the user enters a # after the command, it attempts to increment the command's counter that number of times, and takes points from them equal to (# * Cost). If they don't have enough points to execute it gives the normal specified error.

For example:

!game01 10

If I charge 60 Points to execute !game01 once, this would charge the viewer 600 Points and increment the counter by 10, but only display a message once. This mirrors the functionality of the Stream Poll multi-voting system and was what my viewers intuitively thought would happen if they entered a command in this way.

Marstead

  • Padawan
  • **
  • Posts: 51
  • Karma: +1/-0
    • View Profile
  • Twitch Name: Marstead
Re: Add # Argument to Commands
« Reply #1 on: October 10, 2015, 02:09:40 AM »
Hey there!

This command is marked with a checkmark but I don't see it on Trello. Is it not planned/not possible?

Thank you!

TheNumbLock

  • Advisor
  • Councilor
  • **
  • Posts: 4776
  • Karma: +137/-5
    • View Profile
  • Twitch Name: TheNumbLock
Re: Add # Argument to Commands
« Reply #2 on: October 10, 2015, 02:45:23 AM »
It's been added, I thought I added it, but it is there under Commands - Add # Argument to Commands
Old Name: RepentGamingTV
Twitch: Here

Need help ASAP?
Join Deepbot's Discord: Discord.Deepbot.tv
Deepbot's Twitter: @DeepSupport

Wolfie

  • Padawan
  • **
  • Posts: 64
  • Karma: +0/-2
    • View Profile
  • Twitch Name: Wolfie713
Re: Add # Argument to Commands
« Reply #3 on: October 11, 2015, 07:40:55 AM »
For example:

!game01 10

If I charge 60 Points to execute !game01 once, this would charge the viewer 600 Points and increment the counter by 10, but only display a message once. This mirrors the functionality of the Stream Poll multi-voting system and was what my viewers intuitively thought would happen if they entered a command in this way.
So a way to use an optional value as a multiplier/adder.  inc @counter@ by it and deduct 60x%target%[1] by it.  So, "Use %target%[1] as command repeater?" set to yes to 'repeat' it but the combine all into one output.  If not set to 'yes' then it just ignored %target%[1].