Skip to content

Commit

Permalink
Fix forum support
Browse files Browse the repository at this point in the history
  • Loading branch information
NoComment1105 committed Mar 25, 2023
1 parent 571ee75 commit 6bcfbe0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ grgit = "5.0.0"
blossom = "1.3.1"

# Libraries
kord-extensions = "1.5.6-20230325.112450-12"
kord-extensions = "1.5.7-20230325.173116-4"
logging = "3.0.5"
logback = "1.4.6"
github-api = "1.314"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import dev.kord.core.behavior.channel.editRolePermission
import dev.kord.core.behavior.edit
import dev.kord.core.entity.channel.Channel
import dev.kord.core.entity.channel.TextChannel
import dev.kord.core.entity.channel.ThreadParentChannel
import dev.kord.core.entity.channel.thread.TextChannelThread
import kotlinx.datetime.Clock
import org.hyacinthbots.lilybot.extensions.config.ConfigOptions
Expand Down Expand Up @@ -315,12 +316,12 @@ class LockingCommands : Extension() {
* @since 4.8.0
*/
private suspend inline fun getChannelParent(channelArg: Channel?): TextChannel? {
var channelParent: TextChannel? = null
var channelParent: ThreadParentChannel? = null
if (channelArg is TextChannelThread) {
channelParent = channelArg.getParent()
}

return channelParent
return channelParent?.asChannelOfOrNull()
}

/**
Expand Down

0 comments on commit 6bcfbe0

Please sign in to comment.