mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-06-07 20:28:38 +00:00
Add __str__ method to Thread
This commit is contained in:
parent
c2df574b2a
commit
2eb0ec07ab
@ -154,6 +154,9 @@ class Thread(Messageable, Hashable):
|
|||||||
f' owner_id={self.owner_id!r} locked={self.locked} archived={self.archived}>'
|
f' owner_id={self.owner_id!r} locked={self.locked} archived={self.archived}>'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def __str__(self) -> str:
|
||||||
|
return self.name
|
||||||
|
|
||||||
def _from_data(self, data: ThreadPayload):
|
def _from_data(self, data: ThreadPayload):
|
||||||
self.id = int(data['id'])
|
self.id = int(data['id'])
|
||||||
self.parent_id = int(data['parent_id'])
|
self.parent_id = int(data['parent_id'])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user