new_slashhandler
Let's you create a new slash handler. If you want to know how to register slash commands goto
slash commandsExample
bot.new_slashhandler({
Command = "test",
Callback = function(data)
local options = data.options
-- options is structed like this:
-- The name registered option (in this case the option is message)
-- The the value
if options["message"] == "test" then
send_message(data.channel_id, "Test message")
end
end
})

This is what I mean by message
Last updated