c50b1ca3fa
Usernames seen by the bot are now cached in the $usernames table. To get the ID associated with a username, use the resolve_username() function from utilities.lua. The table_size() function in utilities.lua will tell you the number of items in a key/pair table. about.lua no longer displays a link preview in the about message. currency.lua now accepts decimal arguments for the amount. luarun.lua now correctly displays "false" return values. moderation.lua will no longer send "I do not administrate this group".
30 lines
650 B
Lua
Executable File
30 lines
650 B
Lua
Executable File
local command = 'about'
|
|
local doc = '`Returns information about the bot.`'
|
|
|
|
local triggers = {
|
|
''
|
|
}
|
|
|
|
local action = function(msg)
|
|
|
|
local message = config.about_text .. '\nBased on otouto v'..version..' by topkecleon.\notouto v3 is licensed under the GPLv2.\ntopkecleon.github.io/otouto'
|
|
|
|
if msg.new_chat_participant and msg.new_chat_participant.id == bot.id then
|
|
sendMessage(msg.chat.id, message, true)
|
|
return
|
|
elseif string.match(msg.text_lower, '^/about[@'..bot.username..']*') then
|
|
sendMessage(msg.chat.id, message, true)
|
|
return
|
|
end
|
|
|
|
return true
|
|
|
|
end
|
|
|
|
return {
|
|
action = action,
|
|
triggers = triggers,
|
|
doc = doc,
|
|
command = command
|
|
}
|