function setCommandPrefix($prefix, bool $fromProvider = false) {
        if(\is_string($prefix) && empty($prefix)) {
            throw new \InvalidArgumentException('Can not set an empty string as command prefix');
        }
        
        $this->options['commandPrefix'] = $prefix;
        
        if(!$fromProvider) {
            $this->emit('commandPrefixChange', null, $prefix);
        }
        
        return $this;
    }
function setCommandPrefix($prefix, bool $fromProvider = false) {
        if(\is_string($prefix) && empty($prefix)) {
            throw new \InvalidArgumentException('Can not set an empty string as command prefix');
        }
        
        $this->options['commandPrefix'] = $prefix;
        
        if(!$fromProvider) {
            $this->emit('commandPrefixChange', null, $prefix);
        }
        
        return $this;
    }
function setCommandPrefix ( $ prefix , bool $ fromProvider = false ) { if ( \ is_string ( $ prefix ) && empty ( $ prefix ) ) { throw new \ InvalidArgumentException ( 'Can not set an empty string as command prefix' ) ; } $ this -> options [ 'commandPrefix' ] = $ prefix ; if ( ! $ fromProvider ) { $ this -> emit ( 'commandPrefixChange' , null , $ prefix ) ; } return $ this ; }
Sets the global command prefix. Null indicates that there is no default prefix, and only mentions will be used. Emits a commandPrefixChange event.
@param string|null  $prefix
@param bool         $fromProvider
@return $this
@throws \InvalidArgumentException
Sets the global command prefix . Null indicates that there is no default prefix and only mentions will be used . Emits a commandPrefixChange event .