Änderung der Commands von / auf #
Kleine Bugfixes
This commit is contained in:
@ -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
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user