Skip to content

Commit

Permalink
Use unicode for default emojis
Browse files Browse the repository at this point in the history
  • Loading branch information
freya022 committed Oct 27, 2024
1 parent fe32fc6 commit 4d51f53
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import io.github.freya022.botcommands.api.commands.text.annotations.RequiresText
import io.github.freya022.botcommands.api.core.service.annotations.InjectedService
import io.github.freya022.botcommands.api.core.utils.toImmutableList
import io.github.freya022.botcommands.api.localization.DefaultMessages
import io.github.freya022.botcommands.api.utils.EmojiUtils
import io.github.freya022.botcommands.internal.core.config.ConfigDSL
import io.github.freya022.botcommands.internal.core.config.ConfigurationValue
import net.dv8tion.jda.api.entities.emoji.Emoji
Expand Down Expand Up @@ -107,7 +106,7 @@ class BTextConfigBuilder internal constructor() : BTextConfig {
set(value) {
dmClosedEmojiSupplier = { value }
}
var dmClosedEmojiSupplier: () -> Emoji = { EmojiUtils.resolveJDAEmoji("mailbox_closed") }
var dmClosedEmojiSupplier: () -> Emoji = { Emoji.fromUnicode("\uD83D\uDCEA") } // mailbox_closed

@JvmSynthetic
internal fun build() = object : BTextConfig {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ import io.github.freya022.botcommands.api.commands.text.BaseCommandEvent
import io.github.freya022.botcommands.api.core.BContext
import io.github.freya022.botcommands.api.core.utils.loggerOf
import io.github.freya022.botcommands.api.localization.text.LocalizableTextCommand
import io.github.freya022.botcommands.api.utils.EmojiUtils
import io.github.oshai.kotlinlogging.KotlinLogging
import net.dv8tion.jda.api.EmbedBuilder
import net.dv8tion.jda.api.Permission.MESSAGE_ADD_REACTION
import net.dv8tion.jda.api.Permission.MESSAGE_HISTORY
import net.dv8tion.jda.api.entities.Message
import net.dv8tion.jda.api.entities.MessageEmbed
import net.dv8tion.jda.api.entities.channel.middleman.MessageChannel
import net.dv8tion.jda.api.entities.emoji.Emoji
import net.dv8tion.jda.api.events.message.MessageReceivedEvent
import net.dv8tion.jda.api.requests.RestAction
import net.dv8tion.jda.api.requests.restaction.MessageCreateAction
Expand All @@ -23,8 +23,8 @@ import javax.annotation.CheckReturnValue

private val logger = KotlinLogging.loggerOf<BaseCommandEvent>()

private val SUCCESS by lazy { EmojiUtils.resolveJDAEmoji("white_check_mark") }
private val ERROR by lazy { EmojiUtils.resolveJDAEmoji("x") }
private val SUCCESS = Emoji.fromUnicode("") // white_check_mark
private val ERROR = Emoji.fromUnicode("") // x

internal open class BaseCommandEventImpl(
private val context: BContext,
Expand Down

0 comments on commit 4d51f53

Please sign in to comment.