mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2025-07-01 22:23:38 +00:00
Simplify events
This commit is contained in:
@ -1,14 +1,11 @@
|
||||
import { Message, PartialMessage } from "discord.js";
|
||||
import RadioClient from "../../Client";
|
||||
|
||||
export default {
|
||||
name: 'messageDelete',
|
||||
async execute(client: RadioClient, msg: Message | PartialMessage) {
|
||||
if(!msg.author?.bot || !msg.guild) return;
|
||||
const radio = client.radio?.get(msg.guild.id);
|
||||
if(!radio) return;
|
||||
if(!radio.message) return;
|
||||
if(msg.id != radio.message.id) return;
|
||||
radio.message = null;
|
||||
}
|
||||
export default function messageDelete(client: RadioClient, msg: Message | PartialMessage){
|
||||
if(!msg.author?.bot || !msg.guild) return;
|
||||
const radio = client.radio?.get(msg.guild.id);
|
||||
if(!radio) return;
|
||||
if(!radio.message) return;
|
||||
if(msg.id != radio.message.id) return;
|
||||
radio.message = null;
|
||||
}
|
||||
|
Reference in New Issue
Block a user