Urlfetch to retun None

In current state if the api doesn’t respond with anything it says “​Error Connecting To Remote Server”

why this problem exists in first place ?
i have a string of 600 character
so if i want to send it to chat. i need to split it with 200 characters each

now lets say i send the last one as the response to the request. and the first and second to Nightbot-Response-Url

due to timeout between each message sent to reponse-url the original request will raise the error 500.

if there was a way to not send anything back it would be nice.

also i can’t even send a extra message of something like “Done” as by then request is timed out.

image
this is just ugly

Hiya, Nightbot only waits for a couple of seconds for your API to respond, otherwise you’ll see that error message. If you don’t want to return anything return a space " ", and just use the response-url to send all 3 messages. Or if you do want to do it your current way, depending on your programming language, return the first part directly to Nightbot, and run response-url calls from the background.

Yeah I thought of returning a " "
but as far as i remember i can’t do it in flask (py)
as it based on functions and you “return” responses. and then and their function ends.

i think i can overcome this by scheduling a task that take cares of it.
I will take a look into it.

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