Änderung der Commands von / auf #

Kleine Bugfixes
This commit is contained in:
2016-06-22 13:59:06 +02:00
parent 81c7393b00
commit 5fd0a7d9b1
144 changed files with 601 additions and 540 deletions

View File

@ -93,8 +93,8 @@ end
function pre_process_service_msg(msg)
if msg.service then
local action = msg.action or {type=""}
-- Double / to discriminate of normal actions
msg.text = "//tgservice " .. action.type
-- Double # to discriminate of normal actions
msg.text = "##tgservice " .. action.type
-- wipe the data to allow the bot to read service messages
if msg.out then

View File

@ -80,7 +80,7 @@ function get_http_file_name(url, headers)
end
-- Saves file to tmp/. If file_name isn't provided,
-- will get the text after the last "/" for filename
-- will get the text after the last "#" for filename
-- and content-type for extension
function download_to_file(url, file_name)
print("Download URL: "..url)
@ -837,3 +837,11 @@ function convert_timestamp(timestamp, format)
local converted_date = string.gsub(converted_date, '%\n', '')
return converted_date
end
function pretty_float(x)
if x % 1 == 0 then
return tostring(math.floor(x))
else
return tostring(x)
end
end