-module(discord_gleam@discord@intents). -compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]). -export([intents_to_bitfield/1]). -export_type([intents/0]). -type intents() :: {intents, boolean(), boolean()}. -file("src/discord_gleam/discord/intents.gleam", 5). -spec intents_to_bitfield(intents()) -> integer(). intents_to_bitfield(Intents) -> Bitfield = 0, Bitfield@1 = case erlang:element(2, Intents) of true -> Bitfield + 512; false -> Bitfield end, Bitfield@2 = case erlang:element(3, Intents) of true -> Bitfield@1 + 32768; false -> Bitfield@1 end, Bitfield@2.