From 8d14597a38f3e1c4383de37ac984971c9da3f1c2 Mon Sep 17 00:00:00 2001 From: moonleay Date: Thu, 14 Sep 2023 12:34:27 +0200 Subject: [PATCH] feat: make embed helper functions use EmbedColor instead of color Signed-off-by: moonleay --- .../net/moonleay/lilJudd/util/MessageUtil.kt | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/main/kotlin/net/moonleay/lilJudd/util/MessageUtil.kt b/src/main/kotlin/net/moonleay/lilJudd/util/MessageUtil.kt index 0e34571..6dfb545 100644 --- a/src/main/kotlin/net/moonleay/lilJudd/util/MessageUtil.kt +++ b/src/main/kotlin/net/moonleay/lilJudd/util/MessageUtil.kt @@ -22,7 +22,6 @@ import com.kotlindiscord.kord.extensions.commands.Arguments import com.kotlindiscord.kord.extensions.commands.application.slash.PublicSlashCommandContext import com.kotlindiscord.kord.extensions.components.forms.ModalForm import com.kotlindiscord.kord.extensions.types.respond -import dev.kord.common.Color import dev.kord.core.entity.Embed import dev.kord.rest.builder.message.EmbedBuilder import java.time.LocalDateTime @@ -34,7 +33,7 @@ object MessageUtil { ///Send an embedded message as a reply suspend fun sendEmbedForPublicSlashCommand( ctx: PublicSlashCommandContext, - color: Color, + color: EmbedColor, title: String, description: String ) { @@ -53,7 +52,7 @@ object MessageUtil { ///Send an embedded message with an image as a reply suspend fun sendEmbedForPublicSlashCommandWithImage( ctx: PublicSlashCommandContext, - color: Color, + color: EmbedColor, title: String, description: String, thumbnailUrl: String @@ -103,7 +102,7 @@ object MessageUtil { } fun getEmbedWithTableWithFooter( - color: Color, + color: EmbedColor, title: String, description: String, values: Map>?, @@ -117,7 +116,7 @@ object MessageUtil { ///Get an embedded msg with image, title and description fun getEmbedWithTable( - color: Color, + color: EmbedColor, title: String, description: String, values: Map>? @@ -140,20 +139,20 @@ object MessageUtil { ///Get an embedded msg with title and description fun getEmbedSmall( - color: Color, + color: EmbedColor, title: String, description: String ): EmbedBuilder { val ebb = EmbedBuilder() ebb.title = title ebb.description = description - ebb.color = color + ebb.color = color.color return ebb } ///Get an embedded msg with title, description and a src fun getEmbed( - color: Color, + color: EmbedColor, title: String, description: String, source: String @@ -167,7 +166,7 @@ object MessageUtil { ///Get an embedded msg with image, title, description and a src fun getEmbedWithImage( - color: Color, + color: EmbedColor, title: String, description: String, source: String,