mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-25 14:44:58 +05:00
Не учитывать сообщения с префиксом
This commit is contained in:
parent
246464e4b5
commit
5319acdec6
2 changed files with 4 additions and 9 deletions
|
@ -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) => {
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue