Skip to content

Commit

Permalink
Merge pull request #2667 from hechfx/main
Browse files Browse the repository at this point in the history
Allow emote's ID if the user doesn't have nitro
  • Loading branch information
MrPowerGamerBR authored Nov 8, 2024
2 parents d257f6b + f1fc6be commit 93f01d7
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import net.perfectdreams.loritta.morenitta.interactions.commands.options.OptionR
import net.perfectdreams.loritta.morenitta.utils.AccountUtils
import net.perfectdreams.loritta.morenitta.utils.Constants
import net.perfectdreams.loritta.morenitta.utils.NumberUtils
import net.perfectdreams.loritta.morenitta.utils.isValidSnowflake
import org.jetbrains.exposed.sql.*
import java.util.*

Expand Down Expand Up @@ -256,6 +257,13 @@ class EmojiFightCommand(val loritta: LorittaBot) : SlashCommandDeclarationWrappe
val newEmoji = if (discordEmoji != null) {
discordEmoji.asMention
} else {
if (emojiInput.isValidSnowflake())
context.jda.getEmojiById(emojiInput) ?: context.fail(true) {
styled(
"Não encontrei nenhum emoji com o ID `$emojiInput`...",
)
}

val match = loritta.unicodeEmojiManager.regex.find(emojiInput)
?: context.fail(true) {
styled(
Expand Down

0 comments on commit 93f01d7

Please sign in to comment.