Skip to content

Commit

Permalink
feat: prefix check when mentioning
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperchupuDev committed Oct 3, 2021
1 parent 35cd16a commit 0b80539
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions events/messageCreate.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@ module.exports = {
const array = message.content.replace(message.prefix, '').split(' ');
const args = array.slice(1);

if (message.content === `<@${client.user.id}>` || message.content === `<@!${client.user.id}>`) {
return message.channel.send({
embeds: [{
title: 'Prefix',
description: `My prefix is \`${message.prefix}\``,
color: client.config.color
}]
});
}

if (!message.content.startsWith(message.prefix)) {
await require('../detector/detector.js')(client, message, database);
return;
Expand Down

0 comments on commit 0b80539

Please sign in to comment.