Improve channel's repr
This commit is contained in:
1 parent
29d4fb6cb0
commit
5e2a40fc57
1 file changed
+5
-1
+5
-1
@@ -109,7 +109,11 @@ class Channel:
|
|||||||
return self
|
return self
|
||||||
|
|
||||||
def __repr__(self) -> str:
|
def __repr__(self) -> str:
|
||||||
return f"Channel({self.name}, {self.id})"
|
if self._display_name is not None:
|
||||||
|
name = f"{self._display_name}({self._login})"
|
||||||
|
else:
|
||||||
|
name = self._login
|
||||||
|
return f"Channel({name}, {self.id})"
|
||||||
|
|
||||||
def __eq__(self, other: object):
|
def __eq__(self, other: object):
|
||||||
if isinstance(other, self.__class__):
|
if isinstance(other, self.__class__):
|
||||||
|
|||||||
Reference in new issue
Block a user