mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2024-12-22 20:23:16 +00:00
Added SIGTERM event
This commit is contained in:
parent
45b23722fa
commit
430e0f9e51
@ -75,6 +75,10 @@ class RadioClient extends Client {
|
||||
process.on('SIGINT', () => {
|
||||
require(`${events}SIGINT`).execute(this);
|
||||
});
|
||||
|
||||
process.on('SIGTERM', () => {
|
||||
require(`${events}SIGTERM`).execute(this);
|
||||
});
|
||||
|
||||
this.on("error", error => {
|
||||
console.error(error);
|
||||
|
6
src/client/events/SIGTERM.js
Normal file
6
src/client/events/SIGTERM.js
Normal file
@ -0,0 +1,6 @@
|
||||
module.exports = {
|
||||
name: 'SIGTERM',
|
||||
async execute(client) {
|
||||
process.emit('SIGINT');
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user