Hi all, I am newb at this stuff.
I’m trying to create a lookup command for players to type in twitch chat that will spit out a link to their game/match history on OP.GG.
The command would use 2 arguments/queries (in-game-name and server) and then the link will be the output. These are the same inputs needed for the League of Legends commands.
If no queries are entered, then I’d like the output to use the user’s name (twitch user name) and NA (server).
I have found similar topics, but none involving 2 queries which could default to something else.
This is what I have so far:
https://$(eval $(query)
||na
).op.gg/summoner/userName=$(eval $(query)
||$(user)
)
WITHOUT query entries, the result is perfect:
MajinSona: !opgg
Nightbot: https://na.op.gg/summoner/userName=majinsona
WITH query entries, the result is scuffed but the link still works LMAO:
MajinSona: !opgg majinsona na
ALSO scuffed with only one query entry and the link does not work:
MajinSona: !opgg majinsona
I’ve also tried using $(2) for the SERVER and $(1) for the IN-GAME-NAME for arguments which replace $(query). But when no query in entered, “null” is printed on the link. Query entries work fine.
MajinSona: !opgg
Anyways, this is where I’m at and any help is appreciated. Thanks!