When this !srank is called and the following query is empty, I want it to use a default(fallback) variable for example ‘sagajust’. how can i make this happen?
PS I’m quite new to this so this might be something really easy that I just dont know. but help me plz!
You don’t need to pass $(querystring) to the $(leagueoflegends) variable. $(querystring) is only used when you want to url encode the query (useful for your second usage).
What do you mean when say “fallback value”? $(query) will just grab all of the text after the command message. If there is no text after the command $(query) will pass nothing. The $(leagueoflegends variables has fallbacks to provide information such as " Summoner has no rank. " and " Summoner name provided not found. "
In both situation, they are in the same channel and the streamers league summoner name is 'KEVINC’
ex 1) !srank JUST
result: JUST’s current rank: Gold V
ex 2) !srank
result: KEVINC’s current rank: Diamond V
ex1 has a $(query) declared which is JUST and its filling in where it is needed but when ex2 has just the !srank, and no declaration for $(query), I want it to use a default value KEVINC.
Does this clearify? Let me know if this whole question is just outrageous or something, i’m pretty much noob at this
Unfortunately it’s not possible to specify a fall back value at this time, sorry. You would need two different commands, one for looking up the fallback, and one for looking up a specified summoner.