-1:000000000000 | 0:7d84f4403d67 |
---|---|
1 | |
2 function riddim.plugins.ping(bot) | |
3 bot.stream:add_plugin("ping"); | |
4 bot:hook("commands/ping", function (command) | |
5 local jid = command.param; | |
6 if jid then | |
7 bot.stream:ping(jid, function (time) | |
8 command:reply(string.format("Pong from %s in %0.3f seconds", jid, time)); | |
9 end); | |
10 return true; | |
11 end | |
12 return "pong"; | |
13 end); | |
14 end |