mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-11-17 12:21:00 -05:00
Update messageCreate.ts
This commit is contained in:
parent
125bfb85b6
commit
2e9866305e
@ -41,10 +41,8 @@ export default {
|
|||||||
await client.punishments.addPunishment('mute', { time: '30m' }, (client.user as Discord.User).id, 'Automod; Banned words', message.author, message.member as Discord.GuildMember);
|
await client.punishments.addPunishment('mute', { time: '30m' }, (client.user as Discord.User).id, 'Automod; Banned words', message.author, message.member as Discord.GuildMember);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
client.repeatedMessages[message.author.id] = {data: new client.collection(), timeout: setTimeout(onTimeout, threshold)}
|
client.repeatedMessages[message.author.id] = { data: new client.collection(), timeout: setTimeout(onTimeout, threshold) };
|
||||||
client.repeatedMessages[message.author.id].data.set(message.createdTimestamp, {cont: 0, ch: message.channelId});
|
client.repeatedMessages[message.author.id].data.set(message.createdTimestamp, {cont: 0, ch: message.channelId});
|
||||||
// autodelete after 30 secs
|
|
||||||
client.repeatedMessages[message.author.id].timeout = setTimeout(onTimeout, threshold);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (message.content.toLowerCase().includes('discord.gg/') && !message.member.roles.cache.has(client.config.mainServer.roles.dcmod) && message.guildId == client.config.mainServer.id && !Whitelist.includes(message.channelId)) {
|
if (message.content.toLowerCase().includes('discord.gg/') && !message.member.roles.cache.has(client.config.mainServer.roles.dcmod) && message.guildId == client.config.mainServer.id && !Whitelist.includes(message.channelId)) {
|
||||||
@ -67,9 +65,8 @@ export default {
|
|||||||
await client.punishments.addPunishment('mute', {time: '1h'}, (client.user as Discord.User).id, 'Automod; Discord advertisement', message.author, message.member as Discord.GuildMember);
|
await client.punishments.addPunishment('mute', {time: '1h'}, (client.user as Discord.User).id, 'Automod; Discord advertisement', message.author, message.member as Discord.GuildMember);
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
client.repeatedMessages[message.author.id].data = new client.collection();
|
client.repeatedMessages[message.author.id] = { data: new client.collection(), timeout: setTimeout(onTimeout, threshold) };
|
||||||
client.repeatedMessages[message.author.id].data.set(message.createdTimestamp, {cont: 1, ch: message.channelId});
|
client.repeatedMessages[message.author.id].data.set(message.createdTimestamp, {cont: 1, ch: message.channelId});
|
||||||
client.repeatedMessages[message.author.id].timeout = setTimeout(onTimeout, threshold);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user