stopPlaying() {
        if(this.ended) {
            return;
        }
        this.ended = true;
        if(this.current && this.current.timeout) {
            clearTimeout(this.current.timeout);
            this.current.timeout = null;
        }
        this.current = null;
        this.piper.stop();
        this.piper.resetPackets();

        this.setSpeaking(this.playing = false);

        /**
        * Fired when the shared stream finishes playing a stream
        * @event SharedStream#end
        */
        this.emit("end");
    }
/**
    * Stop the bot from sending audio
    */
Stop the bot from sending audio
Stop the bot from sending audio
stopPlaying() {
        if(this.ended) {
            return;
        }
        this.ended = true;
        if(this.current && this.current.timeout) {
            clearTimeout(this.current.timeout);
            this.current.timeout = null;
        }
        this.current = null;
        this.piper.stop();
        this.piper.resetPackets();
        this.setSpeaking(this.playing = false);
        this.emit("end");
    }
stopPlaying ( ) { if ( this . ended ) { return ; } this . ended = true ; if ( this . current && this . current . timeout ) { clearTimeout ( this . current . timeout ) ; this . current . timeout = null ; } this . current = null ; this . piper . stop ( ) ; this . piper . resetPackets ( ) ; this . setSpeaking ( this . playing = false ) ; this . emit ( "end" ) ; }
Stop the bot from sending audio
Stop the bot from sending audio
/**
        * Fired when the shared stream finishes playing a stream
        * @event SharedStream#end
        */