LynxMods
  • Overview
  • Using Lua Scripts
    • Using lua scripts
  • DEVELOPERS
    • Writing Lua Scripts
      • Getting Started
      • Examples
        • Basic UI Examples
        • Basic Auto Reply
      • Events
      • API Documentation
        • client
        • ui
Powered by GitBook
On this page

Was this helpful?

  1. DEVELOPERS
  2. Writing Lua Scripts
  3. Examples

Basic Auto Reply

PreviousBasic UI ExamplesNextEvents

Last updated 4 years ago

Was this helpful?

This is a simple auto reply lua script, here is what it looks like

Lua Script:

events.addCallback("incoming_message", function(message)
    local text = message.text;
    local jid  = message.jid;

    client.sendMessage("Hello from lua! \nMessage: " .. text, jid);
end)