fix chat not being defined

This commit is contained in:
udf 2018-12-07 15:54:11 +02:00
parent 165b100804
commit 926ea5751c
Signed by: kate
GPG Key ID: E40724BAD73AF77B
1 changed files with 2 additions and 1 deletions

View File

@ -29,9 +29,10 @@ async def on_edit_end(event, target):
message = event.message.message[:-2] message = event.message.message[:-2]
if message.strip() == '.': if message.strip() == '.':
message = '' message = ''
chat = await event.get_input_chat()
try: try:
await borg(EditMessageRequest( await borg(EditMessageRequest(
peer=await event.get_input_chat(), peer=chat,
id=target.id, id=target.id,
no_webpage=not target.media, no_webpage=not target.media,
message=message, message=message,