Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Minor corrections

  • Loading branch information...
commit 128789ff8da2eb9790517485075788e944e87a58 1 parent 372c24c
@raggi authored
Showing with 2 additions and 3 deletions.
  1. +1 −1  examples/dice.bot
  2. +1 −2  examples/youtube.bot
View
2  examples/dice.bot
@@ -3,7 +3,7 @@ class Dice
def on_message(sender, content, event)
return if sender['name'] == 'bot'
case content
- when /(\d+)[dD](\d+)(?:\+(\d+))/
+ when /(\d+)[dD](\d+)(?:\+(\d+))?/
results = Array.new($1.to_i){ 1+rand($2.to_i) }
total = results.inject { |t,v| t + v }
total += $3.to_i if $3
View
3  examples/youtube.bot
@@ -13,8 +13,7 @@ class YouTube
return if sender['name'] == 'bot'
case content
when /(.*) on youtube/
- @toobes.search(:query => $1)
- client.send_message "Hi #{sender['name']}!"
+ client.send_message @toobes.search(:query => $1).first.url
end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.