ignore bot-owned messages

This commit is contained in:
Baipyrus 2024-04-10 07:52:23 +02:00
parent cbefb18dcd
commit c13d0cb193

View File

@ -5,8 +5,8 @@ import { Op } from 'sequelize';
export const name = Events.MessageCreate; export const name = Events.MessageCreate;
/** @param {Message} message */ /** @param {Message} message */
export async function execute(message) { export async function execute(message) {
// Ignore direct messages // Ignore direct messages and own messages
if (!message.inGuild()) return; if (!message.inGuild() || message.author.id === process.env.CLIENT) return;
// Split message content into words // Split message content into words
const words = message.content.split(/\s+/); const words = message.content.split(/\s+/);