diff options
| author | Rapptz <[email protected]> | 2019-03-20 22:19:40 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2019-03-20 22:30:23 -0400 |
| commit | 35c0476dbbc3bf5d4848717b931f79ca5b4bc831 (patch) | |
| tree | 8f382148fdf70e31778173565b5e99705227c67a /discord/state.py | |
| parent | Update docs, mostly Inviting Your Bot (diff) | |
| download | discord.py-35c0476dbbc3bf5d4848717b931f79ca5b4bc831.tar.xz discord.py-35c0476dbbc3bf5d4848717b931f79ca5b4bc831.zip | |
Add TextChannel.last_message_id and TextChannel.last_message
Diffstat (limited to 'discord/state.py')
| -rw-r--r-- | discord/state.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/discord/state.py b/discord/state.py index 0d2bd6f3..8add00ec 100644 --- a/discord/state.py +++ b/discord/state.py @@ -361,6 +361,8 @@ class ConnectionState: message = Message(channel=channel, data=data, state=self) self.dispatch('message', message) self._messages.append(message) + if channel and channel._type in (0, 5): + channel.last_message_id = message.id def parse_message_delete(self, data): raw = RawMessageDeleteEvent(data) |