...mit einer Nachkommastelle

+ Bugfix für ID
This commit is contained in:
Andreas Bielawski 2016-08-09 17:35:40 +02:00
parent 55fca7a73d
commit f4a20a972f
2 changed files with 3 additions and 3 deletions

View File

@ -44,7 +44,7 @@ function id:get_user(user_id, chat_id)
return user_info
end
function id:action(msg)
function id:action(msg, config, matches)
if matches[1] == "/id" then
if msg.reply_to_message then

View File

@ -71,8 +71,8 @@ function stats:chat_stats(chat_id)
local text = ''
for k,user in pairs(users_info) do
local msg_num = user.msgs
local percent = msg_num / all_msgs * 100
text = text..user.name..': '..comma_value(msg_num)..' <code>('..round(percent)..'%)</code>\n'
local percent = tostring(round(msg_num / all_msgs * 100, 1))
text = text..user.name..': '..comma_value(msg_num)..' <code>('..percent:gsub('%.', ',')..'%)</code>\n'
end
if text:isempty() then return 'Keine Stats für diesen Chat verfügbar!'end
local text = text..'\n<b>TOTAL</b>: '..comma_value(all_msgs)