pyrogram/examples
Dan 19ad70455f Update welcome_bot.py example
Delete the previous message in case of consecutive member joins and
send a new one containing the names of all the previous new members
2018-12-10 15:15:21 +01:00
..
callback_query_handler.py Put example descriptions at the very top of the files 2018-10-09 15:23:40 +02:00
echo_bot.py Put example descriptions at the very top of the files 2018-10-09 15:23:40 +02:00
get_chat_members2.py Put example descriptions at the very top of the files 2018-10-09 15:23:40 +02:00
get_chat_members.py Put example descriptions at the very top of the files 2018-10-09 15:23:40 +02:00
get_history.py Put example descriptions at the very top of the files 2018-10-09 15:23:40 +02:00
hello_world.py Put example descriptions at the very top of the files 2018-10-09 15:23:40 +02:00
LICENSE Add CC0 1.0 Universal License 2018-10-09 15:07:12 +02:00
query_inline_bots.py Put example descriptions at the very top of the files 2018-10-09 15:23:40 +02:00
raw_update_handler.py Put example descriptions at the very top of the files 2018-10-09 15:23:40 +02:00
README.md Hint about examples' license in README.md 2018-10-09 15:17:15 +02:00
send_bot_keyboards.py Put example descriptions at the very top of the files 2018-10-09 15:23:40 +02:00
welcome_bot.py Update welcome_bot.py example 2018-12-10 15:15:21 +01:00

Examples

This folder contains example scripts to show you how Pyrogram looks like.

Every script is working right away (provided you correctly set up your credentials), meaning you can simply copy-paste and run. The only things you have to change are session names and target chats.

All the examples listed in this directory are licensed under the terms of the CC0 1.0 Universal license and can be freely used as basic building blocks for your own applications without worrying about copyrights.

Example Description
hello_world Demonstration of basic API usages
echo_bot Echo bot that replies to every private text message
welcome_bot The Welcome Bot source code in @PyrogramChat
get_history How to retrieve the full message history of a chat
get_chat_members How to get the first 10.000 members of a supergroup/channel
get_chat_members2 Improved version to get more than 10.000 members
query_inline_bots How to query an inline bot and send a result to a chat
send_bot_keyboards How to send normal and inline keyboards using regular bots
callback_query_handler How to handle queries coming from inline button presses
raw_update_handler How to handle raw updates (old, should be avoided)