Add shortcut for redact in MaubotMessageEvent

This commit is contained in:
Tulir Asokan 2022-09-12 21:22:33 +03:00
parent d574f84079
commit fbacad8676

View file

@ -123,6 +123,9 @@ class MaubotMessageEvent(MessageEvent):
def react(self, key: str) -> Awaitable[EventID]: def react(self, key: str) -> Awaitable[EventID]:
return self.client.react(self.room_id, self.event_id, key) return self.client.react(self.room_id, self.event_id, key)
def redact(self, reason: str | None = None) -> Awaitable[EventID]:
return self.client.redact(self.room_id, self.event_id, reason=reason)
def edit( def edit(
self, self,
content: str | MessageEventContent, content: str | MessageEventContent,