Closed PointlessUser closed 1 year ago
Thanks for the GIF bugs
That was an accident, but np on the bug fix, it still doesn't work in groups tho :(
it still doesn't work in groups tho :(
I hope it still works for direct messages then
It does work for direct messages, but when sending it to a group, it says it's successful but it never actually sends a gif
How is wait_for_messages
creating a new thread? The idea of adding self.kik_connection_thread.join()
was to not let the main thread exit before the connection thread exists so that #172 won't happen. You can also see this in https://github.com/tomer8007/kik-bot-api-unofficial/issues/223#issuecomment-1477011924.
Perhaps it's a behavior of thread.join
in newer versions of python which I am not aware of?
How is
wait_for_messages
creating a new thread? The idea of addingself.kik_connection_thread.join()
was to not let the main thread exit before the connection thread exists so that #172 won't happen. You can also see this in #223 (comment).Perhaps it's a behavior of
thread.join
in newer versions of python which I am not aware of?
When I have my code like this, I get something similar to issue #172
class EchoBot(KikClientCallback):
def __init__(self):
self.client = KikClient(self, username, password)
self.client.wait_for_messages()
if __name__ == '__main__':
# Creates the bot and start listening for incoming chat messages
callback = EchoBot()
But when I change self.kik_connection_thread.join()
to self._kik_connection_thread_function()
it works fine
I'm using python 3.11, so that could be the reason, but idk
Also does logging in with no captcha still work for you? Because I need to use captcha every time
@tomer8007 Nvm, learned more about threading and I finally found a proper solution, I'll push it once I test it a bit more
Yeh I think it's good now, it works how we want it to work
But now you're assuming that when kik_connection_thread
exists it means the connection has failed. There has to be a more elagantic way to do this than sleeping
Also does logging in with no captcha still work for you? Because I need to use captcha every time
The last time I tried I needed captcha to login
But now you're assuming that when
kik_connection_thread
exists it means the connection has failed. There has to be a more elagantic way to do this than sleeping
Currently, if the person needs to login with captcha, the login fails, so self.kik_connection_thread.join() starts and ends before the program can re-connect and ask for a captcha. There probably is a more elegant way to resolve it, but this is the best simple solution I could find. I could try finding a more elegant solution on my next pull request
Also does logging in with no captcha still work for you? Because I need to use captcha every time
The last time I tried I needed captcha to login
I found a way to do it without captcha. So the first time you log in, you need to do the captcha and get the device_id and android_id used for that session. After that, you have to log in with your node and use the same device_id and android_id as the first session so that kik thinks its the same device and doesn't need you to re-verify
I tested gifs again, I think you just need to be in the group for 12 hours for them to work
Should be good now
Thanks for the GIF bugs