Author Topic: Custom variables  (Read 3209 times)

0 Members and 1 Guest are viewing this topic.

Wolfie

  • Padawan
  • **
  • Posts: 64
  • Karma: +0/-2
    • View Profile
  • Twitch Name: Wolfie713
Custom variables
« on: September 14, 2015, 02:13:56 PM »
If this is already possible, please provide me with information on how to use them.

What I'm looking at is a way to have custom variables that could have set values and be editable in the Commands tab (in a new subtab on the left).  Some streamers may have multiple commands that return some of the same information and that information may change from time to time.  For example, a streamer could have !youtube, !social and !playlist commands that all contain a link to their YouTube profile but they may make a new YouTube channel/account/etc and then suddenly they have three commands to edit.  However, if they were to have a custom variable that they named "youtube" they could instead use something like @custom_youtube@ and just edit it in one place.  Then all the commands would provide the correct information the next time they're used.

The reason for making it @custom_(name)@ is the prevent possible conflicts with existing variable names.

At the same time, unless it's already available and I just didn't know about it, would it be possible to add in @subcount@ and possibly a couple of other items that are up to the streamer to either disclose or not?  Some streamers like to keep their sub count private and that's understandable, but some streamers don't mind sharing it or other information that is only available to the streamer (that the DeepBot can pull via API).

Mitch

  • Master
  • ****
  • Posts: 401
  • Karma: +24/-1
  • Took me 20 minutes to change this...
    • View Profile
  • Twitch Name: Mitch619911
Re: Custom variables
« Reply #1 on: September 14, 2015, 05:36:55 PM »
There already are 3 variables to save info.
:)

Wolfie

  • Padawan
  • **
  • Posts: 64
  • Karma: +0/-2
    • View Profile
  • Twitch Name: Wolfie713
Re: Custom variables
« Reply #2 on: September 14, 2015, 11:03:19 PM »
There already are 3 variables to save info.
That's per viewer though, am I right?  I'm not talking about per viewer, I'm talking about 'global' to the bot, where it isn't dependent on who is issuing the command.

TheNumbLock

  • Advisor
  • Councilor
  • **
  • Posts: 4776
  • Karma: +137/-5
    • View Profile
  • Twitch Name: TheNumbLock
Re: Custom variables
« Reply #3 on: September 15, 2015, 04:46:31 AM »
Well in the next major patch, you will be able to use a custom command to grab those 3 info slots:

@userinfo1@[username], e.g. @userinfo1@[@user@]
@userinfo2@[username], e.g. @userinfo2@[@user@]
@userinfo3@[username], e.g. @userinfo3@[@user@]

Example of a command to grab others info:

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: Custom variables
« Reply #4 on: September 15, 2015, 06:15:20 AM »
Nice.  However, I'm not looking for per-viewer/per-user custom values.  I'm talking about global custom variables.

Mitch

  • Master
  • ****
  • Posts: 401
  • Karma: +24/-1
  • Took me 20 minutes to change this...
    • View Profile
  • Twitch Name: Mitch619911
Re: Custom variables
« Reply #5 on: September 15, 2015, 10:31:41 AM »
You can use it the same way.
Set user as Youtube/Twitter...
:)

Wolfie

  • Padawan
  • **
  • Posts: 64
  • Karma: +0/-2
    • View Profile
  • Twitch Name: Wolfie713
Re: Custom variables
« Reply #6 on: September 15, 2015, 03:49:23 PM »
You can use it the same way.
Set user as Youtube/Twitter...
Explain please.

MercurY3rd

  • Councilor
  • *****
  • Posts: 652
  • Karma: +26/-1
    • View Profile
  • Twitch Name: mercury3rd
Re: Custom variables
« Reply #7 on: September 16, 2015, 09:34:08 PM »
Why you don't save your Info via Textfile?

For example:



Now you have a txt file with your Youtube Info, you can change it via the command or you go to your "custom logs" folder in your DeepBot folder and change the .txt file.
Now all the other social commands like !youtube, !social or !playlist will grab the one info and change as soon as you change the info in the .txt file.




Hier steht nichts Sinnvolles, dennoch freundliche Grüße. MercurY

Wolfie

  • Padawan
  • **
  • Posts: 64
  • Karma: +0/-2
    • View Profile
  • Twitch Name: Wolfie713
Re: Custom variables
« Reply #8 on: September 16, 2015, 09:38:36 PM »
That's definitely an option, albeit is tedious one. Thanks for the idea.

Though it still wouldn't hurt to have custom variables (I mean global, not specific to individual viewers).

Wolfie

  • Padawan
  • **
  • Posts: 64
  • Karma: +0/-2
    • View Profile
  • Twitch Name: Wolfie713
Re: Custom variables
« Reply #9 on: October 07, 2015, 04:39:17 AM »
Any thought given to custom GLOBAL variables? (Not per user values.)