Esempio n. 1
0
 public function rules()
 {
     $rules = parent::rules();
     $rules = str_replace("{MODS}", $this->mods("", "\n", "MODERATORS\n----------\n"), $rules);
     $messages = explode("{BREAK}", $rules);
     foreach ($messages as $message) {
         $this->sendMessage($message);
     }
 }
Esempio n. 2
0
 public function __construct($token, $bot_id)
 {
     parent::__construct($token, $bot_id);
     parent::registerHandler(EventBot::GROUP_CHANGED, array($this, "onGroupChanged"));
     parent::registerHandler(EventBot::MEMBER_ADDED, array($this, "onMemberAdded"));
     parent::registerHandler(EventBot::MEMBER_JOINED, array($this, "onMemberJoined"));
     parent::registerHandler(EventBot::MEMBER_REJOINED, array($this, "onMemberRejoined"));
     parent::registerHandler(EventBot::OFFICE_MODE_CHANGED, array($this, "onOfficeModeChanged"));
 }