Only ignore bots if that bot is myself
This commit is contained in:
parent
7c0eae8827
commit
c45fa88419
@ -19,9 +19,9 @@ module.exports = {
|
|||||||
.setRequired(true)
|
.setRequired(true)
|
||||||
),
|
),
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
var abbreviation = interaction.options.getString('abbreviation');
|
var abbreviation = interaction.options.toLowerCase().getString('abbreviation');
|
||||||
var phrase = interaction.options.getString('phrase');
|
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);
|
addPhrase(abbreviation, phrase);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
3
main.ts
3
main.ts
@ -99,8 +99,11 @@ function replyMessage(message, correctedMessage) {
|
|||||||
client.on('messageCreate', message => {
|
client.on('messageCreate', message => {
|
||||||
console.log(`${message.author.tag} in #${message.channel.name} sent: ${message.content}`);
|
console.log(`${message.author.tag} in #${message.channel.name} sent: ${message.content}`);
|
||||||
if (message.author.bot) {
|
if (message.author.bot) {
|
||||||
|
//console.log(message.author);
|
||||||
|
if (message.author.id == "1091120267851485215") {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
var matchMessageArray = message.content.toLowerCase().split(/[ ,!@#$%^&*().;:|]+/);
|
var matchMessageArray = message.content.toLowerCase().split(/[ ,!@#$%^&*().;:|]+/);
|
||||||
|
|
||||||
console.log(matchMessageArray);
|
console.log(matchMessageArray);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user