@@ -71,7 +71,7 @@ private static void sendReminder(@NotNull JDA jda, long id, long channelId, long
7171 private static RestAction <ReminderRoute > computeReminderRoute (@ NotNull JDA jda , long channelId ,
7272 long authorId ) {
7373 // If guild channel can still be found, send there
74- TextChannel channel = jda .getTextChannelById ( channelId );
74+ MessageChannel channel = jda .getChannelById ( MessageChannel . class , channelId );
7575 if (channel != null ) {
7676 return createGuildReminderRoute (jda , authorId , channel );
7777 }
@@ -81,7 +81,7 @@ private static RestAction<ReminderRoute> computeReminderRoute(@NotNull JDA jda,
8181 }
8282
8383 private static @ NotNull RestAction <ReminderRoute > createGuildReminderRoute (@ NotNull JDA jda ,
84- long authorId , @ NotNull TextChannel channel ) {
84+ long authorId , @ NotNull MessageChannel channel ) {
8585 return jda .retrieveUserById (authorId )
8686 .onErrorMap (error -> null )
8787 .map (author -> ReminderRoute .toPublic (channel , author ));
@@ -128,7 +128,7 @@ Failed to send a reminder (id '{}'), skipping it. This can be due to a network i
128128
129129 private record ReminderRoute (@ NotNull MessageChannel channel , @ Nullable User target ,
130130 @ Nullable String description ) {
131- static ReminderRoute toPublic (@ NotNull TextChannel channel , @ Nullable User target ) {
131+ static ReminderRoute toPublic (@ NotNull MessageChannel channel , @ Nullable User target ) {
132132 return new ReminderRoute (channel , target ,
133133 target == null ? null : target .getAsMention ());
134134 }
0 commit comments