示例#1
0
 /**
  * Let users send each other beers thru the bot.
  *
  * User: ^5 @Lincoln
  * Bot:  YEAH! ^5 @Lincoln
  *
  * @param Bot $bot
  */
 public function bot_fives_handler($bot)
 {
     if ($bot->regex('(^|[\\s,\\.>])\\^5 @([\\w-]{3,64})', $target)) {
         // ^5
         if (isset($target[2]) && $target[2]) {
             if (strtolower($target[2]) == 'vorgo') {
                 $bot->setReply('^5 ' . $bot->mention() . '!');
             } else {
                 $bot->setReply('YEAH! ^5 @' . $target[2] . '.');
             }
         }
     }
 }