How To Create A Telegram Bot With Python

Поділитися
Вставка
  • Опубліковано 5 вер 2024

КОМЕНТАРІ • 114

  • @h.montet1579
    @h.montet1579 4 роки тому +78

    Heyyy, nice tutorial, but you should try explaining more in detail the "how to make" (starting from scratch for exemple) a telegram bot. It felt it was more like a "how it works" video, anyway great video !

  • @JohnGFisher
    @JohnGFisher  5 років тому +28

    Thanks for watching guys! Be sure to leave a thumbs up if you enjoyed this video, and subscribe if you just here! How did you guys like the whole diagram thing? Should I do that in future videos?

    • @davidmagnusson7988
      @davidmagnusson7988 5 років тому

      I liked the diagram, you explain things in a clear and concise way but personally i felt the visuals also helped me.. thanks for continually posting solid content

    • @JohnGFisher
      @JohnGFisher  5 років тому +1

      @@davidmagnusson7988 right on

    • @daveee4700
      @daveee4700 5 років тому

      thanks for the helpful info!! ever thought of creating your own shoe/sneaker bot? for footsites or shopify stores? or adidas, supreme, nike etc...

    • @kingyaya1285
      @kingyaya1285 4 роки тому

      Jesus coming soon repent guys

  • @huggus1629
    @huggus1629 4 роки тому +14

    Hey, this video is *_awesome_* but I would like to know how to really _start from scratch_ , I think this is more like a "how does everything work when making a bot"-video...
    But I like it very much and after these following questions, I will somehow still have made it so my bot (kind of) works:
    1. (stupid question) What is my ngrok url?
    2. How do I make the bot DM a user?
    3. How do I look for the frequency of a message that a user sent?
    4. How does the bot determine the type of chat (DM / group)?
    Thank you and awesome video!

  • @anon99145
    @anon99145 5 років тому +3

    i have been waiting for a video like this for so many months, i couln't understand anything by reading the documentation and just wound up procastinating this bot making work, thank you man

    • @JohnGFisher
      @JohnGFisher  5 років тому

      yo kaustubh thanks for watching my man

  • @bagasrizki973
    @bagasrizki973 5 років тому +4

    Pls dont stop upload video.. I realy enjoyed ur vid 😁

  • @AaronHendersonTheM0XIE
    @AaronHendersonTheM0XIE 5 років тому +1

    Windows 10 gives you an emoji selection / search window if you hit WIN + ;

  • @xoxo-sf1zg
    @xoxo-sf1zg 5 років тому +7

    Thank you for making amazing python videos! 🙂

  • @DansterDEX
    @DansterDEX 5 років тому +1

    Please upload more videos you are great dont stop uploading..

  • @Watzon
    @Watzon 4 роки тому +1

    Good stuff. Python is a good language for bot development mainly due to the large number of good libraries it contains for bot development. I've got some tutorials on using a lesser known language called Crystal on my channel.

  • @replykh4642
    @replykh4642 4 роки тому +1

    Wow :o
    Keep it up
    perfect :D

  • @nichini8035
    @nichini8035 5 років тому +1

    I don't have enough coding skills to pull this off but it was a fun watch.

    • @JohnGFisher
      @JohnGFisher  5 років тому +1

      hey nichini thanks for watching man!

  • @mhcool52
    @mhcool52 5 років тому +1

    How to make a telegram bot which can auto post from channel to channel
    Pls Help!!!!

  • @bobbledog10
    @bobbledog10 4 роки тому +12

    what is the purpose of the ngrok server? why can't the app server communicate directly with the telegram server instead?

    • @terminalthor8800
      @terminalthor8800 4 роки тому +6

      same reason why you should buy domain from hosting services for your new site because it is hosted on your machine and noone including telegram server can`t communicate with it via publicly available address. Once you setup ngrok it exposes your localhost and generates publicly available link.

    • @sainathsingineedi2922
      @sainathsingineedi2922 4 роки тому +1

      @@terminalthor8800 thanks for explaining that

    • @YoungDev98
      @YoungDev98 3 роки тому

      hi, i made a tutorial. you can create your own bot without a domain or server. for beginners that will be the best! ua-cam.com/video/6xOuU_t3v1k/v-deo.html

  • @aymanimtyaz8529
    @aymanimtyaz8529 3 роки тому +1

    Hey! This video was great and really informative!
    I made quite a lot of headway into making my bot before stumbling onto this video. And from what I can understand, I've implemented the bot in quite a similar manner to yours. The only difference being I didn't use webhooks and used get requests with query string parameters to send and receive updates to telegram.
    Can you explain what webhooks are and if they have any advantages over my method?
    I didn't use any backend framework like Flask cause I don't know how to, if that matters.

  • @ScoutKnows
    @ScoutKnows 5 років тому +5

    thank you so much, still waiting for the instagram/upload, Thanks again

  • @XgameXish
    @XgameXish 4 роки тому +5

    Thanks dude! I managed to run the bot, but I want to put him in a group and whenever anyone texts I want him to get her and if he has it! I want the bot to take the person's name, how can I do that ?

    • @dorinbuzilov95
      @dorinbuzilov95 4 роки тому +2

      i would be interested in finding out how to do this also if anyone can help us

    • @XgameXish
      @XgameXish 4 роки тому +2

      @@dorinbuzilov95 Check my github, i made it github.com/DouSam/ but is in portuguese

    • @XgameXish
      @XgameXish 4 роки тому +3

      @@dorinbuzilov95 If you do not understand, leave a comment there that I answer you and I try to help you

    • @dorinbuzilov95
      @dorinbuzilov95 4 роки тому +1

      @@XgameXish Amazing and thank you, I will have a look now

  • @xlillyfulx
    @xlillyfulx 5 років тому +1

    Hey John! Do you think you have any tips/ideas on how to create a python code that uses data from running races to predict future race scores?

    • @JohnGFisher
      @JohnGFisher  5 років тому +1

      sure, depends on the size of your dataset, id start with linear regression, decision trees, and support vector machines, up to neural nets and see which gives you the best accuracy

  • @nadirherda7789
    @nadirherda7789 5 років тому +1

    I wanted to ask something about the computer science ... what can you do with it ? Which kind of work would you do ? Just a simple employee in a company ?

    • @udaykhalsa
      @udaykhalsa 5 років тому +1

      Develop a lot of things, the industry and the type of work you wanna do it vast. I love learning and doing things in Java but now that Python is taking over everything lately and it's mostly used for machine learning and AI. I'll have to start focusing on Python. You can do end number of things but you need to have a lot of knowledge for good income as there is serious competition too.

  • @v2rayz655
    @v2rayz655 5 років тому

    Amazing, short video for very fruitful info

  • @ameerali_
    @ameerali_ 4 роки тому +1

    How can i set a auto welcome message and group rules to new joining members to the group.
    I saw many videos in UA-cam with bots (which are created by others),
    Is there any simply way to set a welcome messages with group rules with a facebook link with OWN BOT

  • @ricowalters1526
    @ricowalters1526 5 років тому +1

    Hey couls you please make a revised version of the J.A.R.V.I.S tutorial with the latest python as its quite hard to follow. If you could that would be helpful af as im a total beginner to coding thanks

  • @volodymyr9400
    @volodymyr9400 4 роки тому +1

    did anybody add interactive buttons to the bot made such way? I want to add a button and if a user clicks on it it send to my server and then receive this value and run other methods

  • @whiteshadow7810
    @whiteshadow7810 5 років тому +2

    good job John ,But we need playlist of web hacking with python ; because you are very good instructor ; Please think about it ; And any one support my suggestion . like this comment and the main video , Thanks john

    • @JohnGFisher
      @JohnGFisher  5 років тому +2

      hey @white shadow thanks man more hacking related stuff coming soon

    • @whiteshadow7810
      @whiteshadow7810 5 років тому

      @@JohnGFisher I Wait You 'Pure man '

  • @Acharya_Slideshare
    @Acharya_Slideshare 4 роки тому +1

    Can you make a youtube videos downloader bot in telegram

  • @90-mattleung43
    @90-mattleung43 4 роки тому +2

    Thank you for the tutorial!
    In the ngrok terminal I keep getting "POST /webhook 404 Not Found" lines, so I removed "/webhook" from the config.py.
    It became "POST / 200 OK", but my Bot doesn't do anything...
    What may be the problem?

  • @hadireg
    @hadireg 4 роки тому

    great video, I'll probably need to watch and follow along with it more than once to get it! Thanks for sharing dude!👍❤

  • @_Kanad_Patil_TE_IT
    @_Kanad_Patil_TE_IT 4 роки тому +1

    how to make bot that sends TELEGRAM STICKERS as a reply ?

  • @ziac007
    @ziac007 4 роки тому +1

    How to setup telegram bot.? Source code from github

  • @cdwrs.1851
    @cdwrs.1851 5 років тому +2

    Best video! Bro Will you continue?

    • @JohnGFisher
      @JohnGFisher  5 років тому

      for sure, what do you think of the whole diagram thing lol

  • @user-rf2pz4is6z
    @user-rf2pz4is6z 5 років тому +1

    how do i import flask?
    i got error

  • @imrajsingh8983
    @imrajsingh8983 4 роки тому

    this video is amazing......at making me sleep!

  • @sailaunghein4705
    @sailaunghein4705 5 років тому

    You really make me to explore

  • @arielbene2013
    @arielbene2013 3 роки тому

    hey thanks for the video... i have a zip file of python files... uploader bot for telegram how do i convert it to actual bot?

  • @hassnaeelhammouni2172
    @hassnaeelhammouni2172 4 роки тому +1

    hello i want you to setup me a telegrame bot i have one in a vedio how much please i can pay you by paypal or sothing you want

  • @aurolivelylaundrytrainingc5779
    @aurolivelylaundrytrainingc5779 4 роки тому +1

    heroku can also be used right?

  • @ryan53521
    @ryan53521 5 років тому +1

    Good job! Could you do a video on making an Instagram bot with private mobile api wrapper? Features such as multithreading, proxy support, useragent/devices and cookies would be amazing. The bot itself can be very simple only login and check if account is valid.

    • @JohnGFisher
      @JohnGFisher  5 років тому

      hey ryan thanks man, ill probably do a few separate videos on things like proxy rotation and multithreading, i did an ig bot a few vids back but it doesn't wrap the actual api it automates the browser, you can definitely add things like proxy support and multithreading to that or are you looking for specifics on the ig api

    • @ryan53521
      @ryan53521 5 років тому

      @@JohnGFisher I'm super interested on anything python. Yea, i watched your last Ig vid and it was the best I've seen yet. However browser isn't as efficient as api requests which I mostly want to use. I'd love more videos on interacting with api's + multithreading. I was planning on making a bot using this: github.com/ping/instagram_private_api

    • @JohnGFisher
      @JohnGFisher  5 років тому

      @@ryan53521 yeah that looks dope, and sounds good ill definitely do some

  • @A4tech_Malayalam
    @A4tech_Malayalam 5 років тому +1

    How to make a url upload bot using Python ;
    make this video

  • @achuazharu1000
    @achuazharu1000 5 років тому +1

    How to made a rename bot..?

  • @Brasuasd
    @Brasuasd 4 роки тому +1

    Hi there! Question how do I set the host for the bot ? I would like to have it working 24/7 without using my pc as host

    • @JohnGFisher
      @JohnGFisher  4 роки тому +1

      check out pythonanywhere.com, you can host the bot there for free

    • @Brasuasd
      @Brasuasd 4 роки тому +1

      @@JohnGFisher ty!! btw nice tutorial :)

  • @agarwalakash002
    @agarwalakash002 5 років тому +1

    Thanks again and how are you bro..

    • @JohnGFisher
      @JohnGFisher  5 років тому +2

      doing good akash how you been bro

  • @hodaelcohen
    @hodaelcohen 4 роки тому

    from telegram_bot import TelegramBot
    how to install that library using pip?? what the command exactly?

    • @YoungDev98
      @YoungDev98 3 роки тому

      if you need simple bot without special telegram library hi, ua-cam.com/video/6xOuU_t3v1k/v-deo.html

  • @scenezone8238
    @scenezone8238 4 роки тому +1

    thats why many people got scammed for using telegram bot.

  • @ko7t0
    @ko7t0 4 роки тому +1

    Спасибо

  • @timelapse3478
    @timelapse3478 5 років тому +2

    Hi bro when I try to login in Instagram with request module in python it gives sslcertificate error any solution??

    • @JohnGFisher
      @JohnGFisher  5 років тому

      try this: requests.get('example.com', verify=False)
      should ignore ssl certificate errors

    • @timelapse3478
      @timelapse3478 5 років тому

      @@JohnGFisher thanks for reply 🙏🙏 I will try it

  • @soyrandom1
    @soyrandom1 5 років тому +1

    when i restart my bot ngrok session it reads all the messages from the chat again, so it start spamming the outputs for all the commands ever sended, how i can solve this?

    • @JohnGFisher
      @JohnGFisher  5 років тому +1

      hey soy, are you sending a 200 status code response to the telegram server? it will retry the message if it doesn't receive that, could be the issue

  • @unutentebello1304
    @unutentebello1304 5 років тому +1

    what the heck is this? Damn god i'm not english and that's very hard to understand.

  • @circuitmasters5258
    @circuitmasters5258 5 років тому +2

    John wassup dude...Where ya been?

    • @JohnGFisher
      @JohnGFisher  5 років тому

      yo circuit masters been chillin and studyin up bro how you been

    • @circuitmasters5258
      @circuitmasters5258 5 років тому

      @@JohnGFisher DUDE LEARNING PYTHON AND WORKING ON MY RESUME MAN..BEEN GETTING PHONE INTERVIEWS! NO JOB LANDED YET! FINGERS CROSSED THOUGH BRUH AND TOES!

    • @JohnGFisher
      @JohnGFisher  5 років тому

      @@circuitmasters5258 ayy good shit my dude keep it up

    • @circuitmasters5258
      @circuitmasters5258 5 років тому

      @@JohnGFisher MAN WE GOTTA GET A GIT REPO OR SOMETHING GOING...do a collaboration for a youtube comment bot or something like that....straight python...pure snake..lol...

  • @skillato9000
    @skillato9000 4 роки тому +1

    Hi, is there a way to post daily in a group, a random image from a set of images, with Python?
    Without the need of interaction?

    • @mapperid
      @mapperid 3 роки тому

      You could use task scheduler. You don't need flask. Just a simple scipt with a sendMessage command

  • @surafelkebede299
    @surafelkebede299 4 роки тому +1

    didn't help at all, good effort nonetheless . . .

  • @veedrey9974
    @veedrey9974 5 років тому

    hey man thx for sharing this but coding fucks me up and i dont have patience to get how it works im sending you a private msg i need ur help

  • @dalagzvideography1811
    @dalagzvideography1811 4 роки тому

    Please start to the beginning

  • @solvermelho9721
    @solvermelho9721 4 роки тому

    Getting this error, not sure how to solve it:
    .\app.py returns:
    Serving Flask app "app" (lazy loading)
    Environment: production
    WARNING: This is a development server. Do not use it in a production deployment.
    Use a production WSGI server instead.
    Debug mode: off
    127.0.0.1 - - [04/Aug/2020 12:21:43] "←[35m←[1mPOST /webhook HTTP/1.1←[0m" 500 -
    [2020-08-04 12:21:43,576] ERROR in app: Exception on /webhook [POST]
    Traceback (most recent call last):
    File "C:\Python38\lib\site-packages\flask\app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
    File "C:\Python38\lib\site-packages\flask\app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
    File "C:\Python38\lib\site-packages\flask\app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
    File "C:\Python38\lib\site-packages\flask_compat.py", line 39, in reraise
    raise value
    File "C:\Python38\lib\site-packages\flask\app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
    File "C:\Python38\lib\site-packages\flask\app.py", line 1936, in dispatch_request
    return self.view_functionsrule.endpoint
    File ".\app.py", line 13, in index
    bot.parse_webhook_data(req)
    File "C:\Users~\telegram-bot\telegram_bot.py", line 37, in parse_webhook_data
    self.last_name = message['from']['last_name']
    KeyError: 'last_name'

    • @solvermelho9721
      @solvermelho9721 4 роки тому

      Apparently the code wasn't detecting the last name attribute. I just transformed the parts where "last_name" was mentioned into comments with # and it worked!

  • @MAIVSHOW
    @MAIVSHOW 5 років тому

    John Connor from Terminator Three,, lol:ddd

  • @nicholashamilton40
    @nicholashamilton40 5 років тому

    Nice!

  • @titoz1494
    @titoz1494 5 років тому +1

    How can I contact with you?

  • @ayDTWO
    @ayDTWO 3 роки тому

    Looking for a telegram programmer to help build a bot that'll edit telegram message then forward to another group for proprietary reason. I am willing to pay for the service. Regards.

  • @miyangapak
    @miyangapak 5 років тому +1

    Scrip login modul telethon sir

  • @tech4028
    @tech4028 4 роки тому

    How do I deploy this?

  • @uh36
    @uh36 5 років тому +1

    hey john can I contact you via mail or smth? got some question if you have some spare time :)

    • @JohnGFisher
      @JohnGFisher  5 років тому

      hey anomaly sure john@codefreedom.io

  • @sachinm9921
    @sachinm9921 5 років тому +1

    Brother I want to contact with you ... You have telegram .. Please send me the ID

  • @mo_egyy
    @mo_egyy 3 роки тому

    Oh.. programming...

  • @ZekePolarisBSH
    @ZekePolarisBSH 4 роки тому

    How to download the file onto root bin? o.O

  • @ianmoshervlog2932
    @ianmoshervlog2932 4 роки тому

    Sir can i add you in messenger?

  • @YoungDev98
    @YoungDev98 3 роки тому

    hi, i made a tutorial. you can create your own bot without a domain or server. for beginners that will be the best!

  • @AKminus47
    @AKminus47 5 років тому

    Please help anyone

  • @harshitaagarwal314
    @harshitaagarwal314 4 роки тому

    its a great help for me,
    i need your little help in this because getting an unpredictable error which is
    File "config.py", line 8
    core.telegram.org/bots/setWebhook?url=b385fd6b.ngrok.io
    ^
    SyntaxError: invalid syntax
    can you please help me in this?
    it will be kind help for me

  • @abhinavraj1001
    @abhinavraj1001 5 років тому +1

    Bro.. I want to create a cricket live score telegram. Can you plz help

    • @JohnGFisher
      @JohnGFisher  5 років тому +2

      yeah you want to add a conditional statement in the TelegramBot.action method that will make a call to this api or one similar, then respond respond with the text www.cricapi.com/how-to-use.aspx

    • @abhinavraj1001
      @abhinavraj1001 5 років тому +1

      @@JohnGFisher 🙄 I dont get it.. sorry 😔

    • @timelapse3478
      @timelapse3478 5 років тому +1

      @@abhinavraj1001 hi bro before doing such large project do some small project which helps you to make such large and complicated project and increase you programing knowledge

    • @abhinavraj1001
      @abhinavraj1001 5 років тому +1

      @@timelapse3478 Ok bro.. I didn't know how big it was. I thought with some minor edits i could do this. Anyway Thanks for letting me know.. 🤗

    • @timelapse3478
      @timelapse3478 5 років тому

      @@abhinavraj1001 bro copying others good not seems good you need to code yourself I think it will also help to increase your programming skills hope you understand

  • @alexkill8837
    @alexkill8837 4 роки тому

    Olha eu achei muito top este soft deste cara aqui
    ua-cam.com/video/z6n-K8WeJGw/v-deo.html - 8EnTkO3Y3S