commonMain.builder.user.GroupDMCreateBuilder.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kord-rest Show documentation
Show all versions of kord-rest Show documentation
Idiomatic Kotlin Wrapper for The Discord API
The newest version!
package dev.kord.rest.builder.user
import dev.kord.common.annotation.KordDsl
import dev.kord.common.entity.Snowflake
import dev.kord.rest.builder.RequestBuilder
import dev.kord.rest.json.request.GroupDMCreateRequest
@KordDsl
public class GroupDMCreateBuilder : RequestBuilder {
public val tokens: MutableList = mutableListOf()
public val nicknames: MutableMap = mutableMapOf()
override fun toRequest(): GroupDMCreateRequest = GroupDMCreateRequest(
tokens.toList(),
nicknames.mapKeys { it.value }
)
}