Skip to content

Releases: gunyu1019/chzzkpy

v2.0.0

07 Mar 14:26
754196c
Compare
Choose a tag to compare

What's Changed

  • Support offical API provided by Chzzk Developer Center

    • Support Session feature to handle donation, message.
    • Support Chat Section feature to send message, send announcement, or setup chatting.
    • Support User Section feature to get self-channel info
    • Support Authorization Section feature to authentic channel.
    • Support Channel Section feature to search channel with an unique id, or setup self-channel
    • Support Live Section feature to search live
    • Support Category Section featrue to gather categories.
  • Apply indepentent gateway configured socket.io and engine.io protocol in python environment.

  • Support Multiple-Connection Session feature. (Max Client Session: 10, Max User Session: unlimited)

    await user_client1.connect(UserPermission.all(), addition_connect=True)
    await user_client2.connect(UserPermission.all()) 

Related Issues/Pull Requests

v1.2.0

03 Mar 01:48
b3fac21
Compare
Choose a tag to compare

What's Changed

  • Add on_subscription_gift event to handle subscription gift.
  • Add SubscriptionGiftMessage, SubscriptionGiftExtra data class.
  • Add approve and reject method in DonationMessage to response Mission Donation.
    async def on_donation(donation: chzzkpy.DonationMessage):
        if donation.extras.donation_type != "MISSION":
            return
        await donation.approve()
        return 

Related Issue/Pull Requests

  • [Feat] Implement Mission Pending Result. by @gunyu1019 in #41
  • [FR] 구독권 선물 이벤트 추가 by @ywj515 in #60
  • [Deploy] Bump to v1.2.0 (Last Minior Update in v1) by @gunyu1019 in #61

Addition Context

This is last minor update in v1 to prepare publish v2. No longer minor update in v1.
Or, patch updates are available, when bugs are found in v1.

I would say to prepare ahead of major updates by applying a development branch.
In v2, a chzzkpy supports offical API (Chzzk Developer Center)

$ git clone https://github.com/gunyu1019/chzzkpy.git -b develop
$ cd chzzkpy
$ python3 -m pip install -U . --upgrade

I recommend applying the official API. Here is an example chat bot with offical API.
I have tried to keep the overall differences between v1 and v2 to consider the Developer Experience(DX)

from chzzkpy.offical import Client, Donation, Message, UserPermission

client_id = "Prepared Client ID"
client_secret = "Prepared Client Secret"
client = Client(client_id, client_secret)

@client.event
async def on_chat(message: Message):
    if message.content == "!안녕":
        await message.send("%s님, 안녕하세요!" % message.profile.nickname)


@client.event
async def on_donation(donation: Donation):
    await donation.send("%s님, %d원 후원 감사합니다." % (donation.profile.nickname, donation.pay_amount))


async def main():
    authorization_url = client.generate_authorization_token_url(redirect_url="https://localhost", state="abcd12345")
    print(f"Please login with this url: {authorization_url}")
    code = input("Please input response code: ")

    user_client = await client.generate_user_client(code, "abcd12345")
    await user_client.connect(UserPermission.all())

v1.1.7

16 Feb 08:20
ae97d97
Compare
Choose a tag to compare

What's Changed

  • Apply new restrict feature to chzzkpy package. (add days, reason parameter)
  • Add edit restrict method
  • RestrictUser data class extends ParticleUser.
  • [Fix] (Temporary Action) An Exception was raised when ManageClient.subcribers method called without filter parameter.

Related Issue/Pull Requests

  • [BUG] 구독자 목록 불러올 때 요청 실패 메시지가 뜹니다. by @ywj515 in #54
  • [FR] 활동 제한 시간 설정 기능 by @ywj515 in #55
  • [Deploy] Bump to v1.1.7 by @gunyu1019 in #56

v1.1.6

06 Feb 10:56
de92d93
Compare
Choose a tag to compare

What's Changed

  • [Fix] Invaild parameter name to filter subscribers with nickname.
  • [Fix] Add has_login condition at Message.model_validate_with_client classmethod to cause LoginRequired Exception when client didn't logined.

Related Issue/Pull Request

  • [BUG] manageclient.subscriber() 에서 nickname 값을 넣어주더라도 검색이 되지 않는 현상 by @ywj515 in #52
  • [Deploy] Bump to v1.1.6 by @gunyu1019 in #53

v1.1.5

04 Feb 11:06
9d99123
Compare
Choose a tag to compare

What's Changed

  • [Fix] Invaild usage parameter at ManageClient.subcribers method.
  • [Fix] Missing attribute exception(in anonymous donation) at MissingDonation

Related Issue/Pull Requests

  • [BUG] 익명으로 미션 후원 시 Validation 에러 발생 by @ywj515 in #47
  • [BUG] 구독자 정보를 불러올 때 구독자가 없을 경우 에러 발생 by @ywj515 in #48
  • [Deploy] Bump to v1.1.5 by @gunyu1019 in #51

v1.1.4

28 Jan 11:03
2eb814d
Compare
Choose a tag to compare

What's Changed

  • [Fix] Missing loginable attribute at the live_status, live_detail method.

Related Issues/Pull Requests

  • [BUG] 로그인 하였음에도 19금 방송 채팅창 연결이 되지 않습니다. by @ywj515 in #44

v1.1.3

13 Jan 10:33
587b86d
Compare
Choose a tag to compare

What's Changed

  • Add message for developer-experience at ChatConnectFailed Exception.

Related Issues/Pull Requests

  • [FR] 연령 제한이 있는 방송에 대한 예외처리 혹은 기능 추가 by @zer0ken in #39
  • [Deploy] Bump to v1.1.3 by @gunyu1019 in #43

v1.1.2

11 Jan 03:11
4aa8ebc
Compare
Choose a tag to compare

What's Changed

  • Add on_mission_cost_update event
  • Add MissionParticipationDonation data-class to handle on_mission_cost_update
  • Add missiong attribute at BaseDonation, MissionDonation in #37
  • [Emergency Patch] Missing Commit #40

Related Issues/Pull Requests

v1.1.1

11 Jan 02:56
343ed09
Compare
Choose a tag to compare

This version had deprecated.
Reason: Missing Commit.

What's Changed

  • Add on_mission_cost_update event
  • Add MissionParticipationDonation data-class to handle on_mission_cost_update
  • Add missiong attribute at BaseDonation, MissionDonation in #37

Related Issues/Pull Requests

v1.1.0

01 Jan 06:44
fa35e58
Compare
Choose a tag to compare

What's Changed

  • Implement channel management feature.
    • Get chat activity count
    • Add temporary restrict
    • Add/Delete restrict
    • Manage channel permission
    • Manage Stream
    • Prohibit Word
    • Manage video and replay video
    • Manage restrict-activity user and unrestrict-activity-request.
    • Collect following user and, subscription user.
  • Add interactive feature at PartialUser classes. (restrict, role, chat activity count)
  • Add interactive feature at Message(extends NoticeMessage, SubscriptionMessage, DonationMessage ... etc)
  • Add profile_card method at Chat Client
  • Add PartialVideo class (for management feautre.)
  • Move UserRole enumeration class to basic. (for management feature.)
  • (Fix) SystemExtraParameter.register_chat_profile and SystemExtraParameter.target_profile can be None.
  • (Fix) Duplicated attribute (Profile.activity_badges)

Related Issues/Pull Requests