mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2024-11-10 03:00:18 +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', () => {
|
process.on('SIGINT', () => {
|
||||||
require(`${events}SIGINT`).execute(this);
|
require(`${events}SIGINT`).execute(this);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
process.on('SIGTERM', () => {
|
||||||
|
require(`${events}SIGTERM`).execute(this);
|
||||||
|
});
|
||||||
|
|
||||||
this.on("error", error => {
|
this.on("error", error => {
|
||||||
console.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