Multiple messages?

Because of the character limit, I am not able to put all the info I want into one command, so I was wondering if I could make make a command, lets say !test which will let nightbot say two messages? I’m not quite sure if I’m explaining this clearly but basically, I want nightbot to say two separate messages (1/2 and 2/2) when I type 1 command.

Hey @j0nathan!

Have a look at this Nightbot Multiple Messages Command Generator.

1 Like

I was wondering if there was a way to shorten the url fetch, my goal was to make 2 outputs from Nightbot that are around 400-500 characters each, but the url fetch was over 500 characters so I can’t add the command through chat

I see, the length of your messages was an important factor to mention.

There’s a solution to your problem though! Since the website prevents you from writing too long messages, you’ll have to write the URL without it’s assistance, so to make things easier I recommend you this other Multiple Message API made by @RokettoJanpu, that way you won’t need to care about replacing spaces with %20:

http://rokbot.xyz/smm.php?msg=MESSAGE_1`MESSAGE_2`MESSAGE_3`MESSAGE_4`MESSAGE_5`MESSAGE_6&i=INTERVAL_IN_SECONDS&d=DELAY_SECOND_MESSAGE

• Replace the MESSAGE_X fields with your messages, you have up to 6 messages, don’t remove the ` (backticks) unless you don’t need that many messages.
• Replace INTERVAL_IN_SECONDS with the delay between each messages, 5 being the lowest possible.
• Replace DELAY_SECOND_MESSAGE with 0 or 1 depending on what you want: 0 for no don’t delay the second message by i, 1 for yes delay the second message by i. So if i=5 and d=0, the second message won’t wait 5 seconds and will be sent right after the first one, if however i=5 and d=1 the second message will be delayed by 5 seconds.

Only limitation I noticed with this API is that the first message is limited to 200 characters, then you’re limited to 400 for every messages following. To be perfectly exact, you can write more than 200/400 characters for each messages, but your messages will be cut off if they go above.

Then you’ll need to have a Pastebin account, make a paste that doesn’t expire and paste the link in it, then save it. Now here’s the command:

!addcom !command $(urlfetch $(urlfetch json https://pastebin.com/raw/XXXXXXXX))

Replace XXXXXXXX by your paste ID and you’re good to go!

1 Like

Thank you so much! :open_mouth::blush:

1 Like

Is there any way to make the 3rd message appear faster? The first and second messages appear in chat very quickly, but there is about 5-ish second delay between the 2nd and 3rd message.

Sadly there’s none, it would be like that with the other API too, from my understanding it’s designed this way to prevent Nightbot from spamming Twitch IRC in order to avoid being kicked for 30min, which would be terrible for a bot like Nightbot.

1 Like

Oh Ok, np. Thanks for helping me :smile:

1 Like

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