Compare commits

...

4 Commits

Author SHA1 Message Date
_run 268c3a9210
Merge pull request #1890 from iamnalinor/master
Fix "invite link must be non-empty" error
2023-01-28 19:35:02 +04:00
Badiboy 9fb5f89f18
Merge pull request #1892 from bgelov/patch-1
Update README.md
2023-01-27 09:24:07 +03:00
Oleg Belov 409ff49603
Update README.md
Change _handeler() to _handler() in readme
2023-01-26 22:49:41 -03:00
Albert 5e0da40fcd 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.
2023-01-21 17:00:36 +04:00
3 changed files with 3 additions and 3 deletions

View File

@ -266,7 +266,7 @@ def test_callback(call): # <- passes a CallbackQuery type object to your functio
#### Shipping Query Handler
Handle shipping queries
`@bot.shipping_query_handeler() # <- passes a ShippingQuery type object to your function`
`@bot.shipping_query_handler() # <- passes a ShippingQuery type object to your function`
#### Pre Checkout Query Handler
Handle pre checkoupt queries

View File

@ -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(

View File

@ -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(