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

Asked Sep 7, 2022·2 replies·Last activity 3 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.

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: @member here
| Nightbot: @member you
| Nightbot: @member go
| Nightbot: @member 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

D13037A8-B5A0-4B3E-9B26-A9EB0D638245.jpeg09D85CFA-33CA-474C-95F9-627828464A63.jpeg3839FBB4-E46A-45D9-953B-024D40D28D78.jpeg6A2A9D51-EFE6-4E62-964A-143592FDB0EE.jpeg

2 replies

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`))

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