How To Create A Telegram Bot With Python

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

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

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

    Finally, You remembered you've RUclips channel 😂

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

    FINALLY A VIDEO FROM CS DOJO

  • @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!!

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

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

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

    13:54 love how quickly you caught yourself hahaha

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

    Feeling first with 26 others.

  • @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

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

    13:56 nice save

  • @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 :)

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

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

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

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

  • @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)

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

    Thank you for introducing me to replit!

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

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

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

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

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

    After so long was waiting for ur video so long

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

    The GOAT Thanks you for this video ✨

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

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

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

    Long overdue video from CS Dojo More frequent I hope😂

  • @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?

  • @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

  • @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

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

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

  • @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.

  • @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?

  • @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

  • @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.

  • @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!

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

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

  • @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?

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

    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

  • @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

  • @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?

  • @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

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

    nice video , and which software you used to compress videos

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

    he looking different in a good way though 🔥

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

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

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

    Cool! Thank you! Really useful tutorial!!!

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

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

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

    Instant Like!!!

  • @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.......

  • @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.

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

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

  • @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 2 года назад

      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?

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

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

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

    Welcome back

  • @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.

  • @אורשני-ח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

  • @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?

  • @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

  • @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.

  • @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?

  • @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)

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

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

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

    Cs dojo is back!!!

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

    A huge thanks from INDIA🌟

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

    Looking good YK!

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

    Nice Job!

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

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

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

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

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

    soooo, do I have to create "a new channel" for a bot, or can a bot be added to existing channel? cause I don't see how to find an API key for existing channel ...
    okay, figured it out. once you create the bot, open it, and click on ellipsis and select "add to group". this will not offer regular channels, but will offer you chat groups so you can add bots to those

  • @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.

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

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

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

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

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

    Thank you so much for the video I try to follow it but as per 15 OCt 2022 the for PyTelegramBot API is at 4.7.0 and also we can not create .ENV files as the earlier part of ur video suggest. There is a new Secret function Tab on the Right. Can you please share with us an update? thank you so much

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

    How difficult is it to create a bot that looks at the content of a message? Copies a part from it? And adds a command to the line and the send that?

  • @bladewinnie5491
    @bladewinnie5491 9 месяцев назад

    Is it possible to send messages without message handlers? I want to send scheduled messages automatically but I cant seem to find answer online :/

  • @Deepak-jv2ql
    @Deepak-jv2ql 3 года назад

    Are the professional certicates from google, IBM are accepted for visa instead of a CS degree? For software engineer job

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

    Am unable to get past "ModuleNotFoundError: No module named 'OS'" error. I appreciate help in solving this. Tried different ways to find solution but getting results stating OS module is built in already. Requesting Help.

  • @АракелянАрман
    @АракелянАрман 3 года назад

    can't quite figure it out...why wouldn't you use a regular hosting instead of replit?

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

    Any idea how to monitor price of a certain stock or coin by tg bot or discord ?
    I want to extract data directly from the exchange

  • @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.

  • @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 2 года назад

      @@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

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

    Very useful video Thank You very much for this Video

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

    What is someone enters some command which the bot can't understand, how to print the "Sorry I can't understand you message"

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

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

  • @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

  • @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.

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

    its nice tutorial but im havin problem at bot.message_handler. can u help ?

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

    Could you please share how can we read incoming messages of more then one channels continuosly In which I'm just joined as a member. ?

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

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

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

    finally you remember your youtube channel padsword

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

    It's been a while YK!

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

    lets go replit!

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

    Thank you dojo from Sri Lanka 🇱🇰

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

    Good yk really superb

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

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

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

    How to add two or more bots to the same group ?? I mean , I tried adding it. Both the bots got added the group , but both were unresponsive to the group messages. Whereas they worked fine when there was only one bot in the group

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

    thank you for vide. How to keep running my bot every time? When i stop it in Replit, then it does not work.

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

    I'd like the bot send me a message whenever there's a new post of some forum.
    What's the right way to set it up without passing a command to the bot?

  • @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

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

    How do i go about doing this if i want a command to be trigerred by a message sent in another channel? can I add the bot to channel and take those messages as command?

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

    i know the roadmap for web development
    app development (android/ios)
    but what is the roadmap for desktop app/software deveelopment?
    ?
    ?
    ?

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

    Thank you that was very useful 👌

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

    Sir,any bot tele record who invited member to the group? How many member they already invited have recorded on bot

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

    Hi....Bro
    How to Create a New Bot for ( URL link bot )
    Please 🙏🙏🙏🙏 explain

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

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

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

    Hey, hello there! Is there any way you could give me some advice? I`m trying to make a tipping bot for a BSC contract Token. Many thanks in advance!

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

    very straightforward