mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2024-12-23 05:53:18 +00:00
Added messageDelete event
This commit is contained in:
parent
492df398ff
commit
1fd6c2c691
@ -52,6 +52,10 @@ class RadioClient extends Client {
|
|||||||
require(`${events}messageCreate`).execute(this, msg);
|
require(`${events}messageCreate`).execute(this, msg);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this.on("messageDelete", msg => {
|
||||||
|
require(`${events}messageDelete`).execute(this, msg);
|
||||||
|
});
|
||||||
|
|
||||||
this.on("interactionCreate", interaction => {
|
this.on("interactionCreate", interaction => {
|
||||||
require(`${events}interactionCreate`).execute(this, interaction);
|
require(`${events}interactionCreate`).execute(this, interaction);
|
||||||
});
|
});
|
||||||
|
10
src/client/events/messageDelete.js
Normal file
10
src/client/events/messageDelete.js
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
module.exports = {
|
||||||
|
name: 'messageDelete',
|
||||||
|
async execute(client, msg) {
|
||||||
|
if (!msg.author.bot || !msg.guild) return;
|
||||||
|
const radio = client.radio.get(msg.guild.id);
|
||||||
|
if (!radio) return;
|
||||||
|
if(msg.id != radio.message.id) return;
|
||||||
|
radio.message = null;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user