Current section
Files
Jump to
Current section
Files
src/kitazith@message_formatting@emoji.erl
-module(kitazith@message_formatting@emoji).
-compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch, inline]).
-define(FILEPATH, "src/kitazith/message_formatting/emoji.gleam").
-export([custom/2, animated/2]).
-if(?OTP_RELEASE >= 27).
-define(MODULEDOC(Str), -moduledoc(Str)).
-define(DOC(Str), -doc(Str)).
-else.
-define(MODULEDOC(Str), -compile([])).
-define(DOC(Str), -compile([])).
-endif.
-file("src/kitazith/message_formatting/emoji.gleam", 9).
?DOC(
" Format a Discord custom emoji for message content.\n"
"\n"
" Learn more:\n"
" [API Reference - Documentation - Discord > Message Formatting > Formats](https://docs.discord.com/developers/reference#message-formatting)\n"
).
-spec custom(binary(), kitazith@snowflake:snowflake()) -> binary().
custom(Name, Id) ->
erlang:list_to_binary(
[<<"<:"/utf8>>,
Name,
<<":"/utf8>>,
kitazith@snowflake:to_string(Id),
<<">"/utf8>>]
).
-file("src/kitazith/message_formatting/emoji.gleam", 17).
?DOC(
" Format a Discord animated custom emoji for message content.\n"
"\n"
" Learn more:\n"
" [API Reference - Documentation - Discord > Message Formatting > Formats](https://docs.discord.com/developers/reference#message-formatting)\n"
).
-spec animated(binary(), kitazith@snowflake:snowflake()) -> binary().
animated(Name, Id) ->
erlang:list_to_binary(
[<<"<a:"/utf8>>,
Name,
<<":"/utf8>>,
kitazith@snowflake:to_string(Id),
<<">"/utf8>>]
).