This repository has been archived on 2021-04-24. You can view files and clone it, but cannot push or open issues or pull requests.
Mikubot/plugins/afk.lua

23 lines
651 B
Lua
Raw Normal View History

2015-04-14 20:21:23 +02:00
function run(msg, matches)
2015-07-27 18:35:20 +02:00
local text = matches[2]
2015-04-14 20:21:23 +02:00
local user_name = get_name(msg)
2015-06-06 22:15:05 +02:00
2015-07-27 18:35:20 +02:00
if string.starts(msg.text, '/afk') and (text == nil) then
return user_name .. ' ist nun AFK'
2015-07-19 18:58:45 +02:00
else
2015-07-27 18:35:20 +02:00
return user_name .. ' ist nun AFK (' .. text .. ')'
2015-06-06 22:15:05 +02:00
end
2015-07-27 18:35:20 +02:00
--[[if string.starts(msg.text, '/re') or string.starts(msg.text, '/wd') then
2015-06-06 22:15:05 +02:00
return user_name .. ' ist wieder da!'
2015-07-27 18:35:20 +02:00
end]]
2015-06-06 22:15:05 +02:00
2015-04-14 20:21:23 +02:00
end
return {
2015-06-06 22:15:05 +02:00
description = 'Sagt dass ihr afk oder wieder da seid',
usage = {'/afk','/re','/wd'},
2015-07-27 18:35:20 +02:00
patterns = {'^/([A|a][F|f][K|k])$','^/([A|a][F|f][K|k]) (.*)$','^/([R|r][E|e])$','^/([W|w][D|d])$'},
2015-06-06 22:15:05 +02:00
run = run
2015-04-14 20:21:23 +02:00
}
2015-05-22 17:01:33 +02:00
--by Akamaru [https://ponywave.de]