allowlink.help = '/allowlink <links> - Allowlists the given links in the current chat. Requires administrative privileges. Use /allowlink -del <links> to Alias: /wl.'
end
function allowlink:on_message(message)
if not mattata.is_group_admin(message.chat.id, message.from.id) then
return false
end
local input = mattata.input(message.text)
local delete = false
if not input then
return mattata.send_reply(message, 'Please specify the URLs or @usernames you\'d like to allowlist.')
elseif input:match('^%-del .-$') then
input = input:match('^%-del (.-)$')
delete = true
end
+ message.text = input
local output = mattata.check_links(message, false, false, true, false, delete)
- allowlink.help = '/allowlink <links> - Allowlists the given links in the current chat. Requires administrative privileges. Use /allowlink -del <links> to Alias: /wl.'
-end
-
-function allowlink:on_message(message)
- if not mattata.is_group_admin(message.chat.id, message.from.id) then
- return false
- end
- local input = mattata.input(message.text)
- local delete = false
- if not input then
- return mattata.send_reply(message, 'Please specify the URLs or @usernames you\'d like to allowlist.')
- elseif input:match('^%-del .-$') then
- input = input:match('^%-del (.-)$')
- delete = true
- end
- message.text = input
- local output = mattata.check_links(message, false, false, true, false, delete)