ddaf304460
Version 1.2. Rules are now in a table. Automatic migration until 1.4. New command: changerule /changerule <i> <rule> Change a rule. Use "/changerule 1 --" to delete rule 1. ahelp: Only displays commands the user can use. Attempts to PM before group. desc: Now displays group's flags and their "short" descs. Attemps to PM before group. antisquig: Second RTL character added to, and Strict. dilbert.lua: New command: dilbert /dilbert [YYYY-MM-DD] Returns a date's or the latest Dilbert strip. Caches strips so they are not downloaded more than once. gImages.lua & youtube.lua: Title now displayed for links. The "zero-width non-joiner" was a stupid idea. help.lua: Commands now properly bulleted. utilities.lua: download_file(): Now allows for specification of a path instead of /tmp/.
34 lines
783 B
Lua
Executable File
34 lines
783 B
Lua
Executable File
local command = 'about'
|
|
local doc = '`Returns information about the bot.`'
|
|
|
|
local triggers = {
|
|
''
|
|
}
|
|
|
|
local action = function(msg)
|
|
|
|
-- Filthy hack, but here is where we'll stop forwarded messages from hitting
|
|
-- other plugins.
|
|
if msg.forward_from then return end
|
|
|
|
local message = config.about_text .. '\nBased on otouto v'..version..' by topkecleon.\notouto is licensed under the GPLv2.\ngithub.com/topkecleon/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
|
|
}
|