File tree Expand file tree Collapse file tree
application/src/main/java/org/togetherjava/tjbot/features/utils Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,14 +22,14 @@ public static ForumPoster using(JDA jda) {
2222
2323 private ForumChannel findForumChannel (String channelId ) {
2424 return Optional .ofNullable (jda .getForumChannelById (channelId ))
25- .orElseThrow (() -> new IllegalStateException (
25+ .orElseThrow (() -> new IllegalArgumentException (
2626 "Did not find a forum channel with ID %s while trying to create a forum post. Make sure the config is setup properly." ));
2727 }
2828
2929 private ThreadChannel findForumPost (String postId ) {
3030 return Optional .ofNullable (jda .getThreadChannelById (postId ))
31- .orElseThrow (() -> new IllegalStateException (
32- "Did not find the forum post with ID %s while trying to reply to a post. Make sure the config is setup properly. " ));
31+ .orElseThrow (() -> new IllegalArgumentException (
32+ "Did not find the forum post with ID %s while trying to reply to a post." ));
3333
3434 }
3535
You can’t perform that action at this time.
0 commit comments