Skip to content

Instantly share code, notes, and snippets.

@jordansissel
Created October 5, 2015 17:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jordansissel/06f01120fc43e6b04aaf to your computer and use it in GitHub Desktop.
Save jordansissel/06f01120fc43e6b04aaf to your computer and use it in GitHub Desktop.
route /^slowcmd/, :slowcmd, :command => true
# ...
def slowcmd(msg)
Thread.new do
sleep 2
msg.reply("OK")
end
end
@jordansissel
Copy link
Author

Running:

Lita > Lita slowcmd
Lita > Lita slowcmd
Lita > Lita slowcmd
Lita > OK
OK
OK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment