diff --git a/src/main/java/com/hypherionmc/sdlink/core/config/impl/ChannelWebhookConfig.java b/src/main/java/com/hypherionmc/sdlink/core/config/impl/ChannelWebhookConfig.java index 4ecf179..eabf94d 100644 --- a/src/main/java/com/hypherionmc/sdlink/core/config/impl/ChannelWebhookConfig.java +++ b/src/main/java/com/hypherionmc/sdlink/core/config/impl/ChannelWebhookConfig.java @@ -32,15 +32,15 @@ public class ChannelWebhookConfig { public static class Channels { @Path("chatChannelID") @SpecComment("REQUIRED! The ID of the channel to post in and relay messages from. This is still needed, even in webhook mode") - public long chatChannelID = 0; + public String chatChannelID = "0"; @Path("eventsChannelID") @SpecComment("If this ID is set, event messages will be posted in this channel instead of the chat channel") - public long eventsChannelID = 0; + public String eventsChannelID = "0"; @Path("consoleChannelID") @SpecComment("If this ID is set, console messages sent after the bot started will be relayed here") - public long consoleChannelID = 0; + public String consoleChannelID = "0"; } public static class Webhooks { diff --git a/src/main/java/com/hypherionmc/sdlink/core/managers/PermissionChecker.java b/src/main/java/com/hypherionmc/sdlink/core/managers/PermissionChecker.java index 4b01e7a..382b10d 100644 --- a/src/main/java/com/hypherionmc/sdlink/core/managers/PermissionChecker.java +++ b/src/main/java/com/hypherionmc/sdlink/core/managers/PermissionChecker.java @@ -142,8 +142,8 @@ public class PermissionChecker { }); } - private static void checkChannelPerms(Long channelID, String channelName, AtomicInteger errCount, StringBuilder builder, Member bot, boolean channelRequired, boolean isChat) { - if (channelRequired && channelID == 0) { + private static void checkChannelPerms(String channelID, String channelName, AtomicInteger errCount, StringBuilder builder, Member bot, boolean channelRequired, boolean isChat) { + if (channelRequired && channelID.equalsIgnoreCase("0")) { errCount.incrementAndGet(); builder.append(errCount.get()) .append(") ")