Skip to content

Commit

Permalink
fix channel.parent for forum compat
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Oct 5, 2022
1 parent 3c9bc15 commit 7a0a1fd
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
import net.dv8tion.jda.api.entities.channel.concrete.ThreadChannel;
import net.dv8tion.jda.api.entities.channel.middleman.AudioChannel;
import net.dv8tion.jda.api.entities.channel.middleman.GuildChannel;
import net.dv8tion.jda.api.entities.channel.middleman.GuildMessageChannel;
import net.dv8tion.jda.api.entities.channel.middleman.MessageChannel;
import net.dv8tion.jda.api.entities.channel.unions.IThreadContainerUnion;

public class DiscordChannelTag implements ObjectTag, FlaggableObject, Adjustable {

Expand Down Expand Up @@ -186,7 +186,7 @@ public static void registerTags() {
attribute.echoError("Cannot get 'parent' tag: this channel is not a thread.");
return null;
}
GuildMessageChannel parent = ((ThreadChannel) channel).getParentMessageChannel();
IThreadContainerUnion parent = ((ThreadChannel) channel).getParentChannel();
return new DiscordChannelTag(object.bot, parent);
});

Expand Down

0 comments on commit 7a0a1fd

Please sign in to comment.