Don't log bots
Signed-off-by: loicbersier <loic.bersier1@gmail.com>
This commit is contained in:
parent
76088da799
commit
72d474f06a
2 changed files with 2 additions and 2 deletions
|
@ -11,7 +11,7 @@ class messageDeleteListener extends Listener {
|
|||
|
||||
async exec(message) {
|
||||
const logStats = await LogStats.findOne({where: {guild: message.guild.id}});
|
||||
if (logStats) {
|
||||
if (logStats && !message.author.bot) {
|
||||
const fetchedLogs = await message.guild.fetchAuditLogs({
|
||||
limit: 1,
|
||||
type: 'MESSAGE_DELETE',
|
||||
|
|
|
@ -11,7 +11,7 @@ class messageUpdateListener extends Listener {
|
|||
|
||||
async exec(oldMessage, newMessage) {
|
||||
const logStats = await LogStats.findOne({where: {guild: newMessage.guild.id}});
|
||||
if (logStats && oldMessage.content !== newMessage.content) {
|
||||
if (logStats && oldMessage.content !== newMessage.content && !message.author.bot) {
|
||||
const channel = this.client.channels.resolve(await logStats.get('channel'));
|
||||
let Embed = this.client.util.embed()
|
||||
.setColor('NAVY')
|
||||
|
|
Loading…
Reference in a new issue