Fix the errors?

Signed-off-by: loicbersier <loic.bersier1@gmail.com>
This commit is contained in:
loicbersier 2020-09-04 13:56:10 +02:00
parent aba72cac11
commit 200ad3b47a

View file

@ -19,8 +19,12 @@ class messageDeleteListener extends Listener {
if (!message.guild) return;
if (!message.author) return;
if (message.author)
if (!message.author.bot) return;
const logStats = await LogStats.findOne({where: {guild: message.guild.id}});
if (logStats && !message.author.bot) {
if (logStats) {
const fetchedLogs = await message.guild.fetchAuditLogs({
limit: 1,
type: 'MESSAGE_DELETE',