Skip to content

Commit

Permalink
- Added sending random photos of dogs in jpg format
Browse files Browse the repository at this point in the history
  • Loading branch information
LaciaMemeFrame committed Jul 14, 2020
1 parent c038b02 commit fec37e3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 18 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,6 @@ Wait for new updates :-)
- Optimization
- Added InlineQueryResultPhoto
### v1.52.453.5
- Optimization
- Optimization
### v1.62.453.5
- - Added sending random photos of dogs in jpg format
31 changes: 14 additions & 17 deletions test.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,28 +55,25 @@ def query_photo(inline_query):
'https://raw.githubusercontent.com/LaciaMemeFrame/ChatBot-Telegram/master/inline.jpg',
'https://raw.githubusercontent.com/LaciaMemeFrame/ChatBot-Telegram/master/inline.jpg')
r2 = types.InlineQueryResultPhoto('2',
'https://raw.githubusercontent.com/LaciaMemeFrame/ChatBot-Telegram/master/inline1.jpg',
'https://raw.githubusercontent.com/LaciaMemeFrame/ChatBot-Telegram/master/inline1.jpg')
'https://raw.githubusercontent.com/LaciaMemeFrame/ChatBot-Telegram/master/inlinedogs1.jpg',
'https://raw.githubusercontent.com/LaciaMemeFrame/ChatBot-Telegram/master/inlinedogs1.jpg')
r3 = types.InlineQueryResultPhoto('3',
'https://raw.githubusercontent.com/LaciaMemeFrame/ChatBot-Telegram/master/inline2.jpg',
'https://raw.githubusercontent.com/LaciaMemeFrame/ChatBot-Telegram/master/inline2.jpg')
'https://raw.githubusercontent.com/LaciaMemeFrame/ChatBot-Telegram/master/inlinedogs2.jpg',
'https://raw.githubusercontent.com/LaciaMemeFrame/ChatBot-Telegram/master/inlinedogs2.jpg')
r4 = types.InlineQueryResultPhoto('4',
'https://raw.githubusercontent.com/LaciaMemeFrame/ChatBot-Telegram/master/inline3.jpg',
'https://raw.githubusercontent.com/LaciaMemeFrame/ChatBot-Telegram/master/inline3.jpg')
'https://raw.githubusercontent.com/LaciaMemeFrame/ChatBot-Telegram/master/inlinedogs3.jpg',
'https://raw.githubusercontent.com/LaciaMemeFrame/ChatBot-Telegram/master/inlinedogs3.jpg')
r5 = types.InlineQueryResultPhoto('5',
'https://raw.githubusercontent.com/LaciaMemeFrame/ChatBot-Telegram/master/inline4.jpg',
'https://raw.githubusercontent.com/LaciaMemeFrame/ChatBot-Telegram/master/inline4.jpg')
'https://raw.githubusercontent.com/LaciaMemeFrame/ChatBot-Telegram/master/inlinedogs4.jpg',
'https://raw.githubusercontent.com/LaciaMemeFrame/ChatBot-Telegram/master/inlinedogs4.jpg')
r6 = types.InlineQueryResultPhoto('6',
'https://raw.githubusercontent.com/LaciaMemeFrame/ChatBot-Telegram/master/inline5.jpg',
'https://raw.githubusercontent.com/LaciaMemeFrame/ChatBot-Telegram/master/inline5.jpg')
'https://raw.githubusercontent.com/LaciaMemeFrame/ChatBot-Telegram/master/inlinedogs5.jpg',
'https://raw.githubusercontent.com/LaciaMemeFrame/ChatBot-Telegram/master/inlinedogs5.jpg')
r7 = types.InlineQueryResultPhoto('7',
'https://raw.githubusercontent.com/LaciaMemeFrame/ChatBot-Telegram/master/inline6.jpg',
'https://raw.githubusercontent.com/LaciaMemeFrame/ChatBot-Telegram/master/inline6.jpg')
r8 = types.InlineQueryResultPhoto('8',
'https://raw.githubusercontent.com/LaciaMemeFrame/ChatBot-Telegram/master/inline7.jpg',
'https://raw.githubusercontent.com/LaciaMemeFrame/ChatBot-Telegram/master/inline7.jpg')

bot.answer_inline_query(inline_query.id, [r, r2, r3, r4, r5, r6, r7, r8], cache_time=1)
'https://raw.githubusercontent.com/LaciaMemeFrame/ChatBot-Telegram/master/inlinedogs6.jpg',
'https://raw.githubusercontent.com/LaciaMemeFrame/ChatBot-Telegram/master/inlinedogs6.jpg')

bot.answer_inline_query(inline_query.id, [r, r2, r3, r4, r5, r6, r7], cache_time=1)
except Exception as e:
print(e)

Expand Down

0 comments on commit fec37e3

Please sign in to comment.