client.js
/**
         * Starts the observers and behave like a observable.
         */
Starts the observers and behave like a observable.
Starts the observers and behave like a observable .
startObservation() {
            this.client.on(clientOnMessageListenerName, (message) => {
                if (message.channel.type != "dm") {
                    this.publicMessageListeners.forEach((observer) => observer.notify(message));
                }
            });
            this.client.on(clientOnGuildCreateListenerName, (guild) => {
                this.database.addGuild(guild.id);
            });
            this.client.on(clientOnGuildDeleteListenerName, (guild) => {
                this.database.deleteGuild(guild.id);
            });
        }
startObservation ( ) { this . client . on ( clientOnMessageListenerName , ( message ) => { if ( message . channel . type != "dm" ) { this . publicMessageListeners . forEach ( ( observer ) => observer . notify ( message ) ) ; } } ) ; this . client . on ( clientOnGuildCreateListenerName , ( guild ) => { this . database . addGuild ( guild . id ) ; } ) ; this . client . on ( clientOnGuildDeleteListenerName , ( guild ) => { this . database . deleteGuild ( guild . id ) ; } ) ; }
Starts the observers and behave like a observable.
Starts the observers and behave like a observable .