added error handling + log
This commit is contained in:
parent
466686db7a
commit
d60d217f5b
Binary file not shown.
Before Width: | Height: | Size: 280 KiB After Width: | Height: | Size: 279 KiB |
|
@ -92,6 +92,7 @@ client.on('ready', () => {
|
|||
console.log("New: " + radar_image_size);
|
||||
|
||||
if(radar_image_size != curr_image_size) {
|
||||
console.log("File change detected!");
|
||||
let message = await channel.send({
|
||||
content: radar_caption,
|
||||
files: [curr_image_path]
|
||||
|
@ -104,4 +105,12 @@ client.on('ready', () => {
|
|||
})();
|
||||
});
|
||||
|
||||
client.on(Events.ShardError, error => {
|
||||
console.log('A websocket connection encountered an error: ', error);
|
||||
});
|
||||
|
||||
process.on('unhandledRejection', error => {
|
||||
console.error(error);
|
||||
});
|
||||
|
||||
client.login(config.token);
|
||||
|
|
Loading…
Reference in New Issue