From 1e5b954ad14b830647170a7e8d856fba3876b1e5 Mon Sep 17 00:00:00 2001 From: andrei Date: Mon, 16 Oct 2017 10:08:16 -0700 Subject: [PATCH] Fix Channel's __str__ method for DMs --- disco/types/channel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/disco/types/channel.py b/disco/types/channel.py index 2c01719..23d0b3c 100644 --- a/disco/types/channel.py +++ b/disco/types/channel.py @@ -139,7 +139,7 @@ class Channel(SlottedModel, Permissible): self.attach(six.itervalues(self.overwrites), {'channel_id': self.id, 'channel': self}) def __str__(self): - return u'#{}'.format(self.name) + return u'#{}'.format(self.name) if self.name else unicode(self.id) def __repr__(self): return u''.format(self.id, self)