diff options
| author | Rapptz <[email protected]> | 2016-12-30 04:34:42 -0500 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2017-01-03 09:52:06 -0500 |
| commit | dceba9d962483a0f423e53d472e18c8cd84c0759 (patch) | |
| tree | d39c4906807eb0d2ec55070715f237b82ecc12d2 /discord/message.py | |
| parent | Fix handling of author update and missing type attribute in Message. (diff) | |
| download | discord.py-dceba9d962483a0f423e53d472e18c8cd84c0759.tar.xz discord.py-dceba9d962483a0f423e53d472e18c8cd84c0759.zip | |
Add useful repr to all data classes.
Diffstat (limited to 'discord/message.py')
| -rw-r--r-- | discord/message.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/discord/message.py b/discord/message.py index a43deac3..9a49230c 100644 --- a/discord/message.py +++ b/discord/message.py @@ -123,6 +123,9 @@ class Message: self.reactions = [Reaction(message=self, data=d) for d in data.get('reactions', [])] self._update(channel, data) + def __repr__(self): + return '<Message id={0.id} pinned={0.pinned} author={0.author!r}>'.format(self) + def _try_patch(self, data, key, transform): try: value = data[key] |