Current section

Files

Jump to
telega include telega@dialog_DialogBuilder.hrl
Raw

include/telega@dialog_DialogBuilder.hrl

-record(dialog_builder, {
id :: binary(),
windows :: list(telega@dialog@types:window(any(), any(), any(), any())),
initial :: gleam@option:option(binary()),
initial_state :: fun((telega@bot:context(any(), any(), any())) -> any()),
encode_state :: fun((any()) -> binary()),
decode_state :: fun((binary()) -> {ok, any()} | {error, nil}),
on_done :: gleam@option:option(fun((any(), telega@bot:context(any(), any(), any())) -> {ok, telega@bot:context(any(), any(), any())} | {error, any()})),
subs :: list(telega@dialog:sub_attachment(any(), any(), any())),
sub_result_hooks :: list({binary(), binary(), fun((any(), binary(), telega@bot:context(any(), any(), any())) -> {ok, telega@dialog@types:dialog_action(any())} | {error, any()})}),
message_hooks :: list({binary(), fun((any(), telega@dialog@types:message_input(), telega@bot:context(any(), any(), any())) -> {ok, telega@dialog@types:dialog_action(any())} | {error, any()})}),
show_mode_overrides :: list({binary(), telega@dialog@types:show_mode()}),
storage :: telega@flow@types:flow_storage(any()),
ttl_ms :: gleam@option:option(integer()),
labels :: fun((telega@bot:context(any(), any(), any())) -> telega@dialog@types:labels()),
show_mode :: telega@dialog@types:show_mode()
}).