mirror of
				https://github.com/warengroup/eximiabots-radiox.git
				synced 2025-11-04 10:09:36 +00:00 
			
		
		
		
	Add warning event
This commit is contained in:
		@@ -81,6 +81,10 @@ class RadioClient extends Client {
 | 
				
			|||||||
            require(`${events}voiceStateUpdate`).execute(this, oldState, newState);
 | 
					            require(`${events}voiceStateUpdate`).execute(this, oldState, newState);
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        this.on("error", error => {
 | 
				
			||||||
 | 
					            console.error(error);
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        process.on('SIGINT', () => {
 | 
					        process.on('SIGINT', () => {
 | 
				
			||||||
            require(`${events}SIGINT`).execute(this);
 | 
					            require(`${events}SIGINT`).execute(this);
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
@@ -97,8 +101,14 @@ class RadioClient extends Client {
 | 
				
			|||||||
            this.funcs.logger("Bot", "Stopping");
 | 
					            this.funcs.logger("Bot", "Stopping");
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        this.on("error", error => {
 | 
					        process.on('warning', (warning) => {
 | 
				
			||||||
            console.error(error);
 | 
					            if(warning.name == "ExperimentalWarning" && warning.message.startsWith("stream/web")) return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            this.funcs.logger("Warning");
 | 
				
			||||||
 | 
					            console.warn(warning.name);
 | 
				
			||||||
 | 
					            console.warn(warning.message);
 | 
				
			||||||
 | 
					            console.warn(warning.stack);
 | 
				
			||||||
 | 
					            console.log('');
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        this.login(this.config.token).catch(err => console.log("Failed to login: " + err));
 | 
					        this.login(this.config.token).catch(err => console.log("Failed to login: " + err));
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user