aitorres / dogpicsbot

A simple Telegram bot that sends random dog pictures.
MIT License
9 stars 4 forks source link

Refactor and merge the two "send_image" methods #7

Closed aitorres closed 3 years ago

aitorres commented 4 years ago

The bot's two methods that take care of sending pictures (send_dog_picture and send_fox_picture) are very similar. The duplicate logic should be moved to a separate function called in both places, or otherwise refactored so that we don't duplicate code.

Besides this change, it would be a bonus if all the calls to context.bot.send_photo would reply to the received message_id :-)

kana800 commented 4 years ago

hey, I am beginner looking to contribute and I can work on this if its up for grab Do you want to merge send_dog_picture and send_fox_picture

seleregb commented 3 years ago

Hey @aitorres I can take this once you're good with my PR for the PEP8 style changes

aitorres commented 3 years ago

Hey @aitorres I can take this once you're good with my PR for the PEP8 style changes

Sure thing @seleregb!

seleregb commented 3 years ago

@aitorres I'm getting this error when setting up the environment. Are you okay with me changing the library versions?

ERROR: Cannot install -r requirements.txt (line 23) and urllib3==1.26.5 because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested urllib3==1.26.5
    requests 2.24.0 depends on urllib3!=1.25.0, !=1.25.1, <1.26 and >=1.21.1
aitorres commented 3 years ago

@aitorres I'm getting this error when setting up the environment. Are you okay with me changing the library versions?

ERROR: Cannot install -r requirements.txt (line 23) and urllib3==1.26.5 because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested urllib3==1.26.5
    requests 2.24.0 depends on urllib3!=1.25.0, !=1.25.1, <1.26 and >=1.21.1

Yes, go ahead and thanks for letting me know! I think if you chage requests to 2.26.0 the problem will be fixed.

aitorres commented 3 years ago

Closed by #14