Only ignore bots if that bot is myself

This commit is contained in:
Chloe Fontenot 🏳️‍⚧️ 2023-04-01 00:01:32 -05:00
parent 849e961d91
commit 11396d8bb9
2 changed files with 6 additions and 3 deletions

View File

@ -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);
},
};

View File

@ -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(/[ ,!@#$%^&*().;:|]+/);