apiDiscordRoutes fix. (17x)

- wrong type definition(GuildChannel.type) fix
This commit is contained in:
dalbodeule 2024-08-15 11:13:44 +09:00
parent f85cbb8111
commit 15d6f3d9b1
No known key found for this signature in database
GPG Key ID: EFA860D069C9FA65
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}") }