فارسی
باز کردن در Telegram
>>>> telegram.Bot()

>>> telegram.Bot()

@pythontelegrambotgroup · گروه · فناوری · ایندکس از 2026-04-17
9 911عضو−10 در هفته
61نویسنده در 30 روز
295پیام در 30 روز
627 174پیام در ایندکس
N
For the Audio File, duration (:obj:`int` | :class:`datetime.timedelta`): Duration of the audio in seconds as defined by the sender. .. versionchanged:: v22.2 |time-period-input| See this why the duration is here as datetime.timedelta as tg bot api say the duraiton is integer only?
  1. P
    Because this is the correct python native way to express a duration
کل رشتهٔ گفتگو · 3 پاسخ →
N
You can opt-in early by setting PTB_TIMEDELTA=true or PTB_TIMEDELTA=1 as an environment variable what does otp-in means? so later version audioobj.duration will not give me int value 😭😭😭 Now i am using the integer value to custom minute and second of the audio, how then i will do in future 😢, why PTB is forcing to remove the int?
  1. P
    Because timedelta is more native. What do you mean with custom minute and second?
    1. N
      see i have this, which format the i t to what to shows to user,as later int will remove so what will the way to design this type of sting from the timedelta?
            1. T
              So ur saying there’s no special handling needed here and the low level request layer already takes care of response deserialization and API errors?
  2. E
    You can just call total_seconds() and your previous code will work as is without any change.
کل رشتهٔ گفتگو · 9 پاسخ →
N
def format_duration(duration: int) -> str: """Format audio duration as HH:MM:SS.""" hours, remainder = divmod(duration, 3600) minutes, seconds = divmod(remainder, 60) if hours: return f"{hours:02}:{minutes:02}:{seconds:02}" return f"{minutes:02}:{seconds:02}"
T
Technical question about this fix 👀 If PTB 22.8 doesn’t expose "get_forum_topic_list()" as a "Bot" method then how exactly are u calling the underlying Bot API endpoint through the low level request layer? And how are u handling response deserialization Telegram API errors and compatibility with newer PTB versions that might introduce a native wrapper later? Also what happens if the API response structure changes or the request fails halfway through topic discovery Could the fallback silently swallow the actual error again?
  1. N
    پیوند
    برای نمایش کلیک کنید
    1) https://github.com/python-telegram-bot/python-telegram-bot/wiki/Bot-API-Forward-Compatibility#new-methods 2) https://github.com/python-telegram-bot/python-telegram-bot/wiki/Bot-API-Forward-Compatibility#receiving-objects 3) If Telegram removes the API method, the request will start failing after the API rolls out. If Telegram modifies the response, objects already implemented in PTB will retain the modified fields in api_kwargs, objects not implemented in PTB will simply have a different JSON entirely
کل رشتهٔ گفتگو · 1 پاسخ →
R
Hello there, Jhon Wick (Snap Traffic Solutions). You are writing your job offer in our technical focused groups, which is against our rules. To find a bot developer, please look at agencies dedicated towards freelancers. An example of those would be https://fiverr.com, which we are not associated with.
N
Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files » say i have only 1024*1024 image, i want to send this as thumbnail for send_audio, what will my choice to do? i will simpley use pass the image as pathlib.Path obj
N
Hey guys! I'm new here I would like to make a bot is there any open free source to learn how to make bot from scratch? And I want to make one with AI powerd
N
See i have a lit of user_id whom i want to block from my bot, whatever response they send to the bot any command or any file or any message i want to send them a custom reply with informaiton why they are banned how to unban them by themself. so i want this pls say a way how i will achieve this easily rather than using a custom fun login in all the function?
  1. N
    Wiki of python-telegram-bot - Category Design Pattern How do I limit who can use my bot?
کل رشتهٔ گفتگو · 1 پاسخ →
بایگانی به تفکیک ماه
اکتبر 2026سپتامبر 2026اوت 2026ژوئیه 2026ژوئن 2026مه 2026آوریل 2026مارس 2026فوریه 2026ژانویه 2026دسامبر 2025نوامبر 2025اکتبر 2025سپتامبر 2025اوت 2025ژوئیه 2025ژوئن 2025مه 2025آوریل 2025مارس 2025فوریه 2025ژانویه 2025دسامبر 2024نوامبر 2024اکتبر 2024سپتامبر 2024اوت 2024ژوئیه 2024ژوئن 2024مه 2024آوریل 2024مارس 2024فوریه 2024ژانویه 2024دسامبر 2023نوامبر 2023اکتبر 2023سپتامبر 2023اوت 2023ژوئیه 2023ژوئن 2023مه 2023آوریل 2023مارس 2023فوریه 2023ژانویه 2023دسامبر 2022نوامبر 2022اکتبر 2022سپتامبر 2022اوت 2022ژوئیه 2022ژوئن 2022مه 2022آوریل 2022مارس 2022فوریه 2022ژانویه 2022دسامبر 2021نوامبر 2021اکتبر 2021سپتامبر 2021اوت 2021ژوئیه 2021ژوئن 2021مه 2021آوریل 2021مارس 2021فوریه 2021ژانویه 2021دسامبر 2020نوامبر 2020اکتبر 2020سپتامبر 2020اوت 2020ژوئیه 2020ژوئن 2020مه 2020آوریل 2020مارس 2020فوریه 2020ژانویه 2020دسامبر 2019نوامبر 2019اکتبر 2019سپتامبر 2019اوت 2019ژوئیه 2019ژوئن 2019مه 2019آوریل 2019مارس 2019فوریه 2019ژانویه 2019دسامبر 2018نوامبر 2018اکتبر 2018سپتامبر 2018اوت 2018ژوئیه 2018ژوئن 2018مه 2018آوریل 2018مارس 2018فوریه 2018ژانویه 2018دسامبر 2017نوامبر 2017اکتبر 2017سپتامبر 2017اوت 2017ژوئیه 2017ژوئن 2017مه 2017آوریل 2017مارس 2017فوریه 2017ژانویه 2017دسامبر 2016نوامبر 2016اکتبر 2016سپتامبر 2016اوت 2016ژوئیه 2016ژوئن 2016مه 2016آوریل 2016مارس 2016

فید عمومی باز از ایندکس جست‌وجو ChatCrawler — «Google برای Telegram عمومی»؛ با خزش انجمن به‌روز می‌شود. زمان‌ها به UTC است.

فقط محتوای عمومی، API رسمی Telegram. دربارهٔ ما · پرسش‌ها · محدودیت‌های ایندکس · حذف یک صفحه · کاتالوگ · جست‌وجو · روش محاسبهٔ ما