mirror of
https://gitlab.com/vylion/velascobot.git
synced 2025-04-19 21:46:35 +02:00
Velasco 2.4
- Added ability to force Velasco to answer to another message (send command "/speak" as an answer to the message that you want Velasco to reply to).
This commit is contained in:
parent
edca56e23c
commit
c6053724c8
1 changed files with 2 additions and 1 deletions
|
@ -179,11 +179,12 @@ def speak(bot, update):
|
|||
if not user_is_admin(user):
|
||||
return
|
||||
|
||||
reply_to = update.message.reply_to_message.message_id if update.message.reply_to_message else update.message.message_id
|
||||
text = update.message.text.split()
|
||||
if len(text) > 1:
|
||||
chatlog.add_msg(' '.join(text[1:]))
|
||||
msg = chatlog.speak()
|
||||
send_message(bot, update, msg, update.message.message_id)
|
||||
send_message(bot, update, msg, reply_to)
|
||||
savechat(chatlog)
|
||||
chatlogs[chatlog.id] = chatlog
|
||||
|
||||
|
|
Loading…
Reference in a new issue