From a78f57db7a4726a1ac66296bfb86eabfa4b4d036 Mon Sep 17 00:00:00 2001 From: Joscha Date: Fri, 12 Apr 2019 12:12:04 +0000 Subject: [PATCH] Untruncate LiveMessages --- README.md | 2 +- yaboli/message.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 00dc19c..941d270 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,6 @@ i. e. the text between the end of the "!echo" and the end of the whole message. ## TODOs - [ ] implement !restart and add an easier way to run bots -- [ ] untruncate LiveMessage-s - [ ] config file support for bots, used by default - [ ] package in a distutils-compatible way (users should be able to install yaboli using `pip install git+https://github.com/Garmelon/yaboli`) @@ -63,3 +62,4 @@ i. e. the text between the end of the "!echo" and the end of the whole message. - [ ] write examples - [x] implement !uptime for proper botrulez conformity - [x] implement !kill +- [x] untruncate LiveMessage-s diff --git a/yaboli/message.py b/yaboli/message.py index 0e3c24b..ebad87c 100644 --- a/yaboli/message.py +++ b/yaboli/message.py @@ -166,5 +166,8 @@ class LiveMessage(Message): async def reply(self, content: str) -> "LiveMessage": return await self.room.send(content, parent_id=self.message_id) + async def get(self) -> "LiveMessage": + return await self.room.get(self.message_id) + async def before(self, amount: int) -> List["LiveMessage"]: return await self.room.log(amount, before_id=self.message_id)