:opened
[:message, "{\"r11540\":{\"t\":27838613,\"d\":1},\"r240\":{\"t\":27838613,\"d\":1}}"]
[:message, "{\"r11540\":{\"e\":[{\"event_type\":2,\"time_stamp\":1397768981,\"content\":\"(although
my understanding is that here alternate APIs than the official are developed and used so StackApps w
ouldn\\u0026#39;t be very appropriate)\",\"id\":27838614,\"user_id\":27,\"user_name\":\"badp\",\"roo
m_id\":11540,\"room_name\":\"Charcoal HQ\",\"message_id\":15019815,\"message_edits\":1}],\"t\":27838
614,\"d\":1},\"r240\":{\"t\":27838614,\"d\":1}}"]
New event: {"event_type"=>2, "time_stamp"=>1397770449, "content"=>"Wait, so is it that there's no easy way to overload functions in python, or that you just don't want to?", "id"=>27839366, "user_id"=>51024, "user_name"=>"Geobits", "room_id"=>240, "room_name"=>"The Nineteenth Byte", "message_id"=>15020198, "message_edits"=>1}!
New event: {"event_type"=>2, "time_stamp"=>1397770449, "content"=>"Wait, so is it that there's no easy way to overload functions in python, or that you just don't want to? (edit test)", "id"=>27839371, "user_id"=>51024, "user_name"=>"Geobits", "room_id"=>240, "room_name"=>"The Nineteenth Byte", "message_id"=>15020198, "message_edits"=>2}!
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/
room topic changed to Charcoal HQ: Where comments are flagged and SE is hacked. Handy links: erwaysoftware.com/charcoal & erwaysoftware.com/charcoaldev (no tags)
room topic changed to Charcoal HQ: Where comments are flagged and SE is hacked. Handy links: erwaysoftware.com/charcoal & erwaysoftware.com/charcoaldev. Some minor change (no tags)
Positive lightning is indeed very interesting. According to the National Weather Service, the reason why it has a higher amperage and voltage is:
Since it originates in the upper levels of a storm, the amount of air
it must burn through to reach the ground usually much greater.
Therefore,...