Browse Source

Add __str__ method to Thread

pull/7039/head
Lilly Rose Berner 4 years ago
committed by GitHub
parent
commit
2eb0ec07ab
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      discord/threads.py

3
discord/threads.py

@ -154,6 +154,9 @@ class Thread(Messageable, Hashable):
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):
self.id = int(data['id'])
self.parent_id = int(data['parent_id'])

Loading…
Cancel
Save