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;
|
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+/);
|
||||||
|
Loading…
Reference in New Issue
Block a user