Skip to main content

Text to Emoji Convertor

This command converts text provided to emoji.

Trigger

Type: Regex
Trigger: \A(?:\-|<@!?204255221017214977>)\s*(?:tte|emojify|emotify)(?: +|\z)

Usage

  • -tte <text> - Converts text to emoji. In addition to alphanumeric characters, the following special characters are supported: #, *, !, and ?.
Aliases

Instead of tte, you can also use emojify or emotify.

Code

{{/*
Converts text to emoji.
See <https://yagpdb-cc.github.io/fun/tte> for more information.

Author: jo3-l <https://github.com/jo3-l>
*/}}

{{ $keycap := "⃣" }}
{{ $emojis := sdict "#" "#⃣" "*" "*⃣" "!" "❗" "?" "❓" }}
{{ if .StrippedMsg }}
{{ $msg := "" }}
{{ range (split .StrippedMsg "") }}
{{- $c := index . 0 }}
{{- if or (and (ge $c 65) (le $c 90)) (and (ge $c 97) (le $c 122)) }}
{{- $msg = joinStr "" $msg ":regional_indicator_" (lower .) ":" }}
{{- else if and (ge $c 48) (le $c 57) }}
{{- $msg = joinStr "" $msg . $keycap }}
{{- else }}
{{- $msg = joinStr "" $msg (or ($emojis.Get .) .) }}
{{- end -}}
{{ end }}
{{ sendMessage nil (cembed
"title" "❯ Text to Emoji"
"description" $msg
"color" 14232643
"footer" (sdict "text" "Powered by YAGPDB.xyz")
) }}
{{ end }}

Author

This custom command was written by @jo3-l.