From 0524c430ef5cd113a5e84b307c98bcd6d5b559a7 Mon Sep 17 00:00:00 2001 From: Duncan Sterken Date: Sat, 25 Nov 2017 13:44:36 +0100 Subject: [PATCH] Stupid feature, it's disabled (for now) --- .../java/ml/duncte123/skybot/BotListener.java | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/src/main/java/ml/duncte123/skybot/BotListener.java b/src/main/java/ml/duncte123/skybot/BotListener.java index 7d891fb6d..520638e04 100644 --- a/src/main/java/ml/duncte123/skybot/BotListener.java +++ b/src/main/java/ml/duncte123/skybot/BotListener.java @@ -223,19 +223,20 @@ public void onGuildMemberJoin(GuildMemberJoinEvent event) { */ @Override public void onGuildJoin(GuildJoinEvent event) { + //Temp disable that //if 60 of a guild is bots, we'll leave it - double[] botToUserRatio = AirUtils.getBotRatio(event.getGuild()); - if (botToUserRatio[1] > 60) { - AirUtils.getPublicChannel(event.getGuild()).sendMessage(String.format("Hey %s, %s%s of this guild are bots (%s is the total btw). Iḿ outta here.", - event.getGuild().getOwner().getAsMention(), - botToUserRatio[1], - "%", - event.getGuild().getMemberCache().size())).queue( - message -> message.getGuild().leave().queue() - ); - AirUtils.log(Settings.defaultName + "GuildJoin", Level.INFO, "Joining guild: " + event.getGuild().getName() + ", and leaving it after. BOT ALERT"); - return; - } +// double[] botToUserRatio = AirUtils.getBotRatio(event.getGuild()); +// if (botToUserRatio[1] > 60) { +// AirUtils.getPublicChannel(event.getGuild()).sendMessage(String.format("Hey %s, %s%s of this guild are bots (%s is the total btw). Iḿ outta here.", +// event.getGuild().getOwner().getAsMention(), +// botToUserRatio[1], +// "%", +// event.getGuild().getMemberCache().size())).queue( +// message -> message.getGuild().leave().queue() +// ); +// AirUtils.log(Settings.defaultName + "GuildJoin", Level.INFO, "Joining guild: " + event.getGuild().getName() + ", and leaving it after. BOT ALERT"); +// return; +// } AirUtils.log(Settings.defaultName + "GuildJoin", Level.INFO, "Joining guild: " + event.getGuild().getName() + "."); GuildSettingsUtils.registerNewGuild(event.getGuild()); AirUtils.updateGuildCount(event.getJDA(), event.getJDA().asBot().getShardManager().getGuildCache().size());