4. My bot
• - Dictionary bots: @envndictbot @thesaurusdictbot
• - Logic:
• If /start : welcome message
• If /help: help message
• If any word: check database to get definition
• If word from group chat: filter bot name
5. Flow chart(1)
Telegram Server Your computer
Polling
Messages request
limit<=100
Users
Message
Polling:
/getUpdates?offset=*&limit=*
12. Analytics
1 hi 150
2 hello 105
3 fuck 98
4 sex 72
5 good 63
6 book 59
7 love 58
8 start 55
9 go 30
10 ok 27
11 thesaurus 27
12 stop 21
13 apple 19
14 help 19
15 car 18
13. Avoid spam
• Using regular expression to validate bot input and
reduce work load
• Skip group message which not related to your bot
• Blacklist spammers