From 15117c284c83e153a63f5e4eb2f9832ce4fa2c46 Mon Sep 17 00:00:00 2001 From: Sahri Riza Umami Date: Wed, 8 Mar 2017 09:48:10 +0700 Subject: [PATCH] v0.3 - Change getChannelMembers(channel_id, offset, filter, limit, cb, cmd) to getChannelMembers(channel_id, filter, offset, limit, cb, cmd) - Assign local P variable in getParseMode --- tdcli.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tdcli.lua b/tdcli.lua index 10c75f6..4bb7479 100644 --- a/tdcli.lua +++ b/tdcli.lua @@ -60,6 +60,7 @@ end -- User can send bold, italic, and monospace text uses HTML or Markdown format. local function getParseMode(parse_mode) + local P if parse_mode then local mode = parse_mode:lower() @@ -2058,7 +2059,7 @@ M.reportChannelSpam = reportChannelSpam -- @offset Number of channel users to skip -- @limit Maximum number of users be returned, can't be greater than 200 -- filter = Recent|Administrators|Kicked|Bots -local function getChannelMembers(channel_id, offset, filter, limit, cb, cmd) +local function getChannelMembers(channel_id, filter, offset, limit, cb, cmd) if not limit or limit > 200 then limit = 200 end @@ -2069,7 +2070,7 @@ local function getChannelMembers(channel_id, offset, filter, limit, cb, cmd) filter_ = { ID = "ChannelMembers" .. filter }, - offset_ = offset, + offset_ = offset or 0, limit_ = limit }, cb or dl_cb, cmd) end