rsalmei / alive-progress

A new kind of Progress Bar, with real-time throughput, ETA, and very cool animations!
MIT License
5.45k stars 205 forks source link

How can use progress bar in telegram bot? #202

Closed WhisperOfLove closed 1 year ago

WhisperOfLove commented 1 year ago

How can use progress bar in telegram bot? do you have string of your code? so i can use it in telegram

TheTechRobo commented 1 year ago

What do you want to do? Do you want to put the bar inside of a telegram message? If so, that's not possible.

rsalmei commented 1 year ago

I'm clueless about how bots work. If the content is sent like messages, I suppose it wouldn't be possible.

rsalmei commented 1 year ago

@WhisperOfLove Remember this is a repository about a Python lib, which generates a cool progress bar representation in compatible Python environments, i.e. shell terminals, editors desktop or web, etc. I know nothing about Telegram bots, you should before anything show what you have, bring some information about it, and then we see if we can help. But I can't simply go and try to learn how Telegram bots work just to help you, as this is not the objective of this project.

WhisperOfLove commented 1 year ago

i can do it by editing message, so if possible send me your code in String format and i will do it

rsalmei commented 1 year ago

What do you mean by "my code in String format"?? If you mean an example, you can find several ones in the README docs.

WhisperOfLove commented 1 year ago

if you send me your code in string, without your library syntax i can make it

TheTechRobo commented 1 year ago

??? The project is open-source. You can look at the source code right now.

rsalmei commented 1 year ago

if you send me your code in string, without your library syntax i can make it

Sorry but it still doesn't make sense... Which code? What is a code "in string"?? What would be "without my lib syntax"? Please explain thoroughly what you are trying to do, do not use small sentences, I can't understand what you're up to or need.

aerickson commented 1 year ago

It wouldn't be easy to use this library in a messaging bot. This library is for command line progress bars.

You could use the animations alive-progress has, but you'd have to edit the message with the status bar on every progress/animation change. Most messaging clients aren't going to like frequent updates (I guess you could do it for a bar that doesn't update often).

It would just be easier (from my experience writing chat bots) to post a new message with a status update from your bot (track the progress in your program and just output 'step 1/10', etc).

rsalmei commented 1 year ago

Yes, I don't know bots myself, but it makes total sense.

WhisperOfLove commented 1 year ago

i can edit message each second to make animation i just need code in text format to do it

TheTechRobo commented 1 year ago

What code? What do you mean by "in text format"? Please clarify. We're running in circles here.

Also, if you don't run into rate-limiting editing your message every second you'll be lucky.

rsalmei commented 1 year ago

i just need code in text format to do it

All code is in text format as far as I'm aware... Everything one can code is in text, or have you seen code as a drawing? This is the last message before I close the issue. Please make it count if your request is genuine, so we see you're not trolling us.

rsalmei commented 1 year ago

Ok, closing this one.