Git Product home page Git Product logo

Comments (4)

Ali-Toosi avatar Ali-Toosi commented on June 29, 2024 1

Hey, I'm somewhat busy at the moment so I might not be able to look at this in at least another week. I'll have a look eventually but wanted to let you know about that now in case you were waiting for me.

from django-tgbot.

ABOLFAZLVALIKHANI avatar ABOLFAZLVALIKHANI commented on June 29, 2024

I solved it, but not with get_file
First , I recive the file path from telegram with the file id
Two, make url and download

But I think it's better if you add this feuther to library
Thank you ❤️

from django-tgbot.

ABOLFAZLVALIKHANI avatar ABOLFAZLVALIKHANI commented on June 29, 2024

Hello. It is very strange. My code stopped after a while. I get the following error:

image = update.get_message().get_photo()
AttributeError: 'Message' object has no attribute 'get_photo'

my code :

processor(state_manager, from_states='submit-signal-image' ,fail=state_types.Keep)
def submit_signal_taeed_adad(bot: TelegramBot, update: Update, state: TelegramState):

image = update.get_message().get_photo()
fileid= image[-1].file_id

Do you know where the problem is?

from django-tgbot.

Ali-Toosi avatar Ali-Toosi commented on June 29, 2024

Hi, sorry for getting back to you so late. I saw you already opened a PR for this so this shouldn't be a problem anymore but for anyone who reads this in future, if there are any attributes on any types that you think exist on the object but .get_<attr_name> isn't implemented, you can just use .<attr_name> directly.

from django-tgbot.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.