I'm trying to get Nightbot to send multiple separate messages from one command

I’m having a hard time understanding what I’m doing. I want Nightbot to send separate messages from one command like in this example interaction:

| RandomUser: !ping
| Nightbot: @RandomUser here
| Nightbot: @RandomUser you
| Nightbot: @RandomUser go
| Nightbot: @RandomUser gamer xd
| RandomUser: ty xd

There’s two parts of this command that I want to work, and I’ve only gotten them to work separately

First, I want the user to be pinged. Simple enough, but I’ve been having trouble getting the ping to register for both discord and twitch

Secondly, I want the messages to send separately witthout any extra input.

This is the spaghetti I managed to put together to get the ping to work for both discord and twitch:

?ping $(eval ‘$(provider)’ === ‘discord’ ? ‘<@$(userid)>’ : ‘@$(user)’) here $(eval ‘$(provider)’ === ‘discord’ ? ‘<@$(userid)>’ : ‘@$(user)’) you $(eval ‘$(provider)’ === ‘discord’ ? ‘<@$(userid)>’ : ‘@$(user)’) go $(eval ‘$(provider)’ === ‘discord’ ? ‘<@$(userid)>’ : ‘@$(user)’) gamer xd

This is the code I found to have it all send separately:

!ping $(urlfetch https://vxrl.xyz/smm/$(querystring @$(user) here)/$(querystring @$(user) you)/$(querystring @$(user) go)/$(querystring @$(user) gamer xd)?i=5000&d=0)

I’ve attached pictures of what’s going on when I use the command, thanks




You’re on the right track basically you wanna do a mix of the two like this:

!addcom !ping $(urlfetch https://vxrl.xyz/smm/$(eval `$(provider)`==`discord`?u=`<@$(userid)>`:u=`@$(user)`;`${u}%20here/${u}%20you/${u}%20go/${u}%20gamer%20XD?i=5000&d=0`))
2 Likes

wow I did not expect such a fast reply. Thank you so much. It works perfectly

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.