How To Create A Telegram Bot With Python

Поделиться
HTML-код
  • Опубликовано: 1 фев 2025

Комментарии • 479

  • @cloudietech5825
    @cloudietech5825 3 года назад +42

    Hey CS Dojo, you are an inspiration!! I started my youtube channel on programming and software engineering because of you and been finally growing! Thanks for all your great content and always keep making helpful videos!!
    btw, I'm also from the University of British Columbia :)

    • @CSDojo
      @CSDojo  3 года назад +7

      Thank you for your kind words!!

  • @sunilkulkarni4426
    @sunilkulkarni4426 3 года назад +79

    FINALLY A VIDEO FROM CS DOJO

  • @prasadbylapudi4755
    @prasadbylapudi4755 3 года назад +288

    Finally, You remembered you've RUclips channel 😂

  • @pain1737_6
    @pain1737_6 3 года назад +1

    I have seen many videos to make a telegram bot, I just got the information I need from your video, appreciate you man thanks a lot

  • @mohammedmhilal4129
    @mohammedmhilal4129 3 года назад +19

    That was fun. You should make a series out of this.

  • @ClaudioBOsorio
    @ClaudioBOsorio 3 года назад +1

    oh man i love python. 13 lines of code from which 3 are spaces and you got a functional bot LOL... Thanks for the video and the people behind the packages too obviously :)

  • @MohammedUsaid
    @MohammedUsaid 3 года назад +8

    Welcome back CS Dojo! Could you please do a Discord bot as well too?

  • @ShaneMarkusJohn
    @ShaneMarkusJohn 3 года назад +4

    13:54 love how quickly you caught yourself hahaha

  • @yosimadsu2189
    @yosimadsu2189 Год назад

    Wowowoww, from zero to understand in 5 minutes... Thanks 👍👍👍👍👍

  • @maiconreis9276
    @maiconreis9276 3 года назад

    The better video that I have ever seen in RUclips. Congrats on video.

  • @bhanu-06-07
    @bhanu-06-07 3 года назад +16

    Feeling first with 26 others.

  • @jaivardhanchauhan29
    @jaivardhanchauhan29 3 года назад +1

    You are the best programmer but plz show your talent every week

  • @shantanubindhani1622
    @shantanubindhani1622 3 года назад +20

    That moment when he said, " and of course coding's really fun, so your.... Commands really matter here"😂

    • @dhanushkgowda8570
      @dhanushkgowda8570 3 года назад

      thats what make this tutorial good, it shows coding is not always rainbows and sunshine xD

  • @goodtechdoor
    @goodtechdoor 3 года назад +1

    Thank you for introducing me to replit!

  • @nil9754
    @nil9754 3 года назад +24

    13:56 nice save

  • @jasgarcha4783
    @jasgarcha4783 3 года назад +3

    Long overdue video from CS Dojo More frequent I hope😂

  • @mohapeth748
    @mohapeth748 Год назад

    The GOAT Thanks you for this video ✨

  • @pawelpow
    @pawelpow 3 года назад +6

    Replit. It’s actually amazing, My school uses it and it was my first IDE that I learned to code on about a year ago

  • @ashkannoone1479
    @ashkannoone1479 3 года назад +2

    what a great work! I would appreciate it if You make a Video about a bot that Takes a string from a person who have pass code( with If loop) and post that string to other users that run another command!

  • @koroviev8897
    @koroviev8897 3 года назад +9

    That was a great tutorial! Thank you very much :D

  • @laviniaaparaschivei9264
    @laviniaaparaschivei9264 3 года назад +6

    Thanks for the tutorial! It was useful to me. I would love to see others like that.

  • @ryanisthewind
    @ryanisthewind 3 года назад +2

    wow, great tutorial.
    will it scale? I mean is it going to work with more users or we should deal with threads?

  • @nijoeli
    @nijoeli 3 года назад +7

    Keep the Telegram videos!! Please :) it was cool

  • @sipp5657
    @sipp5657 3 года назад +5

    he looking different in a good way though 🔥

  • @codigoaldea7925
    @codigoaldea7925 3 года назад

    nice video, looking forward to see more videos on bots.

  • @mdshahadatkabir8329
    @mdshahadatkabir8329 3 года назад

    After so long was waiting for ur video so long

  • @mokus603
    @mokus603 3 года назад +8

    "it's not tea, i'm not sentdex" what savage 😂

  • @arunrojas8942
    @arunrojas8942 3 года назад

    nice video , and which software you used to compress videos

  • @bhaskarthouti1482
    @bhaskarthouti1482 3 года назад

    This is really Awesome
    Quick thing, what software you have used to create this video? how we can show the coding screen and in bottom right your visible.

  • @rrahll
    @rrahll 3 года назад +2

    Cool! Thank you! Really useful tutorial!!!

  • @ajaysen7290
    @ajaysen7290 3 года назад +3

    Hi CS dojo,
    I love your videos on python oops concept. I am a python programmer and now I am learning java, could you please make a series tutorial on Java or Java OOPS concept.

  • @SanjayKumar-xn2xm
    @SanjayKumar-xn2xm 3 года назад +1

    finally you remember your youtube channel padsword

  • @mattgwyer4888
    @mattgwyer4888 3 года назад +7

    Replit has gotten rid of .env files and went to storing secret info on the environment to the 'secrets' tab. How do I run the API key into my program with this new change?
    thx

    • @leehanglow4439
      @leehanglow4439 3 года назад

      In the secret tab, the "key" will be the variable name and the value will be your API key.
      In main.py, the way to run will still be the same

    • @MrSatoV
      @MrSatoV 3 года назад

      @@leehanglow4439 I haven't tested yet, but when I create that secret and then use the "insert" button it says "my_secret = os.environ['API_KEY']". Do I just use code as is or use what replit inserts? (delete the insert)

  • @jeremiahope9173
    @jeremiahope9173 2 года назад +1

    Nice video
    I would like if a video for transportation bot is made for telegram with python.

  • @honeypatel14
    @honeypatel14 3 года назад

    Awesome video! I want to learn how to create a bot that sends you notifications every hour regarding stock price, weather, news or quotes.

  • @ADM_RAMconsumingfox
    @ADM_RAMconsumingfox 3 года назад

    Finally, the good tutorial out of everything out there how to make a bot. They all just make a bot not the code. I want to make gamebot, is there any tutorial?

  • @techtrader8434
    @techtrader8434 2 года назад

    "It's coffee not a tea, I'm not sentdex"😂😂

  • @zx3215
    @zx3215 3 года назад +4

    Thank you for the tutorial!
    Do I get it right - when the code is not running then the bot is not working? If i'm programming it off a local environment - does this mean I have to keep my laptop running 24/7 for the bot to work? How is it done in real life so the bot works all the time?

    • @meowmaple
      @meowmaple 2 года назад +1

      it is deployed to cloud platforms like AWS or Heroku, which will run ur code 24/7

    • @zx3215
      @zx3215 2 года назад

      @@meowmaple thank you! Now I have some idea where to look for more info.

  • @noushadkhan1647
    @noushadkhan1647 3 года назад +1

    Thanks for the video.
    We want more telegram, not related videos.

  • @saikos-k6s
    @saikos-k6s 3 года назад +4

    When I type .env for the new file it says 'you cannot create .env files anymore, checkout the environment variable sidebar' can you please tell me what to do

    • @hrishikeshbharati9419
      @hrishikeshbharati9419 3 года назад +5

      Just click on the lock icon on the left side of the screen, it is called Secrets (Environment variables), you can add name for your api key (let's say API_KEY) and then paste the actual key down there. In the next step, it also tells you how to get the key and store it in a variable(you can rename the variable however you wish). That's how you do it, .env files are not supported anymore.

    • @saikos-k6s
      @saikos-k6s 3 года назад +1

      @@hrishikeshbharati9419 oh thanks for explaining

  • @duhmi
    @duhmi 3 года назад +1

    Could you give us a toturial about creating bottons in telegram bot

  • @hanialadmaai5596
    @hanialadmaai5596 2 года назад +2

    Thank you for this great video. How can we format the text to include bold font and embedded links? Thank you again.

  • @DouweHummeling
    @DouweHummeling 3 года назад +2

    I'd love to see a video about a bot sending back photo's, gif's, etc.

  • @jamesj2869
    @jamesj2869 3 года назад +1

    Thanks for the tutorial, in case, is there any tutorial to set '+/-Post Messages' of a telegram bot in a channel?

  • @enlightmentnurturewithsusm9387
    @enlightmentnurturewithsusm9387 3 года назад +5

    unable to add .env file , showing env files are depricated

    • @leetcodemermaid9804
      @leetcodemermaid9804 2 года назад

      you can find it in the left bar with a lock icon and add your API_KEY and key there

    • @nnk0o
      @nnk0o 2 года назад

      @@leetcodemermaid9804
      thx bro

    • @nnk0o
      @nnk0o 2 года назад

      @@leetcodemermaid9804 4:51
      the code still?

  • @Welcome_to_real_life_
    @Welcome_to_real_life_ 3 года назад +3

    Instant Like!!!

  • @zeepranabesh911
    @zeepranabesh911 3 года назад +1

    I want to ask you an irrelevant question
    For app development
    What should I use
    java +android studio
    Swift +xcode
    react native

  • @keertilata20
    @keertilata20 3 года назад

    Cs dojo is back!!!

  • @pivotsclips8024
    @pivotsclips8024 3 года назад +5

    Thank you dojo from Sri Lanka 🇱🇰

  • @sanjaymehta5872
    @sanjaymehta5872 3 года назад +4

    This is really cool, thank you! How would one create a TG bot that would return data based on that user? Example billing information for a tenant or customer by linking their TG username/number. Thanks once again, keep safe!

    • @bo6344
      @bo6344 3 года назад +4

      AHAHAHAHHA Wow you clowns don't even TRY to hide your exploitive ways anymore!

    • @choicoinchovui
      @choicoinchovui 3 года назад

      @@bo6344 yeah since we living on an open source world protect your own stuff is somethings ppl should be doing rather than believe in the "protector" stuff

  • @termile510
    @termile510 3 года назад

    Looking good YK!

  • @kailashrajendran3580
    @kailashrajendran3580 3 года назад +3

    A huge thanks from INDIA🌟

  • @krishnanagpal807
    @krishnanagpal807 3 года назад

    Great Cs dojo , please a video on reddit bot and a chatbot

  • @marhi3762
    @marhi3762 3 года назад +1

    Welcome back

  • @29namankumar29
    @29namankumar29 3 года назад +8

    It's been a while YK!

  • @thetransferaccount4586
    @thetransferaccount4586 Год назад

    very straightforward

  • @aldrikshmo
    @aldrikshmo 3 года назад

    Thank you that was very useful 👌

  • @arladiesworld786
    @arladiesworld786 Год назад +1

    Bro I am using pyroid 3 to run my bot but it doesn't run. I just type 11strings since it shows no module found at string 31. What I can do?

  • @rupa8811
    @rupa8811 3 года назад

    hey I an rupa sanjana. iam learning artificial intelligence and datascience course right now! can you tell me weather it is use full or not and what should i learn to become a perfect person like you. please reply.......

  • @LearningwithLakshya
    @LearningwithLakshya 2 года назад +2

    Can you help with this please?
    Traceback (most recent call last):
    File "main.py", line 8, in
    @bot.message_handler(commands=['Greet'])
    AttributeError: 'TeleBot' object has no attribute 'message_handler'

    • @khalilbazgour8017
      @khalilbazgour8017 2 года назад +2

      Hi. I Got same error, did you manage to solve this?

    • @avakinmio9080
      @avakinmio9080 2 года назад

      @@khalilbazgour8017 Facing the same problem too. Did you manage to solve this.

  • @ghazal2977
    @ghazal2977 3 года назад +3

    Hello!
    Thanks for the tutorial.
    I get this error → "Exception: Bot token is not defined"
    would you please help me to fix it?

    • @N1O1032
      @N1O1032 3 года назад

      are u fixed this problem?

    • @ghazal2977
      @ghazal2977 3 года назад +1

      @@N1O1032 Hi! Yeah, apparently, "Token" is the API key that you get from botfather. The problem was with os.getenv() I guess. so I saved it directly as a variable (API_KEY=" whatever your API is")

    • @N1O1032
      @N1O1032 3 года назад +1

      @@ghazal2977 Thank you very much and good luck.

    • @kadurkaz4691
      @kadurkaz4691 3 года назад

      sir can i know the editor u have used in your video...

    • @CnmAlper
      @CnmAlper 2 года назад +1

      How to fix the error? I got same. Can you help me please?

  • @iAKHStudio
    @iAKHStudio 3 года назад

    So nice explain brother.

  • @mdjahangiralam1331
    @mdjahangiralam1331 3 года назад

    you should make a video on how teenagers can start learning coding.

  • @0xBerto
    @0xBerto 3 года назад

    13:57 telegram is a little Fuh--finicky hahah

  • @bijayghosh6128
    @bijayghosh6128 3 года назад +1

    I have done exactly as you doing, but in sublime text3, How to set the environment, for this code to work

  • @witzcode
    @witzcode 2 года назад

    Thanks for the helpful video. But I want to create Questions-Answer related Telegram Bot. Can you make another video for it? And, again thank you for this

  • @nelanitharanga311
    @nelanitharanga311 3 года назад

    Very useful video Thank You very much for this Video

  • @thedriper2983
    @thedriper2983 3 года назад +4

    Nice Job!

  • @jiakai
    @jiakai 2 года назад

    Thank you for your video.❤❤❤❤❤❤

  • @anandamahaputra
    @anandamahaputra 2 года назад

    Thaks Sir for your tutorial : ) !!!

  • @hmrajesh3
    @hmrajesh3 3 года назад +2

    Can you please make a part 2 of this ....🙂. Please include how to connect with Google spreed sheet data as well.
    Thank you

  • @roboplayerz5251
    @roboplayerz5251 2 года назад +1

    Hi! I tried to make a bot using your tutorial, i copy everything except the "API_KEY". But the website said "token is not defined" can you tell me how to fix this??

    • @bronxer8
      @bronxer8 2 года назад

      I have the same problem, i use vs code, how did you solve it?

    • @roboplayerz5251
      @roboplayerz5251 2 года назад +1

      @@bronxer8 idk i cant solve it so i just gave up ;)

    • @hanzo002
      @hanzo002 2 года назад +2

      They update the pyTelegrambotAPI 3.7.7 to version 4.4.0 thats why it will never work again.

  • @mdshahadatkabir8329
    @mdshahadatkabir8329 3 года назад

    Where r u sir? Can't see you for so long!

    • @CSDojo
      @CSDojo  3 года назад +1

      Uploading a new vid soon!

    • @mdshahadatkabir8329
      @mdshahadatkabir8329 3 года назад

      @@CSDojo okay sir please do upload at least once in week.or make blogs anything but prefers coding related

  • @ab-lx6ke
    @ab-lx6ke 3 года назад

    日本人なんですね!
    今高校留学の最後の年です。プログラミングは全くわかりませんがこれから頑張ります

  • @aa-mn5th
    @aa-mn5th 3 года назад +1

    the code stops working after a time. it says connection error and so on even if i start it on replit always on. How can i fix that?

  • @DarkAngel-ti6ti
    @DarkAngel-ti6ti 3 года назад +6

    7:07 i keep getting an error whenever i run the code, i copyed exactly what you did, step by step and still got the error, its something to do with the bot.polling() line, its about 30 lines of error, pls help

  • @אורשני-ח4ד
    @אורשני-ח4ד 3 года назад +2

    Hey Thanks for the video , i have problem with the method bot.polling my terminal is mad
    i would love some help , Thanks for helpers

  • @kryptoabi
    @kryptoabi 2 года назад +1

    AttributeError: 'TeleBot' object has no attribute 'message_handler' although I install telebot or pytelegrambotapi

  • @defnotbot4314
    @defnotbot4314 3 года назад

    lets go replit!

  • @INDOGFX
    @INDOGFX 3 года назад +2

    i can't create the .env file in repl it...

  • @anhnguyetnguyen8611
    @anhnguyetnguyen8611 3 года назад +1

    I not create file .env why? it say " you cannot create .env files anymore, checkout the environment variable sidebar"

    • @CSDojo
      @CSDojo  3 года назад +2

      Right, the process changed recently there. You can find the "environment variable" button in the left side bar instead

    • @anhnguyetnguyen8611
      @anhnguyetnguyen8611 3 года назад +1

      @@CSDojo thank bro :))

    • @amaljazzam2127
      @amaljazzam2127 3 года назад

      @@CSDojo what is the (key) & (value)

  • @ouailnadzi832
    @ouailnadzi832 3 года назад

    Hello can you explain to us if we can creat python code that can help to do technical analytics and fundamental analytics to get decision of selling or buying in stocks market or forex market

  • @joshitoshi9835
    @joshitoshi9835 3 года назад

    Nice info. please create a series of videos how to convert python script to tg bot, like i have a python script which does rename files on google drive, so how to convert it to tg bot? Also another script which does ffmpeg on gdrive files

  • @reproog3003
    @reproog3003 3 года назад

    Hey, can you make a video about the ReplyKeyboardMarkup. (How to use the function, how to process the requests from it etc.)

  • @TheJmrmx
    @TheJmrmx 3 года назад

    Nice video, what about to catch messages from another bot in a channel, does it work? I have tried but is not working

  • @umamaheshbhasuru
    @umamaheshbhasuru 3 года назад +1

    Good yk really superb

  • @8followsonik
    @8followsonik 3 года назад +1

    It's fine to see, but how to create a telegram bot with Python w/o any libraries?

  • @MohitKumar-nx2um
    @MohitKumar-nx2um 3 года назад

    Make a video on your gadgets . Please suggest some usful gadgets.....love from india

  • @coinmaster8
    @coinmaster8 2 года назад +2

    Can't create .env for some reasons.. anyone had the same issue?

  • @wilmenls
    @wilmenls 3 года назад

    great tutorial, thank you very much

  • @utopiacringe
    @utopiacringe 3 года назад +2

    when i try to run it locally it says Bot token is not defined

    • @quiupu07
      @quiupu07 3 года назад

      left at the sidebar there is a "lock". There you can put the API_KEY.

    • @CnmAlper
      @CnmAlper 2 года назад

      How to solve the problem? I got same.

  • @2perspektiva
    @2perspektiva 3 года назад

    So, how to send alert? (that you have mention at beginning)

  • @PIVOT112
    @PIVOT112 3 года назад +2

    Thank you dojo...

  • @Captstonebookkeepingservices
    @Captstonebookkeepingservices Год назад +1

    Anyone else have the issue of trying to create the .env file and it doesn’t work?

    • @Elvis.D99
      @Elvis.D99 Год назад

      exactly. did you fix that issue?

  • @kirillous
    @kirillous 2 года назад +2

    My bot only works when I run the code, does anyone know how to make it work constanly?

  • @gamer99163
    @gamer99163 2 года назад +1

    Hello, please help me, how can I save a user input and then outputs it later on

  • @shusol.o
    @shusol.o 3 года назад +1

    Hey can you make a tutorial on making a telegram game bot? I'm trying to do one bit I don't know how to make coding for custom choices like players' names and everything else

  • @vazin.
    @vazin. 3 года назад

    guys awesome.

  • @Ivan-ip4ze
    @Ivan-ip4ze 3 года назад

    I have a problem with the Bot. Telegram does not create anything, but it says it does. What I mean is the chatbot has been created, or at least this is what it states, but I can't find it the same way Jacob is doing it.

  • @themobilegamer7333
    @themobilegamer7333 3 года назад +1

    Its was showing error when we use .env