Coder Social home page Coder Social logo

karipov / atlink Goto Github PK

View Code? Open in Web Editor NEW
44.0 2.0 48.0 7 KB

๐Ÿ”— A telegram bot that turns @ links into instagram links both in private chats and groups. Source code for: https://youtu.be/jhFsFZXZbu4

License: MIT License

Python 100.00%
telegram-bot python3 pytelegrambotapi instagram

atlink's Issues

Jupiter notebook - 'TeleBot' object has no attribute 'message_handler'

Hey there,

I wanted to try out the at link code by basically copying into my Jupiter Notebook and modifying it from there. However on first try I get the following issue:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-1-2b3ea344f58d> in <module>
      6 bot = telebot.TeleBot(bot_token)
      7 
----> 8 @bot.message_handler(commands=['start', 'help'])
      9 def send_welcome(message):
     10     bot.reply_to(message, "Test message - response")

AttributeError: 'TeleBot' object has no attribute 'message_handler'

This is the code I'm using:

import telebot
import time

bot_token = "My_generated_Token"
bot = telebot.TeleBot(bot_token)

@bot.message_handler(commands=['start', 'help'])
def send_welcome(message):
    bot.reply_to(message, "Howdy, how are you doing?")

bot.polling()

Is there any way to resolve this problem?

Bot.py syntax error line 35

. File "bot.py", line 35 @server.route('/' + TOKEN, methods=['POST'])def getMessage(): bot.process_new_updates([telebot.types.Update.de_json(request.stream.read().decode("utf-8"))]) return "!", 200

I can't run the bot saying syntax error I tried to fix all efforts down ๐Ÿ‘‡

Sent from my W2 using FastHub

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.