-module(discord_gleam@discord@snowflake). -compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch, inline]). -define(FILEPATH, "src/discord_gleam/discord/snowflake.gleam"). -export([decoder/0]). -if(?OTP_RELEASE >= 27). -define(MODULEDOC(Str), -moduledoc(Str)). -define(DOC(Str), -doc(Str)). -else. -define(MODULEDOC(Str), -compile([])). -define(DOC(Str), -compile([])). -endif. ?MODULEDOC( " Snowflakes is discord's type for unique identifiers. \\\n" " They are 64-bit unsigned integers, represented as strings. \\\n" " See https://discord.com/developers/docs/reference#snowflakes\n" ). -file("src/discord_gleam/discord/snowflake.gleam", 13). ?DOC(" API should not give a int, but incase it does we will convert to string.\n"). -spec decoder() -> gleam@dynamic@decode:decoder(binary()). decoder() -> gleam@dynamic@decode:one_of( {decoder, fun gleam@dynamic@decode:decode_string/1}, [begin _pipe = {decoder, fun gleam@dynamic@decode:decode_int/1}, gleam@dynamic@decode:map(_pipe, fun erlang:integer_to_binary/1) end] ).