Skip to content

Commit 7a5fad9

Browse files
committed
feat: exclude honeypot from error analyzer
1 parent fb0682a commit 7a5fad9

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/main/java/org/geysermc/discordbot/storage/ServerSettings.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,15 @@ public static boolean shouldNotLogChannel(MessageChannel channel) {
194194
* @return If we should exclude the channel
195195
*/
196196
public static boolean shouldNotCheckError(MessageChannel channel) {
197+
Guild server = getGuild(channel);
197198

198-
if (getGuild(channel) == null) {
199+
if (server == null) {
200+
return true;
201+
}
202+
203+
// Ignore file handling in Honeypot channels
204+
String honeyPotChannelId = GeyserBot.storageManager.getServerPreference(server.getIdLong(), "honey-pot-channel");
205+
if (honeyPotChannelId != null && honeyPotChannelId.equals(channel.getId())) {
199206
return true;
200207
}
201208

0 commit comments

Comments
 (0)