arguments

All arguments passed into the info in the component handler:

local author = data_payload.member and data_payload.member.user
handler({
     username = author and author.username,
     userid = author and author.id,
     custom_id = data_payload.data and data_payload.data.custom_id,
     component_type = data_payload.data and data_payload.data.component_type,
     values = data_payload.data and data_payload.data.values, -- These are only ment for discord select menus
     channel_id = data_payload.channel_id,
     guild_id = data_payload.guild_id,
     message_id = data_payload.message and data_payload.message.id,
     interaction_token = data_payload.token,
     interaction_id = data_payload.id,
     modal_data = modal_data -- modal_data is a table for the collect data when using modals and does not come from discord itself
})

Last updated