-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added core support for guild emoji behavior
- Loading branch information
Showing
6 changed files
with
78 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
rest/src/main/kotlin/com/gitlab/kordlib/rest/builder/guild/EmojiCreateBuilder.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package com.gitlab.kordlib.rest.builder.guild | ||
|
||
import com.gitlab.kordlib.common.annotation.KordDsl | ||
import com.gitlab.kordlib.common.entity.Snowflake | ||
import com.gitlab.kordlib.rest.Image | ||
import com.gitlab.kordlib.rest.builder.AuditRequestBuilder | ||
import com.gitlab.kordlib.rest.json.request.EmojiCreateRequest | ||
import com.gitlab.kordlib.rest.json.request.EmojiModifyRequest | ||
|
||
@KordDsl | ||
class EmojiCreateBuilder : AuditRequestBuilder<EmojiCreateRequest> { | ||
override var reason: String? = null | ||
lateinit var name: String | ||
lateinit var image: Image | ||
var roles: Set<Snowflake> = emptySet() | ||
|
||
override fun toRequest(): EmojiCreateRequest = EmojiCreateRequest( | ||
name = name, | ||
image = image.dataUri, | ||
roles = roles.map { it.value } | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters