Skip to content

Commit

Permalink
Include channel topic in archive
Browse files Browse the repository at this point in the history
  • Loading branch information
randomnetcat committed Jan 2, 2024
1 parent 23f85e5 commit 2b7fdfc
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import net.dv8tion.jda.api.entities.channel.concrete.ThreadChannel
import net.dv8tion.jda.api.entities.channel.forums.ForumTag
import net.dv8tion.jda.api.entities.channel.middleman.GuildChannel
import net.dv8tion.jda.api.entities.channel.middleman.MessageChannel
import net.dv8tion.jda.api.entities.channel.middleman.StandardGuildMessageChannel
import net.dv8tion.jda.api.interactions.components.Component
import org.randomcat.agorabot.commands.DiscordArchiver
import org.slf4j.LoggerFactory
Expand Down Expand Up @@ -736,6 +737,10 @@ private suspend fun receiveGlobalData(
add("position", channel.position)
}

if (channel is StandardGuildMessageChannel) {
channel.topic?.let { add("topic", it) }
}

if (channel is IPostContainer) {
channel.topic?.let { add("post_topic", it) }

Expand Down

0 comments on commit 2b7fdfc

Please sign in to comment.