3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-20 16:25:03 +00:00

Allowlist instead of blocklist

This commit is contained in:
Dark 2021-04-28 22:03:49 +02:00
parent d8a8813c91
commit c4ce74e0d5
No known key found for this signature in database
GPG key ID: 384C4B4F5B1E25A8

View file

@ -19,8 +19,9 @@ export const SetSlowmodeAction = automodAction({
for (const channelId of actionConfig.channels) { for (const channelId of actionConfig.channels) {
const channel = pluginData.guild.channels.get(channelId); const channel = pluginData.guild.channels.get(channelId);
// 2 = Guild Voice, 5 = Guild News - Both dont allow slowmode // 0 = Guild Text, 4 = Guild Category - Both dont allow slowmode
if (!channel || channel.type === 2 || channel.type === 5) continue; if (!channel) continue;
if (channel.type === 0 || channel.type === 4) continue;
let channelsToSlowmode: AnyGuildChannel[] = []; let channelsToSlowmode: AnyGuildChannel[] = [];
if (channel.type === 4) { if (channel.type === 4) {