Skip to content
Snippets Groups Projects
Commit b6caa8ee authored by Reviath's avatar Reviath
Browse files

If message content mentions client user, bot will send prefix.

parent ab6df33a
No related branches found
No related tags found
No related merge requests found
...@@ -16,6 +16,16 @@ module.exports = { ...@@ -16,6 +16,16 @@ module.exports = {
prefix = prefixdb[0].prefix; prefix = prefixdb[0].prefix;
}; };
if (message.channel.type === "dm") return; if (message.channel.type === "dm") return;
if (message.content.toLowerCase() == `<@!${client.user.id}>`) {
message.channel.send(`My prefix is ${prefix}`).catch(() => {
return;
});
};
if (message.content.toLowerCase() == `<@${client.user.id}>`) {
message.channel.send(`My prefix is ${prefix}`).catch(() => {
return;
});
};
let args = message.content.slice(prefix.length).trim().split(' '); let args = message.content.slice(prefix.length).trim().split(' ');
let cmd = args.shift().toLowerCase(); let cmd = args.shift().toLowerCase();
let command; let command;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment