pythontelegrambotgroup | Unsorted

Telegram-канал pythontelegrambotgroup - >>> telegram.Bot()

10206

This group is for questions, answers and discussions around the python-telegram-bot library. Off-topic group: @pythontelegrambottalk | Website: https://python-telegram-bot.org

Subscribe to a channel

>>> telegram.Bot()

So that's what those big accounts do?

Читать полностью…

>>> telegram.Bot()

I moved this discussion to the off-topic group.

Читать полностью…

>>> telegram.Bot()

Not you but the one that keep asking simple question, which can be answered by using internet to the fullest.

Читать полностью…

>>> telegram.Bot()

try giving kwargs a type (Any) in you function definition

Читать полностью…

>>> telegram.Bot()

The error message seems pretty clear: type hint kwargs

Читать полностью…

>>> telegram.Bot()

Hi Nandu 😋 Python Expert Please post code or tracebacks using a pastebin rather than via plain text or a picture. https://pastebin.com/ is quite popular, but there are many alternatives out there. Of course, for very short snippets, text is fine. Please at least format it as monospace in that case., we like to keep our groups readable and thus require long code to be in a pastebin.

⚠️ The code snippet(s) in your message have been moved to https://pastebin.poolitzer.eu/p/Ra2joh.py. Your original message will be deleted in a minute, please reply to this message with your query.

Читать полностью…

>>> telegram.Bot()

The download method is async, so you just await it and send the message after that

Читать полностью…

>>> telegram.Bot()

See When User send some file my bot download this and do some processing on it, maybe this processing take 30 second or 30 minute, but how i can say when this processing will finish after that only send a response to the user that it is done.
What system PTB has for this and some documentation or article on this?

Читать полностью…

>>> telegram.Bot()

as far as i know you need to define "receiver_user" when sending a message https://core.telegram.org/bots/api#message

Читать полностью…

>>> telegram.Bot()

I moved this discussion to the off-topic group.

Читать полностью…

>>> telegram.Bot()

Hey. You can find an explanation of @roolsbot's functionality on 'GitHub.

Читать полностью…

>>> telegram.Bot()

I got too surpirsed with a new thigns see, my bot which has conencted with local bot api server, ther i tried to send a large file 200 mb from the local storage to the user , but due to i connect to mobile hotspot this internet is too slow and after some time my terminal say this,

.venv/lib/python3.12/site-packages/telegram/request/_httpxrequest.py", line 296, in do_request
raise TimedOut from err
telegram.error.TimedOut: Timed out

but then after like more 5 minute i found the large audio 200 mb file send successfully to the user 🤭
i say if this say error of timeout so why still it send the file to the user after this why and how was this possible, is this not bad beheaviour it say error but it still send the file to the user. ???

Читать полностью…

>>> telegram.Bot()

no as after i make the builder as i shows here

then i next line did,

application = builder.build()

Читать полностью…

>>> telegram.Bot()

Are you ending it with .build() after the post init call?

Читать полностью…

>>> telegram.Bot()

In normal function we pass context, update in the funciton, now i want to send a starutp message to admin at start of the bot so i found there is: post_init -> here what funciton i will pass and its args will what i am confused any article on this explaining how to use the callback function here?

Читать полностью…

>>> telegram.Bot()

There is an option to pay to increase the limit.

Читать полностью…

>>> telegram.Bot()

we are here to help anyone with any question on ptb. if we think a search query is more reasonable then a question here then we’d say that

Читать полностью…

>>> telegram.Bot()

how is a bot like rose with 2m users handling rate limits? as i see it for every bot 20-30 interactions per minute are allowed? surely that bot gets used more.

Читать полностью…

>>> telegram.Bot()

so when i run this line does it executes the sending message to the user or not?

bot.send_message(chat_id=1, text="hi")

Читать полностью…

>>> telegram.Bot()

https://te.legra.ph/kwargs-error-11-03

See i have this demo function in my code i write this so that later anytime i can send some notication to keep store or forword keep important data there, now listen what happens,
i got kwargs error:
as i write in the same message in this how i can solve the kwargs erro in my PTB code here there

What is the best to solve this without: # ignore ?

Читать полностью…

>>> telegram.Bot()

How this part i cannot write this send message in the same UpdateHandler Functions?
i really not get the idea how i will send a response to the user back maybe i am doing video cutting so i will use ffmpeg i am confused this, that my PTB handler function will download one big file and then i will call how i am confusd, what things are these?

Читать полностью…

>>> telegram.Bot()

To me, there is no need in some kind of specific ptb system, it is not really about the ptb field of responsibiliy. It is more about how two parts of your program communicate.

A user sends the file, the bot gets it, writes the user tg id to any database (better persistent one if file processing may take half an hour or so), and once the processing has been finished and your system receives a response from the processing script, the program fetches the user tg id from the database and sends to them a message via ptb.

Читать полностью…

>>> telegram.Bot()

that’s probably gonna happen. however devs are currently working on a major refactor, so we gonna need to wait

Читать полностью…

>>> telegram.Bot()

Hi! Do you plan to support ephemeral messages? Other libraries have already implemented this.

Читать полностью…

>>> telegram.Bot()

Have anybody think of jailbreaking Claude AI ?

Читать полностью…

>>> telegram.Bot()

I also encountered this "problem phenomenon" before. The same also happened to me: at first, it gave me that "Timed out" error, regardless this, it still successfully sent out. I don't know what's this error for. Maybe it's like a "warning" which makes you pay attention if the message/file really gets sent out or not. Although it seems that in most cases, it can still send out the message/file with no problem, I believe there are still cases where the message/file might "get lost" on their way (i.e. fail to get sent out).

Читать полностью…

>>> telegram.Bot()

see as you send builder = ... and then dot build() i found .build() will make the application obj not the builder obj, so i think your builder = .build() is not right is this ?

Читать полностью…

>>> telegram.Bot()

builder = ApplicationBuilder()
.token(token=BOT_TOKEN)
.post_init(notify_admin_on_startup).build()

Читать полностью…

>>> telegram.Bot()

async def notify_admin_on_startup(application: Application) -> None:

i write a function like this, and then i add this here, say the below problem how i can solve this?
builder = (ApplicationBuilder()
.token(token=BOT_TOKEN)
.post_init(notify_admin_on_startup))

The problem i thinks here is this vs code say:

Type of parameter "application" is partially unknown
  Parameter type is "Application[Unknown, Unknown, Unknown, Unknown, Unknown, Unknown]"PylancereportUnknownParameterType

Type of "post_init" is partially unknown
  Type of "post_init" is "(post_init: (Application[Unknown, Unknown, Unknown, Unknown, Unknown, Unknown]) -> Coroutine[Any, Any, None]) -> ApplicationBuilder[ExtBot[None], CallbackContext[ExtBot[None], dict[Any, Any], dict[Any, Any], dict[Any, Any]], dict[Any, Any], dict[Any, Any], dict[Any, Any], JobQueue[CallbackContext[ExtBot[None], dict[Any, Any], dict[Any, Any], dict[Any, Any]]]]"PylancereportUnknownMemberType

Читать полностью…

>>> telegram.Bot()

"export" = ?
You can use Termux and install any packages you need, Git included... Btw this is a bit off-topic here

Читать полностью…
Subscribe to a channel