Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
Ahmed Ghaleb edited this pageSep 16, 2024 ·43 revisions

Logo

Working with PTB

Quick Start

Our Wiki (where you currently are) contains anIntroduction to the API explaining how the pure Bot API can be accessed viapython-telegram-bot.Moreover, theTutorial: Your first Bot gives an Introduction on how chatbots can be easily programmed with the help of thetelegram.ext module.

Resources

  • Thepackage documentation is the technical reference forpython-telegram-bot.It contains descriptions of all available classes, modules, methods and arguments as well as thechangelog.
  • Thewiki is home to number of more elaborate introductions of the different features ofpython-telegram-bot and other useful resources that go beyond the technical documentation.Seebelow for more details on what this wiki contains.
  • Ourexamples section contains several examples that showcase the different features of both the Bot API andpython-telegram-bot.Even if it is not your approach for learning, please take a look atechobot.py.It is the de facto base for most of the bots out there.The code for these examples is released to the public domain, so you can start by grabbing the code and building on top of it.
  • Theofficial Telegram Bot API documentation is of course always worth a read.

Getting help

If the resources mentioned above don't answer your questions or simply overwhelm you, there are several ways of getting help.

  1. We have a vibrant community of developers helping each other in ourTelegram group.Join us! Asking a question here is often the quickest way to get a pointer in the right direction.
  2. Ask questions by openinga discussion.
  3. You can even ask for help on Stack Overflow using thepython-telegram-bot tag.

Structure of this Wiki

In the sidebar to the right, you can find all important pages of this wiki. They are roughly organized by the following logic:

  • Must read: Introductory articles and frequently referenced pages.
  • Concepts & Important Elements: Introductions & explanations of how the components oftelegram.ext work and interact with each other.
  • Notable Features: Elaborate explanation to more advanced features oftelegram.ext.
  • Code Resources: Some other resources that are not exclusively PTB-specific.
  • Examples Explained: An effort to make theexamples even more accessible.You are very welcome to extend this section!
  • Networking: Articles about advanced networking questions.
  • Other resources: More interesting & helpful stuff that can't be found in any of the above sections.
  • Transition Guides: Major versions usually come with breaking changes, i.e. changes that lead to code failing after upgrading. Those guides help to ease the transition.
  • Administration: Interesting mostly for the maintainers. They, too, need a place to take notes 🙂

Contributing to this Wiki

If you stumble upon a part of the wiki that is unclear or missing important points, please go ahead and drop us a message in ourTelegram Group, or just edit the part yourself (anyone can contribute). We'd like our wiki to be as complete as possible 🙂

Wiki ofpython-telegram-bot © Copyright 2015-2025 – Licensed byCreative Commons

Must read

  1. Introduction to the API
  2. Tutorial: Your first bot
  3. FAQ
  4. How to ask good questions
  5. How to write an MWE

Concepts & Important Elements

  1. Architecture Overview
  2. Builder Pattern forApplication
  3. Types of Handlers
  4. Working with Files and Media
  5. Exceptions, Warnings and Logging
  6. Concurrency in PTB

Notable Features

  1. Advanced Filters
  2. Storing data
  3. Making your bot persistent
  4. Adding Defaults
  5. Job Queue
  6. Arbitrarycallback_data
  7. Avoiding flood limits
  8. Webhooks
  9. Bot API Forward Compatiblity

Code Resources

  1. Frequently requested design patterns
  2. Code snippets
  3. Performance Optimizations
  4. Telegram Passport
  5. Bots built with PTB
  6. Automated Bot Tests

Examples explained

  1. InlineKeyboard Example

Networking

  1. Working Behind a Proxy
  2. Handling network errors

Other resources

  1. Where to host Telegram Bots
  2. How to host your bot
  3. Local API Server
  4. Type Checking with PTB
  5. Press
  6. Notes on GAE
  7. Related Projects
  8. Emoji

Transition Guides

Administration

Clone this wiki locally

[8]ページ先頭

©2009-2025 Movatter.jp