Merge pull request #95 from dalbodeule/develop

apiDiscordRoutes fix. (17x)
This commit is contained in:
JinU Choi 2024-08-15 11:18:00 +09:00 committed by GitHub
commit b2f4549e7f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -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?
) )

View File

@ -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}") }