@@ -0,0 +1,1331 @@
+package top.quantic.sentry.service.util;%0A%0Aimport com.google.common.util.concurrent.RateLimiter;%0Aimport sx.blah.discord.handle.obj.IChannel;%0Aimport sx.blah.discord.handle.obj.IMessage;%0A%0Aimport java.util.Map;%0Aimport java.util.concurrent.ConcurrentHashMap;%0A%0Apublic class DiscordLimiter %7B%0A%0A    private static final RateLimiter GLOBAL = RateLimiter.create(5);%0A    private static final Map%3CString, RateLimiter%3E SERVER = new ConcurrentHashMap%3C%3E();%0A    private static final RateLimiter DM = RateLimiter.create(1);%0A    private static final RateLimiter DELETE = RateLimiter.create(1);%0A%0A    public static void acquire(IChannel channel) %7B%0A        if (channel.isPrivate()) %7B%0A            acquireDM();%0A        %7D else %7B%0A            acquire(channel.getGuild().getID());%0A        %7D%0A    %7D%0A%0A    public static void acquire(IMessage message) %7B%0A        if (message.getChannel().isPrivate()) %7B%0A            acquireDM();%0A        %7D else %7B%0A            acquire(message.getChannel().getGuild().getID());%0A        %7D%0A    %7D%0A%0A    public static void acquire(String guildId) %7B%0A        SERVER.computeIfAbsent(guildId, k -%3E RateLimiter.create(1)).acquire();%0A        GLOBAL.acquire();%0A    %7D%0A%0A    public static void acquireDM() %7B%0A        DM.acquire();%0A    %7D%0A%0A    public static void acquireDelete() %7B%0A        DELETE.acquire();%0A    %7D%0A%0A    private DiscordLimiter() %7B%0A%0A    %7D%0A%7D%0A

Add rate limiter