mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
Fix "invite link must be non-empty" error
`bot.edit_chat_invite_link` method contained a mistake: `invite_link` and `name` were supposed to be vice-versa in `apihelper.edit_chat_invite_link(...)` call. This caused to be invite_link empty or contain invalid value, resulting to get `Bad Request: invite link must be non-empty` error. This also affected the async version.
This commit is contained in:
parent
b743aa5813
commit
5e0da40fcd
@ -3224,7 +3224,7 @@ class TeleBot:
|
||||
:rtype: :class:`telebot.types.ChatInviteLink`
|
||||
"""
|
||||
return types.ChatInviteLink.de_json(
|
||||
apihelper.edit_chat_invite_link(self.token, chat_id, name, invite_link, expire_date, member_limit, creates_join_request)
|
||||
apihelper.edit_chat_invite_link(self.token, chat_id, invite_link, name, expire_date, member_limit, creates_join_request)
|
||||
)
|
||||
|
||||
def revoke_chat_invite_link(
|
||||
|
@ -4084,7 +4084,7 @@ class AsyncTeleBot:
|
||||
:rtype: :class:`telebot.types.ChatInviteLink`
|
||||
"""
|
||||
return types.ChatInviteLink.de_json(
|
||||
await asyncio_helper.edit_chat_invite_link(self.token, chat_id, name, invite_link, expire_date, member_limit, creates_join_request)
|
||||
await asyncio_helper.edit_chat_invite_link(self.token, chat_id, invite_link, name, expire_date, member_limit, creates_join_request)
|
||||
)
|
||||
|
||||
async def revoke_chat_invite_link(
|
||||
|
Loading…
Reference in New Issue
Block a user