Closed chickenmuchroom closed 5 months ago
Hi, if you pass run_async, the call will return (almost) immediately, and start a thread in the background, but if your main thread quits (which it will, because your main function is done), that thread also gets killed. If you want it to run indefinitely, you could have your main thread do something like while True: time.sleep(1000). Alternatively, just don't pass run_async (in that case, you'd have to handle reconnects yourself, though (catch exceptions around the call to stream_user)
closing as likely resolved, feel free to reopen if not
Hello, for some reason I cannot keep my bot active when I put run_async as True for stream_user. Is there a method for my bot to stay active and have a asynchronous listener at the same time?
I'm very sorry if this is a sloppy question; I've tried searching for information with making Mastodon bot but apparently there isn't much information available.