Skip to content

Conversation

@riskey95
Copy link
Contributor

No description provided.

Copy link
Member

@yangm97 yangm97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Besides review comments, there should be some (a lot) of merge conflicts to solve, but I'd be glad to merge it once everything is sorted out since it's a very requested feature.

end

function api.muteUser(chat_id, user_id)
function api.muteUser(chat_id, user_id, until_date)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function has been moved to utilities.lua

return markup
end

local function markup_mute(chat_id, user_id, time_value)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would've been better if you could reuse the keyboard for tempban instead of copy-pasting it's code.


function plugin.onCallbackQuery(msg, matches)
if not u.can(msg.chat.id, msg.from.id, 'can_restrict_members') then
if not u.is_allowed('hammer', msg.chat.id, msg.from) then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you replace the new permission check with the dummy one?

end
if not res then
motivation = motivation or i18n("I can't kick this user.\n"
motivation = i18n("I can't kick this user.\n"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could just use the new api_err.trans() function.

@yangm97 yangm97 changed the base branch from master to develop November 20, 2018 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants