Fix sed plugin ignoring edits

This commit is contained in:
Lonami Exo 2018-07-02 15:30:21 +02:00
parent e809a721b4
commit 199d9b15ea
1 changed files with 6 additions and 0 deletions

View File

@ -77,6 +77,12 @@ async def group_has_sedbot(group):
async def on_message(event):
last_msgs[event.chat_id].appendleft(event.message)
@borg.on(events.MessageEdited)
async def on_edit(event):
for m in last_msgs[event.chat_id]:
if m.id == event.id:
m.raw_text = event.raw_text
break
@borg.on(events.NewMessage(
pattern=re.compile(r"^s/((?:\\/|[^/])+)/((?:\\/|[^/])*)(/.*)?")))