don't ignore keywords from bots

cause i miss mentions from chat bridges
This commit is contained in:
Lamp 2019-04-05 13:08:57 -07:00 committed by GitHub
parent 3aab062b09
commit bb4e94d447
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -241,7 +241,7 @@ client.on('message', async function(message){
let webhook = config.mentionChannelWebhook;
webhook = new Discord.WebhookClient(webhook.id, webhook.token);
client.on("message", async message => {
if (message.author.bot || message.author.id == client.user.id || !message.guild || message.guild.muted) return;
if (message.author.id == client.user.id || !message.guild || message.guild.muted) return;
for (let keyword of config.mentionKeywords) {
if (message.content.toLowerCase().includes(keyword)) {
webhook.send(`<@${client.user.id}> https://discordapp.com/channels/${message.guild ? message.guild.id + "/" : ""}${message.channel.id}/${message.id}`, {embeds:[{