Author Topic: Counter for multiple commands  (Read 2141 times)

0 Members and 1 Guest are viewing this topic.

VividestGemini

  • Youngling
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
  • Twitch Name: vividestgremlin
Counter for multiple commands
« on: January 11, 2018, 02:15:45 PM »
I mod for a channel, and I was hoping there was a way to add to counters in one command for 3 separate commands.
EX: The streamer has a basic command that tells you how many times a bird has taken flight. He has three birds. But sometimes all three birds take flight together and it floods the chat with commands when typing the commands !birdflight1 !birdflight2 and !birdflight3.

I'd like something like !flock that adds a counter to all three commands, but prints it with a new message like "Bird 1 has flown X times, bird 2 X, and bird 3 X" that way you can do it in one command, or if a bird flies by itself, just use one of the original commands; this way the counter is linked.

Not sure if it can be done or exactly how to separate the variables for the singular bird commands.

Right now, I just have the ability to add the commands via the chat itself, but if needed I could instruct the streamer on how to use the deepbot application itself to implement the command.

TheNumbLock

  • Advisor
  • Councilor
  • **
  • Posts: 4776
  • Karma: +137/-5
    • View Profile
  • Twitch Name: TheNumbLock
Re: Counter for multiple commands
« Reply #1 on: January 11, 2018, 09:26:45 PM »
@getcounter@[!command]   Grabs the counter of a command. (E.g. mods use !adddeath, while users use !death which can use @getcounter@[!adddeath].)
Old Name: RepentGamingTV
Twitch: Here

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

VividestGemini

  • Youngling
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
  • Twitch Name: vividestgremlin
Re: Counter for multiple commands
« Reply #2 on: January 13, 2018, 08:18:07 AM »
I know the @getcounter@  command. What I DON'T know how to do is update a counter of 3 different commands in one command OR to pull the data from @getcounter@[!command1] to print out in the new command either.

TheNumbLock

  • Advisor
  • Councilor
  • **
  • Posts: 4776
  • Karma: +137/-5
    • View Profile
  • Twitch Name: TheNumbLock
Re: Counter for multiple commands
« Reply #3 on: January 13, 2018, 11:34:58 PM »
@setcounter@[!command|number]   Sets the counter of a command. (E.g. mods use !adddeath which can use which can use @setcounter@[!death|10], while users use !death.)

So you could do a command like !updatecounters and put @setcounter@[@target@[1]|@target@[2]] @setcounter@[@target[3]|@target@[4]] and so on.
Old Name: RepentGamingTV
Twitch: Here

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