Manage Feature¶
Manage Client¶
- class ManageClient(channel_id: str, client: Client)¶
Represent a client that provides broadcast management functionality.
- async add_prohibit_word(word: str) ProhibitWord | None ¶
Add a prohibit word at chat.
- Parameters:
word (str) – A word to prohibit.
- Returns:
Returns the generated prohibit word.
- Return type:
Optional[ProhibitWord]
- async add_restrict(user: str | PartialUser) PartialUser ¶
Add an user to restrict activity.
- Parameters:
user (str | ParticleUser) – A user object to add restrict activity. Instead, it can be user id or nickname.
- Returns:
Returns an object containning activity-restricted users.
- Return type:
ParticleUser
- async add_role(user: str | PartialUser, role: UserRole) PartialUser ¶
Add a broadcast permission to user.
- Parameters:
user (str | ParticleUser) – A user object to add role. Instead, it can be user id or nickname.
role (UserRole) – A enumeration class containing broadcast role. It can only set the role to
UserRole.chat_manager
,UserRole.settlement_manager
, orUserRole.channel_manager
. Giving any other role will cause aTypeError
exception.
- Returns:
Returns an user with added role.
- Return type:
ParticleUser
- async chat_activity_count(user: str | PartialUser) ChatActivityCount ¶
Get chat activity count of user.
- Parameters:
user (str | ParticleUser) – A user object to get chat activity count. Instead, it can be user id.
- Returns:
ChatActivityCount – Returns a chat activity count object contains the count of temporary activity restrictions,
the count of activity restrictions, and the count of chats.
- async close()¶
Closes the connection to chzzk.
- async edit_prohibit_word(prohibit_word: ProhibitWord | int, word: str) ProhibitWord | None ¶
Modify a prohibit word.
- Parameters:
prohibit_word (ProhibitWord | int) – The prohibit word object to modify. Instead, it can be prohibit word id.
word (str) – A new word to prohibit.
- Returns:
Returns the modified prohibit word.
- Return type:
Optional[ProhibitWord]
- async followers(page: int = 0, size: int = 50, sort_type: SortType = SortType.recent) ManageResult[ManageFollower] ¶
Get followers of channel.
- Parameters:
- Returns:
Returns a
ManageResult
containing the follower info.- Return type:
- async get_prohbit_word(word: str) ProhibitWord | None ¶
Get prohibit word with word. When word does not contain prohibit word, returns None.
- Parameters:
word (str) – A word to find prohibit word.
- Returns:
When word contains prohibit words, return
ProhibitWord
object.- Return type:
Optional[ProhibitWord]
- async get_prohibit_words() List[ProhibitWord] ¶
Get prohibit words in chat.
- Returns:
Returns the prohibit words.
- Return type:
List[ProhibitWord]
- async live_replay(page: int = 0, size: int = 50) ManageResult[ManageVideo] ¶
Get streamming replay video of channel.
- Parameters:
- Returns:
Returns a
ManageResult
containing the streamming replay video.- Return type:
- async remove_prohibit_word(prohibit_word: ProhibitWord | int) None ¶
Remove a prohibit word.
- Parameters:
prohibit_word (ProhibitWord | int) – The prohibit word object to remove. Instead, it can be prohibit word id.
- async remove_restrict(user: str | PartialUser) None ¶
Remove an user to restrict activity.
- Parameters:
user (str | ParticleUser) – A user object to remove restrict activity. Instead, it can be user id or nickname.
- Returns:
Returns an user whose activity is unrestricted.
- Return type:
ParticleUser
- async remove_role(user: str | PartialUser) None ¶
Remove a broadcast permission to user.
- Parameters:
user (str | ParticleUser) – A user object to remove role. Instead, it can be user id or nickname.
- async restrict(page: int = 0, size: int = 50, nickname: str | None = None) ManageResult[UnrestrictRequest] ¶
Get activitiy restricted user of channel.
- Parameters:
- Returns:
Returns a
ManageResult
containing the restricted user info.- Return type:
- async set_chat_rule(word: str) None ¶
Set chat rule of broadcast.
- Parameters:
word (str) – A new chat rule to set up.
- async stream() Stream ¶
Get a stream key required for streamming.
- Returns:
Return a stream key for streamming.
- Return type:
- async subcribers(page: int = 0, size: int = 50, sort_type: SortType = SortType.recent, publish_period: Literal[1, 3, 6] | None = None, tier: SubscriberTier | None = None, nickname: str | None = None) ManageResult[ManageSubcriber] ¶
Get subcribers of channel.
- Parameters:
page (Optional[int]) – The number of page, by default 0
size (Optional[int]) – The number of subscribers to import at once, by default 50
sort_type (Optional[SortType]) – A sort order, by default SortType.recent
publish_period (Optional[Literal[1, 3, 6]]) – Lookup by the subscriber’s publish period, by default None
tier (Optional[SubscriberTier]) – Lookup by the subscriber’s tier, by default None.
nickname (Optional[str]) – Lookup by the subscriber’s nickname, by default None
- Returns:
Returns a
ManageResult
containing the subscriber info.- Return type:
- async unrestrict_requests(page: int = 0, size: int = 50, nickname: str | None = None) ManageResult[UnrestrictRequest] ¶
Get unrestrict activity requests of channel.
- Parameters:
- Returns:
Returns a
ManageResult
containing the unrestrict requests.- Return type:
ManageResult[UnrestrictRequest]
- async videos(page: int = 0, size: int = 50) ManageResult[ManageVideo] ¶
Get uploaded video of channel.
- Parameters:
- Returns:
Returns a
ManageResult
containing the video.- Return type:
Enumerations¶
Chat Activity Count¶
Search Result¶
- class ManageSubcriber¶
- class ManageFollower¶
- channel_following: FollowingInfo¶
- following: FollowingInfo¶
- user: PartialUser¶
- class ManageVideo¶