Send chat action before uploading photo

このコミットが含まれているのは:
Davide Depau 2018-06-24 15:49:08 +02:00
コミット e55f385f93
署名者: depau
GPGキーID: C7D999B6A55EFE86
1個のファイルの変更3行の追加1行の削除

ファイルの表示

@ -61,11 +61,13 @@ class CallMeByYourBot:
for hashtag in HASHTAGS:
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.reply_to_message_id = msg.message_id
send_photo.photo = random.choice(HASHTAGS[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:
print(update)