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

Finish preliminary rework, ready to test

This commit is contained in:
Dark 2021-06-02 04:07:50 +02:00
parent 293a850075
commit c99e745f89
177 changed files with 854 additions and 707 deletions

View file

@ -1,3 +1,4 @@
import { GuildChannel, TextChannel } from "discord.js";
import { GuildPluginData } from "knub";
import { SlowmodePluginType } from "../types";
@ -12,7 +13,7 @@ export async function clearBotSlowmodeFromUserId(
// Previously we diffed the overrides so we could clear the "send messages" override without touching other
// overrides. Unfortunately, it seems that was a bit buggy - we didn't always receive the event for the changed
// overrides and then we also couldn't diff against them. For consistency's sake, we just delete the override now.
await channel.deletePermission(userId);
await channel.permissionOverwrites.get(userId)?.delete();
} catch (e) {
if (!force) {
throw e;