Skip to content

Commit fb49efe

Browse files
authored
New methods so they get included in docs. Also ran black on the file. (#269)
1 parent 9af49cb commit fb49efe

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

twitchio/message.py

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,16 @@
3333

3434
class Message:
3535

36-
__slots__ = ("_raw_data", "content", "_author", "echo", "_timestamp", "_channel", "_tags", "_id")
36+
__slots__ = (
37+
"_raw_data",
38+
"content",
39+
"_author",
40+
"echo",
41+
"_timestamp",
42+
"_channel",
43+
"_tags",
44+
"_id",
45+
)
3746

3847
def __init__(self, **kwargs):
3948
self._raw_data = kwargs.get("raw_data")
@@ -65,6 +74,16 @@ def channel(self) -> "Channel":
6574
"""The Channel object associated with the Message."""
6675
return self._channel
6776

77+
@property
78+
def content(self) -> str:
79+
"""The parsed raw_data received from Twitch for this Message."""
80+
return self.content
81+
82+
@property
83+
def echo(self) -> bool:
84+
"""Boolean representing if this is a self-message or not."""
85+
return self.echo
86+
6887
@property
6988
def raw_data(self) -> str:
7089
"""The raw data received from Twitch for this Message."""

0 commit comments

Comments
 (0)