Skip to content

Commit

Permalink
use named parameters for creating and editing chat subcription links
Browse files Browse the repository at this point in the history
  • Loading branch information
coder2020official committed Aug 17, 2024
1 parent 6c45992 commit 25266a1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions telebot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4228,7 +4228,7 @@ def create_chat_subscription_invite_link(
:rtype: :class:`telebot.types.ChatInviteLink`
"""
return types.ChatInviteLink.de_json(
apihelper.create_chat_subscription_invite_link(self.token, chat_id, subscription_period, subscription_price, name)
apihelper.create_chat_subscription_invite_link(self.token, chat_id, subscription_period, subscription_price, name=name)
)

def edit_chat_subscription_invite_link(
Expand All @@ -4253,7 +4253,7 @@ def edit_chat_subscription_invite_link(
:rtype: :class:`telebot.types.ChatInviteLink`
"""
return types.ChatInviteLink.de_json(
apihelper.edit_chat_subscription_invite_link(self.token, chat_id, invite_link, name)
apihelper.edit_chat_subscription_invite_link(self.token, chat_id, invite_link, name=name)
)

def revoke_chat_invite_link(
Expand Down
4 changes: 2 additions & 2 deletions telebot/async_telebot.py
Original file line number Diff line number Diff line change
Expand Up @@ -5635,7 +5635,7 @@ async def create_chat_subscription_invite_link(
:rtype: :class:`telebot.types.ChatInviteLink`
"""
return types.ChatInviteLink.de_json(
await asyncio_helper.create_chat_subscription_invite_link(self.token, chat_id, subscription_period, subscription_price, name)
await asyncio_helper.create_chat_subscription_invite_link(self.token, chat_id, subscription_period, subscription_price, name=name)
)

async def edit_chat_subscription_invite_link(
Expand All @@ -5660,7 +5660,7 @@ async def edit_chat_subscription_invite_link(
:rtype: :class:`telebot.types.ChatInviteLink`
"""
return types.ChatInviteLink.de_json(
await asyncio_helper.edit_chat_subscription_invite_link(self.token, chat_id, invite_link, name)
await asyncio_helper.edit_chat_subscription_invite_link(self.token, chat_id, invite_link, name=name)
)

async def revoke_chat_invite_link(
Expand Down

0 comments on commit 25266a1

Please sign in to comment.