generated from Baipyrus/DiscordJS-Template
ignore bot-owned messages
This commit is contained in:
parent
cbefb18dcd
commit
c13d0cb193
@ -5,8 +5,8 @@ import { Op } from 'sequelize';
|
||||
export const name = Events.MessageCreate;
|
||||
/** @param {Message} message */
|
||||
export async function execute(message) {
|
||||
// Ignore direct messages
|
||||
if (!message.inGuild()) return;
|
||||
// Ignore direct messages and own messages
|
||||
if (!message.inGuild() || message.author.id === process.env.CLIENT) return;
|
||||
|
||||
// Split message content into words
|
||||
const words = message.content.split(/\s+/);
|
||||
|
Loading…
Reference in New Issue
Block a user