From 11396d8bb923b28d000c4d3ca45dc9cdcbe8c85c Mon Sep 17 00:00:00 2001 From: Caleb Fontenot Date: Sat, 1 Apr 2023 00:01:32 -0500 Subject: [PATCH] Only ignore bots if that bot is myself --- commands/addPhrase.ts | 4 ++-- main.ts | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/commands/addPhrase.ts b/commands/addPhrase.ts index f5a3d96..90d9487 100644 --- a/commands/addPhrase.ts +++ b/commands/addPhrase.ts @@ -19,9 +19,9 @@ module.exports = { .setRequired(true) ), async execute(interaction) { - var abbreviation = interaction.options.getString('abbreviation'); + var abbreviation = interaction.options.toLowerCase().getString('abbreviation'); var phrase = interaction.options.getString('phrase'); - await interaction.reply('Adding phrase `' + abbreviation + "` to target list. This will complete to the phrase `" + phrase + "`"); + await interaction.reply('Adding abbreviation `' + abbreviation + "` to target list. This will complete to the phrase `" + phrase + "`"); addPhrase(abbreviation, phrase); }, }; diff --git a/main.ts b/main.ts index 96afe21..acbe60d 100644 --- a/main.ts +++ b/main.ts @@ -99,7 +99,10 @@ function replyMessage(message, correctedMessage) { client.on('messageCreate', message => { console.log(`${message.author.tag} in #${message.channel.name} sent: ${message.content}`); if (message.author.bot) { - return; + //console.log(message.author); + if (message.author.id == "1091120267851485215") { + return; + } } var matchMessageArray = message.content.toLowerCase().split(/[ ,!@#$%^&*().;:|]+/);