last day (597 days later) » 

9:47 PM
Yay for testing
 
... does it work?
hi
sigh Fix it @Doorknob!
 
Not yet, hang on
 
Bot initialized
 
hi there bot
...crash
 
9:49 PM
... wat?
 
ummmm
C:/a/ruby/StackExchangeChat.rb:94:in `block (3 levels) in <main>': undefined method `send_message' f
or main:Object (NoMethodError)
facepalm
 
rofl
 
Bot initialized
 
hi there again
 
@Doorknob Hello! That message was hi there again and your username is Doorknob.
@DoorknobChatbot Hello! That message was @Doorknob Hello! That message was hi there again and your username is Doorknob. and your username is DoorknobChatbot.
@DoorknobChatbot Hello! That message was @DoorknobChatbot Hello! That message was @Doorknob Hello! That message was hi there again and your username is Doorknob. and your username is DoorknobChatbot. and your username is DoorknobChatbot.
 
9:51 PM
hi
 
@hichris123 Hello! That message was hi and your username is hichris123.
 
hahahahahaha
 
@DoorknobChatbot Hello! That message was @hichris123 Hello! That message was hi and your username is hichris123. and your username is DoorknobChatbot.
 
rofl
 
That was unfortunate
ahem
 
9:52 PM
@DoorknobChatbot hi
 
I killed it
 
Aww. :(
 
Hang on, fixing that...
Also fixing a... related problem with sending too many messages at once :P
 
... turn it on!
 
Almost fixed
 
9:55 PM
hi
 
hey @Rusher, you found me :P
 
Bot initialized
 
@Doorknob Did you fix it yet?
hi
 
@hichris123 Hello! That message was hi and your username is hichris123.
 
Yep
 
9:56 PM
@DoorknobChat hi
 
@hichris123 Hello! That message was @DoorknobChat hi and your username is hichris123.
 
this is a message
 
@Doorknob Hello! That message was this is a message and your username is Doorknob.
 
aetw
atwehptweklt;wet
 
(it has the substring "h" "i" in it :P)
Yay it's working!
I'm going to leave and come back
 
9:56 PM
Bye Doorknob!
 
wait... @hic sets it off?
:(
 
@hichris123 Hello! That message was wait... @hic sets it off? and your username is hichris123.
 
I'm back
...is it going to greet me?
 
Hi
@hic
 
@Rusher case sensitive
 
9:57 PM
@Rusher Hello! That message was @hic and your username is Rusher.
 
ahem Are you going to greet me, @DoorknobChatbot?
 
Hi Doorknob!
 
!!/stappit
 
That was a bit late
 
@hit
 
9:57 PM
@Rusher Hello! That message was @hit and your username is Rusher.
 
@hig
 
@Rusher Hello! That message was @hig and your username is Rusher.
 
@Anyonebutthebot
 
Code that I have now:
 
I hate @Doorknob! hic
 
9:58 PM
@hichris123 Hello! That message was I hate @Doorknob! <i>hic</i> and your username is hichris123.
 
sec = SEChatty.new 'stackexchange.com', 'e', 'p', 13972
sec.send_message 13972, 'Bot initialized'
sec.get_messages {|event|
	JSON.parse(event.data).each do |room, data|
		room_number = room.match(/\d+/)[0]
		if data['e']
			data['e'].each do |e|
				next if e['user_id'] == 110309 # my chatbot's id
				case e['event_type']
				when SEChatty::Event::MessagePosted, SEChatty::Event::MessagePosted
					sec.send_message ":#{e['message_id']} Hello! That message was #{e['content']} and your username is #{e['user_name']}." if e['content'] =~ /hi/
 
Hello! That message was <pre class='partial'>sec = SEChatty.new 'stackexchange.com', 'e', 'p', 13972
sec.send_message 13972, 'Bot initialized'
sec.get_messages {|event|
JSON.parse(event.data).each do |room, data|
room_number = room.match(/\d+/)[0]
if data['e']
data['e'].each do |e|
next if e['user_id'] == 110309 # my chatbot's id
case e['event_type']
when SEChatty::Event::MessagePosted, SEChatty::Event::MessagePosted
sec.send_message ":#{e['message_id']} Hello! That message was #{e['content']} and your username is #{e['user_name']}." if e['content'] =~ /hi/</pre> and your username is Doorknob.
 
@hi.I'mmaDumbRobot.
 
@Rusher Hello! That message was @hi.I'mmaDumbRobot. and your username is Rusher.
3
 
Lol it caught that too
something. I'm a dumb robot. I like llamas
 
9:59 PM
@Doorknob Hello! That message was something. I'm a dumb robot. I like llamas and your username is Doorknob.
 
>:D
 
... how does that not have the substring hi in it?
 
@hichris123 Hello! That message was ... how does that not have the substring hi in it? and your username is hichris123.
 
haha
Ok, killing bot and gtg
 
@Doorknob Aww! I was just going to bork it!
 
10:01 PM
Heh later
 
10:32 PM
@Doorknob Bot plz?
 
Can't
I'm in a car
 
Well, I suppose I could remote control my computer... :-P
 

  last day (597 days later) »