Send chat action before uploading photo
This commit is contained in:
parent
5f898f22bb
commit
e55f385f93
1 changed files with 3 additions and 1 deletions
|
@ -61,11 +61,13 @@ class CallMeByYourBot:
|
||||||
|
|
||||||
for hashtag in HASHTAGS:
|
for hashtag in HASHTAGS:
|
||||||
if hashtag.lower() in msg.text.lower():
|
if hashtag.lower() in msg.text.lower():
|
||||||
|
await methods.sendChatAction(msg.chat.id, 'upload_photo').async_call(self.session, self.token)
|
||||||
|
|
||||||
send_photo = methods.sendPhoto(chat_id=msg.chat.id)
|
send_photo = methods.sendPhoto(chat_id=msg.chat.id)
|
||||||
send_photo.reply_to_message_id = msg.message_id
|
send_photo.reply_to_message_id = msg.message_id
|
||||||
send_photo.photo = random.choice(HASHTAGS[hashtag])
|
send_photo.photo = random.choice(HASHTAGS[hashtag])
|
||||||
send_photo.caption = hashtag
|
send_photo.caption = hashtag
|
||||||
resp = await send_photo.async_call(self.session, self.token)
|
await send_photo.async_call(self.session, self.token)
|
||||||
|
|
||||||
async def parse_update(self, update: types.Update) -> int:
|
async def parse_update(self, update: types.Update) -> int:
|
||||||
print(update)
|
print(update)
|
||||||
|
|
Loading…
Reference in a new issue