Не учитывать сообщения с префиксом

This commit is contained in:
JonnyBro 2022-01-01 23:32:01 +05:00
parent 246464e4b5
commit 5319acdec6
2 changed files with 4 additions and 9 deletions

View file

@ -65,16 +65,11 @@ class FindWords extends Command {
});
collector.on("collect", (msg) => {
if (!participants.includes(msg.author.id)) {
participants.push(msg.author.id);
};
if (this.client.functions.getPrefix(msg, data)) return;
if (!participants.includes(msg.author.id)) participants.push(msg.author.id);
if (msg.content.toLowerCase().indexOf(word) >= 0 && wordList.map((word) => word.toLowerCase()).indexOf(msg.content.toLowerCase()) >= 0) {
collector.stop(msg.author.id); // Stop the collector
} else {
msg.error("fun/findwords:INVALID_WORD", {
member: msg.author.toString()
});
};
} else msg.error("fun/findwords:INVALID_WORD", { member: msg.author.toString() });
});
collector.on("end", async (collected, reason) => {

View file

@ -36,8 +36,8 @@ class Number extends Command {
currentGames[message.guild.id] = true;
collector.on("collect", async msg => {
if (this.client.functions.getPrefix(msg, data)) return;
if (!participants.includes(msg.author.id)) participants.push(msg.author.id);
if (isNaN(msg.content)) return;
const parsedNumber = parseInt(msg.content, 10);