component
Last updated
Last updated
local modal = component_builder.new()
:CustomId("modal_id")
:Title("Enter Info")
:AddComponent(
component_builder.new()
:Type("Action Row")
:AddComponent(
component_builder.new()
:Type("Text Input")
:CustomId("example_input")
:Style(modal_types.SHORT)
:Label("Password")
:Required(true)
)
)
:Build();
send_modal(interaction_id, interaction_token, modal, function(info)
end)local button = component_builder.new()
:Type("Action Row")
:AddComponent(
component_builder.new()
:Type("Button")
:Style("Primary")
:Label("Test")
:CustomId("test_id")
)
:Build();
send_raw(channel_id, { components = {button} })local select_menu = component_builder.new()
:Type("Action Row")
:AddComponent(
component_builder.new()
:Type("Select Menu")
:MinValue(1)
:MaxValue(1)
:CustomId("test_id")
:Placeholder("Test")
:Options({
option_builder.new()
:Label("Hi")
:Value("two")
:Description("test description")
:Build()
})
)
:Build();
send_raw(channel_id, { components = {select_menu} })