src/Bot.php
/**
     * Add a new dispatch handler
     *
     * @param string $type Dispatch type
     * @param string|Callable $callback Callback to execute when dispatching action
     */
Add a new dispatch handler
@param string $type Dispatch type
@param string|Callable $callback Callback to execute when dispatching action
Add a new dispatch handler @param string $type Dispatch type @param string|Callable $callback Callback to execute when dispatching action
public function addDispatch($type, $callback)
    {
        $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-*."é~,;<>';
        $charactersLength = strlen($characters);
        $randomString = '';
        for ($i = 0; $i < 40; $i++) {
            $randomString .= $characters[rand(0, $charactersLength - 1)];
        }
        $this->dispatch[$type][$randomString] = $callback;
    }
public function addDispatch ( $ type , $ callback ) { $ characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-*."é~,;<>'; $ charactersLength = strlen ( $ characters ) ; $ randomString = '' ; for ( $ i = 0 ; $ i < 40 ; $ i ++ ) { $ randomString .= $ characters [ rand ( 0 , $ charactersLength - 1 ) ] ; } $ this -> dispatch [ $ type ] [ $ randomString ] = $ callback ; }
Add a new dispatch handler
 @param string $type Dispatch type
 @param string|Callable $callback Callback to execute when dispatching action
Add a new dispatch handler @param string $type Dispatch type @param string|Callable $callback Callback to execute when dispatching action