mirror of
https://github.com/dalbodeule/chibot-chzzk-bot.git
synced 2025-06-09 07:18:22 +00:00
apiDiscordRoutes fix. (17x)
- wrong type definition(GuildChannel.type) fix
This commit is contained in:
parent
f85cbb8111
commit
15d6f3d9b1
@ -310,7 +310,7 @@ enum class ChannelType(val value: Int) {
|
|||||||
@Serializable
|
@Serializable
|
||||||
data class GuildChannel(
|
data class GuildChannel(
|
||||||
val id: String,
|
val id: String,
|
||||||
val type: ChannelType,
|
val type: Int,
|
||||||
val name: String?
|
val name: String?
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -133,7 +133,7 @@ object DiscordGuildCache {
|
|||||||
return mutableListOf()
|
return mutableListOf()
|
||||||
}
|
}
|
||||||
|
|
||||||
val parsed = result.body<List<GuildChannel>>().filter { it.type == ChannelType.GUILD_TEXT }.toMutableList()
|
val parsed = result.body<List<GuildChannel>>().filter { it.type == ChannelType.GUILD_TEXT.value }.toMutableList()
|
||||||
println(result.bodyAsText())
|
println(result.bodyAsText())
|
||||||
|
|
||||||
parsed.forEach { println("${it.name} - ${it.id}") }
|
parsed.forEach { println("${it.name} - ${it.id}") }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user