Advertisement
Guest User

MyPing

a guest
Feb 11th, 2016
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.49 KB | None | 0 0
  1. local triggers = {
  2.     '^/ping[@'..bot.username..']*'
  3. }
  4.  
  5. local action = function(msg)
  6.    
  7.     local input = msg.text:input()
  8.    
  9.     if input == 'server' then
  10.         sendMessage(msg.chat.id, 'MSG-Date:    '.. os.date('%F-:-%T', msg.date) .. '\nServer-Date: ' .. io.popen('date +%F-:-%T'):read('*all'))
  11.     elseif input == 'pong' then
  12.         sendMessage(msg.chat.id, '🎾P🎾I🎾N🎾G🎾')
  13.     else
  14.         sendMessage(msg.chat.id, 'Pong! 🎾')
  15.     end
  16.    
  17. end
  18.  
  19. return {
  20.     action = action,
  21.     triggers = triggers
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement