Skip to content

Instantly share code, notes, and snippets.

@cauefcr
Last active April 12, 2021 18:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cauefcr/99a9e41eda4ad4acd45027ebb2933f2b to your computer and use it in GitHub Desktop.
Save cauefcr/99a9e41eda4ad4acd45027ebb2933f2b to your computer and use it in GitHub Desktop.
import telebot
import requests
bot = telebot.TeleBot("telegram_bot_token_here")
@bot.message_handler(func=lambda message: True)
def echo_all(message):
response = requests.get(f"https://s.dicio.com.br/{message.text}.jpg")
bot.send_photo(message.chat.id,response.content)
bot.polling()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment