static updateActivity() {
        let streamInfo = this.getMostRecentStreamInfo();

        if (streamInfo) {
            this.discordClient.user.setActivity(streamInfo.user_name, {
                "url": `https://twitch.tv/${streamInfo.user_name.toLowerCase()}`,
                "type": "STREAMING"
            });

            console.log('[' + moment.utc().format('MM/DD/YYYY-h:mm:ss-A') + '][StreamActivity]', `Update current activity: watching ${streamInfo.user_name}.`);
        } else {
            console.log('[' + moment.utc().format('MM/DD/YYYY-h:mm:ss-A') + '][StreamActivity]', 'Cleared current activity.');

            this.discordClient.user.setActivity(null);
        }
    }
/**
     * Updates the user activity on Discord.
     * Either clears the activity if no channels are online, or sets it to "watching" if a stream is up.
     */
Updates the user activity on Discord.
Either clears the activity if no channels are online, or sets it to "watching" if a stream is up.
Updates the user activity on Discord . Either clears the activity if no channels are online or sets it to " watching " if a stream is up .
static updateActivity() {
        let streamInfo = this.getMostRecentStreamInfo();
        if (streamInfo) {
            this.discordClient.user.setActivity(streamInfo.user_name, {
                "url": `https://twitch.tv/${streamInfo.user_name.toLowerCase()}`,
                "type": "STREAMING"
            });
            console.log('[' + moment.utc().format('MM/DD/YYYY-h:mm:ss-A') + '][StreamActivity]', `Update current activity: watching ${streamInfo.user_name}.`);
        } else {
            console.log('[' + moment.utc().format('MM/DD/YYYY-h:mm:ss-A') + '][StreamActivity]', 'Cleared current activity.');
            this.discordClient.user.setActivity(null);
        }
    }
static updateActivity ( ) { let streamInfo = this . getMostRecentStreamInfo ( ) ; if ( streamInfo ) { this . discordClient . user . setActivity ( streamInfo . user_name , { "url" : ` ${ streamInfo . user_name . toLowerCase ( ) } ` , "type" : "STREAMING" } ) ; console . log ( '[' + moment . utc ( ) . format ( 'MM/DD/YYYY-h:mm:ss-A' ) + '][StreamActivity]' , ` ${ streamInfo . user_name } ` ) ; } else { console . log ( '[' + moment . utc ( ) . format ( 'MM/DD/YYYY-h:mm:ss-A' ) + '][StreamActivity]' , 'Cleared current activity.' ) ; this . discordClient . user . setActivity ( null ) ; } }
Updates the user activity on Discord.
Updates the user activity on Discord .