Skip to content

Commit

Permalink
Исправлен неработающий ответ пользователю (#9)
Browse files Browse the repository at this point in the history
Замена extract на extract_from
  • Loading branch information
rekayno authored Mar 17, 2023
1 parent 7368c23 commit 0c60afd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bot/handlers/adminmode.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def extract_id(message: Message) -> int:
raise ValueError("Не удалось извлечь ID для ответа!")

# ... более того, хэштег должен иметь вид #id123456, где 123456 — ID получателя
hashtag = entities[-1].extract(message.text or message.caption)
hashtag = entities[-1].extract_from(message.text or message.caption)
if len(hashtag) < 4 or not hashtag[3:].isdigit(): # либо просто #id, либо #idНЕЦИФРЫ
raise ValueError("Некорректный ID для ответа!")

Expand Down

0 comments on commit 0c60afd

Please sign in to comment.