Skip to content
This repository was archived by the owner on Sep 8, 2025. It is now read-only.

Conversation

@Zenith727
Copy link
Contributor

lmao

kick/client.py Outdated
livestream: `PartialLivestream`
The livestream
"""
async def on_livestream_end(self, StreamEnd: Endstream) -> None:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parameters/variables should be in snake_case

kick/client.py Outdated
"""
|coro|
on_livestream_start is an event that can be overriden with the `Client.event` decorator or with a subclass.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you forgot to change the description when copy pasting the docstring

kick/client.py Outdated
Parameters
-----------
livestream: `PartialLivestream`
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are the wrong parameters, appears you forgot to change those too when copy pasting the docstring

self._data = data
self.http = http

self.id: int = data["id"]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be a property

self.http = http

self.id: int = data["id"]
self.channel_id: int = data["channel"]["id"]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be a property

def __repr__(self) -> str:
return f"<Livestream id={self.id} title={self.title} streamer={self.slug}>"

class Endstream:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. This should be in PastalCase
  2. Throughout the rest of the library, a livestream is referred to as a "livestream" and not a "stream", this class should conform to the same standard. Ex: "LivestreamEnd"

kick/types/ws.py Outdated

class StreamEndPayload(TypedDict):
id: int
channel_id: int
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is different from how your "Endstream" class uses it

kick/ws.py Outdated
self.http.client.dispatch(event, user)

case "App\\Events\\StopStreamBroadcast":
Endstreams = Endstream(data=data["livestream"], http=self.http)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

variables should be in camel_case

match raw_data["event"]:
case "App\\Events\\ChatMessageEvent":
msg = Message(data=data["livestream"], http=self.http)
msg = Message(data=data, http=self.http)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This reverts changes from your lasts PR

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that chatmsg not livestream hmm

@cibere
Copy link
Owner

cibere commented Jan 23, 2024

Also, please run black on this

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants