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-2/plugins/me.lua
topkecleon 38efb5d827 administration.lua: 1.8.1
me.lua: Fix for potential future bug.
README.md: Better links.
config.lua: Added comments, links, removed unnecessary things.
greetings.lua: Default configuration now built in so as to not
  crowd the config file.
.gitignore: wew lad
2016-04-05 06:43:11 -04:00

30 lines
548 B
Lua

local triggers = {
'^/me',
'^/me@'..bot.username
}
local action = function(msg)
local target = database.users[msg.from.id_str]
if msg.from.id == config.admin and (msg.reply_to_message or msg.text:input()) then
target = user_from_message(msg)
if target.err then
sendReply(msg, target.err)
return
end
end
local output = ''
for k,v in pairs(target) do
output = output .. '*' .. k .. ':* `' .. tostring(v) .. '`\n'
end
sendMessage(msg.chat.id, output, true, nil, true)
end
return {
triggers = triggers,
action = action
}