Using variables(?) (subcommands?) with Nightbot

I’ve scoured the net to no avail, but I think I’m trying to use variables (or should I call them subcommands?).

I want to display my personal bests of games through one global command (!pb) but add arguments to display specific games. For example, I want:

!pb zelda

to return “My PB in Zelda is 30:00, watch it here: twitch.tv/ZELDAHIGHLIGHT

but then I also want an option to change the argument like

!pb megaman

to return “My PB in MegaMan is 22:00, watch it here: twitch.tv/MMHIGHLIGHT

I currently just have separate commands to do this like !pbzelda and !pbmegaman. How do I utilize variables (subcommands?) properly?

Thanks.

Nightbot doesn’t offer sub commands in this format, you would need to use a Custom API to achieve this.

Thank you. Any suggestions on documentation for such Custom APIs?

You can refer to the UrlFetch variable documentation at https://docs.nightbot.tv/commands/variables/urlfetch