Nightbot modifying URL string

Asked Dec 6, 2020·1 reply·Last activity 5 years ago·Open in Discord ↗
Archived from the original community forum
Things may have changed since it was written. Still stuck? Ask the community on Discord.

Hi guys,

I am racking my brains over trying to figure this out.
Basically long story short, I want Nightbot to react to a command and modify a string stored somewhere that I can reference it via a web browser input via OBS Studios.

So as an example, I want to have Nightbot react to a command like !url "name here" and I want it to modify a string (thats a URL). So lets say the current string is https://thislinkhere.com/here and someone calls a command by Nightbot using !url name. I want the URL to change to https://thislinkhere.com/name

Any ideas?

1 reply

@Hazel Sheep It's bit confusing, what you actually want. Anyways, try this,

!addcom -cd=5 !url $(eval x=`$(querystring)`; `https://this_link_here.com/` + x)

Example usage:

Ritik: !url
Nightbot: https://this_link_here.com/Ritik
Ritik: !url nightbot
Nightbot: https://this_link_here.com/nightbot
Ritik: !url ritik ranjan
Nightbot: https://this_link_here.com/ritik%20ranjan

Regards