« first day (2 days earlier)  last day (15 days later) » 

00:28
@Undo Any chance you can help me with something on my bot?
01:03
@michaelpri Sure
Thanks
Getting on a plane in like half an hour though
Alright, it shouldn't take too long
So I have a WelcomeBot that was made using ChatExchange. It will welcome new users to the room, but I'm also starting to make it have commands. For example, there is one command !!_image term that will give you an image based on the search term. Right now, we need to improve how it searches for the image, but that's not the problem.
So watcha need? yay lag
It is set up so that when any message is posted in the room, it will look to see if the message starts with !!_image and then it will work from there. The problem is, it doesn't even watch for posted messages most of the time.
I have print statements set up to debug it, and I can see that sometimes the event isn't even watched, and sometimes the it is watched, but never specified that it is a message. I know that Smokey does something similar where you give it commands, so I was wondering if you could check it out for me
01:08
Uh let me try running it
Alright, thanks
I'm alive :)
!!_image term
!!_image cat
!!_image kitten
01:12
manually killed
I'm alive :)
So does it only work for the first request?
!!_image foo
That's what I've seen a lot
!!_image cow
01:13
But then I write a message and try again
!!_image wwdc
!!_image kitten
So... is it only listening once per user or something
Possibly?
That's weird
01:15
Here's where the function checking for a message starts: github.com/michaelpri10/WelcomeBot/blob/master/…
!!_image test
Ummm okay
!!_image foo
!!_image cats
!!_image bar
01:17
Sometimes it will search, but find no image. You can probably see it when it's running though
!!_image cow
Yeah
uh wrong window :P
!!_image ducks
I'm not sure. This is weird
!!_image cats
So it isn't just me being incompetent?
Ohhhhh
What's it look like when one of these requests fails?
From a network pov
okay, IDEA: You might have some image requests that fail, but they stay open. This means they block the main thread, so CE can't get through to the listener
I'm on a super flaky connection, though
We ran into kinda the same thing with Smokey
^^ we had to use threading. Might be worth a try
!!_image lake
!!_image thisdoesntexistnonotatall
01:21
@Undo No image was found for thisdoesntexistnonotatall
!!_image fast
!!_image doyouhearme
@Undo No image was found for doyouhearme
I'm not sure
But a big part of me thinks that's what's happening
Sometimes it has images, but doesn't return them
01:23
Try threading. If that doesn't help, ping ProgramFOX
killed mine
I'm alive :)
!!_image cats
!!_image cat
@Undo I'm not really sure how I would implement threading
Make the room a global variable, start a new thread with each new request. In that thread, search for the image. Post the response from the thread.
CE is threadsafe IIRC
01:26
Ok, rooms already a global variable so I'm... 25% there :)
Do you think I should start a thread when I'm watching the command or when I am checking if a message was posted?
Only when you start the image fetch
Oh, ok
Okay I've got to go now.
Good luck :)
Ok, thanks. Have fun on the plane :)
@michaelpri Welcome
I'm dead :(
 
16 hours later…
room mode changed to Public: anyone may enter and talk
hiya!
18:49
room mode changed to Gallery: anyone may enter, but only approved users can talk

« first day (2 days earlier)  last day (15 days later) »