No video

How To Create A Telegram Bot With Python

Learn how to make a Telegram bot with Python - a guest video by Jacob from ClarityCoders.
Check out my Twitter for more content: / ykdojo
Also check out Jacob's channel for more Python vids: / claritycoders
And here's the code he showed in this video: replit.com/@Ja...
On Replit, you can get 2 months of free hacker plan with this code: csdojo2 (claim it at replit.com/claim)

Пікірлер: 478

  • @prasadbylapudi4755
    @prasadbylapudi47553 жыл бұрын

    Finally, You remembered you've KZread channel 😂

  • @ritikkaushik2469

    @ritikkaushik2469

    3 жыл бұрын

    with 1M subscribers 😂

  • @Ztenos

    @Ztenos

    3 жыл бұрын

    YOU'VE

  • @zombiekiller7101

    @zombiekiller7101

    3 жыл бұрын

    I can't like this comment bcoz it has 69 likes

  • @mTrader1

    @mTrader1

    3 жыл бұрын

    Lol

  • @RahulSharma-wz6yv

    @RahulSharma-wz6yv

    3 жыл бұрын

    exactly ❤️

  • @cloudietech5825
    @cloudietech58253 жыл бұрын

    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 жыл бұрын

    Thank you for your kind words!!

  • @nil9754
    @nil97543 жыл бұрын

    13:56 nice save

  • @sunilkulkarni4426
    @sunilkulkarni44263 жыл бұрын

    FINALLY A VIDEO FROM CS DOJO

  • @oleghwang0512

    @oleghwang0512

    3 жыл бұрын

    But not personally )

  • @erickvidbaz3086

    @erickvidbaz3086

    3 жыл бұрын

    not really...

  • @ShaneMarkusJohn
    @ShaneMarkusJohn2 жыл бұрын

    13:54 love how quickly you caught yourself hahaha

  • @m0t1vAtEd
    @m0t1vAtEd3 жыл бұрын

    Feeling first with 26 others.

  • @MohammedUsaid
    @MohammedUsaid3 жыл бұрын

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

  • @ClarityCoders

    @ClarityCoders

    3 жыл бұрын

    Good idea.

  • @mohammedmhilal4129
    @mohammedmhilal41293 жыл бұрын

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

  • @pain1737_6
    @pain1737_62 жыл бұрын

    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

  • @themobilegamer7333
    @themobilegamer73332 жыл бұрын

    Its was showing error when we use .env

  • @enlightmentnurturewithsusm9387
    @enlightmentnurturewithsusm93872 жыл бұрын

    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?

  • @Captstonebookkeepingservices
    @Captstonebookkeepingservices Жыл бұрын

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

  • @Elvis.D99

    @Elvis.D99

    9 ай бұрын

    exactly. did you fix that issue?

  • @shantanubindhani1622
    @shantanubindhani16223 жыл бұрын

    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

  • @ClaudioBOsorio
    @ClaudioBOsorio2 жыл бұрын

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

  • @arladiesworld786
    @arladiesworld786 Жыл бұрын

    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?

  • @INDOGFX
    @INDOGFX2 жыл бұрын

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

  • @mattgwyer4888
    @mattgwyer48883 жыл бұрын

    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)

  • @duhmi
    @duhmi2 жыл бұрын

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

  • @yosimadsu2189
    @yosimadsu2189 Жыл бұрын

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

  • @LearningwithLakshya
    @LearningwithLakshya2 жыл бұрын

    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 жыл бұрын

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

  • @avakinmio9080

    @avakinmio9080

    Жыл бұрын

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

  • @zeepranabesh911
    @zeepranabesh9113 жыл бұрын

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

  • @ashkannoone1479
    @ashkannoone14793 жыл бұрын

    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!

  • @sciencekafunda305
    @sciencekafunda3053 жыл бұрын

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

  • @jasgarcha4783
    @jasgarcha47833 жыл бұрын

    Long overdue video from CS Dojo More frequent I hope😂

  • @user-ow9sc4tv2r
    @user-ow9sc4tv2r3 жыл бұрын

    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 жыл бұрын

    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.

  • @user-ow9sc4tv2r

    @user-ow9sc4tv2r

    3 жыл бұрын

    @@hrishikeshbharati9419 oh thanks for explaining

  • @nijoeli
    @nijoeli3 жыл бұрын

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

  • @muhriz5955
    @muhriz59552 жыл бұрын

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

  • @ryanisthewind
    @ryanisthewind3 жыл бұрын

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

  • @nahundabekele1635
    @nahundabekele1635 Жыл бұрын

    how can I create a autoview bot? please replay

  • @zx3215
    @zx32152 жыл бұрын

    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 жыл бұрын

    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.

  • @jeremiahope9173
    @jeremiahope91732 жыл бұрын

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

  • @maiconreis9276
    @maiconreis92763 жыл бұрын

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

  • @pawelpow
    @pawelpow3 жыл бұрын

    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

  • @c3vids_shorts

    @c3vids_shorts

    3 жыл бұрын

    I agree, I use it to check my codes quickly 👍

  • @diablolaggo870

    @diablolaggo870

    3 жыл бұрын

    Hell yeahh!!

  • @kirillous
    @kirillous2 жыл бұрын

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

  • @coinmaster8
    @coinmaster8 Жыл бұрын

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

  • @severinsepp6520

    @severinsepp6520

    Жыл бұрын

    forum.freecodecamp.org/t/replit-create-a-env-file-changed/456125

  • @jitendrakulkarni2764

    @jitendrakulkarni2764

    Жыл бұрын

    Me

  • @jitendrakulkarni2764

    @jitendrakulkarni2764

    Жыл бұрын

    They moved the .env file to secrets where you can create your environment

  • @koroviev8897
    @koroviev88972 жыл бұрын

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

  • @sipp5657
    @sipp56573 жыл бұрын

    he looking different in a good way though 🔥

  • @ajaysen7290
    @ajaysen72903 жыл бұрын

    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.

  • @jordanakanbi8060

    @jordanakanbi8060

    2 жыл бұрын

    How can I contact you ?

  • @aa-mn5th
    @aa-mn5th3 жыл бұрын

    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
    @bijayghosh61283 жыл бұрын

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

  • @mdshahadatkabir8329
    @mdshahadatkabir83293 жыл бұрын

    After so long was waiting for ur video so long

  • @goodtechdoor
    @goodtechdoor3 жыл бұрын

    Thank you for introducing me to replit!

  • @laviniaaparaschivei9264
    @laviniaaparaschivei92643 жыл бұрын

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

  • @bhaskarthouti1482
    @bhaskarthouti14823 жыл бұрын

    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.

  • @hanialadmaai5596
    @hanialadmaai5596 Жыл бұрын

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

  • @roboplayerz5251
    @roboplayerz52512 жыл бұрын

    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 жыл бұрын

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

  • @hanzo002

    @hanzo002

    2 жыл бұрын

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

  • @anhnguyetnguyen8611
    @anhnguyetnguyen86113 жыл бұрын

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

  • @CSDojo

    @CSDojo

    3 жыл бұрын

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

  • @anhnguyetnguyen8611

    @anhnguyetnguyen8611

    3 жыл бұрын

    @@CSDojo thank bro :))

  • @amaljazzam2127

    @amaljazzam2127

    3 жыл бұрын

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

  • @eitanbil
    @eitanbil Жыл бұрын

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

  • @intointro4291

    @intointro4291

    Жыл бұрын

    Right

  • @user-ql2zw3bg1l
    @user-ql2zw3bg1l3 жыл бұрын

    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

  • @gamer99163
    @gamer991632 жыл бұрын

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

  • @DouweHummeling
    @DouweHummeling3 жыл бұрын

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

  • @rupa8811
    @rupa88113 жыл бұрын

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

  • @kryptoabi
    @kryptoabi Жыл бұрын

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

  • @mokus603
    @mokus6033 жыл бұрын

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

  • @ClarityCoders

    @ClarityCoders

    3 жыл бұрын

    but I wish I was 😢😉

  • @techtrader8434
    @techtrader84342 жыл бұрын

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

  • @jamesj2869
    @jamesj28692 жыл бұрын

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

  • @bladewinnie5491
    @bladewinnie54914 ай бұрын

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

  • @tikka6554
    @tikka6554 Жыл бұрын

    Why i can't create .env file?

  • @ADM_RAMconsumingfox
    @ADM_RAMconsumingfox2 жыл бұрын

    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?

  • @ghazal2977
    @ghazal29773 жыл бұрын

    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 жыл бұрын

    @@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 жыл бұрын

    @@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 жыл бұрын

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

  • @arunrojas8942
    @arunrojas89423 жыл бұрын

    nice video , and which software you used to compress videos

  • @sanjaymehta5872
    @sanjaymehta58723 жыл бұрын

    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 жыл бұрын

    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

  • @honeypatel14
    @honeypatel143 жыл бұрын

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

  • @hierkonnteihrewerbungstehe8008
    @hierkonnteihrewerbungstehe80082 жыл бұрын

    How can i read a message and save the text in a string?

  • @ouailnadzi832
    @ouailnadzi8323 жыл бұрын

    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

  • @prasanthraj2483
    @prasanthraj24833 жыл бұрын

    what are the purpose of telegram bot because i don't know

  • @prasanthraj2483

    @prasanthraj2483

    3 жыл бұрын

    why we create telegram bot

  • @hmrajesh3
    @hmrajesh33 жыл бұрын

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

  • @codigoaldea7925
    @codigoaldea79253 жыл бұрын

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

  • @8followsonik
    @8followsonik3 жыл бұрын

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

  • @omgtoinie
    @omgtoinie2 жыл бұрын

    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?

  • @Deepak-jv2ql
    @Deepak-jv2ql3 жыл бұрын

    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.

  • @0xBerto
    @0xBerto3 жыл бұрын

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

  • @rrahll
    @rrahll3 жыл бұрын

    Cool! Thank you! Really useful tutorial!!!

  • @user-nv2ff6fg2u
    @user-nv2ff6fg2u3 жыл бұрын

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

  • @dwaipayanbandyopadhyay6110
    @dwaipayanbandyopadhyay61103 жыл бұрын

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

  • @noushadkhan1647
    @noushadkhan16473 жыл бұрын

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

  • @albertluna1001
    @albertluna10013 жыл бұрын

    Hey can someone send me the documentation of this API please. Thanks!!

  • @midray6212
    @midray62123 жыл бұрын

    My python keywords are uppercase Not found when typing lowercase letters in Telegram Bot How to type lowercase letters in Telegram Bot to find it Case-insensitive search

  • @saurabh-singh
    @saurabh-singh3 жыл бұрын

    Have you stopped ageing??

  • @jatin0094

    @jatin0094

    3 жыл бұрын

    He knows it's algorithm

  • @SanjayKumar-xn2xm
    @SanjayKumar-xn2xm3 жыл бұрын

    finally you remember your youtube channel padsword

  • @mikethegamedev

    @mikethegamedev

    3 жыл бұрын

    Hahahhaha pad sword

  • @Shivashankar-kc6lg
    @Shivashankar-kc6lg2 жыл бұрын

    hello how to build a python code to check whether a username is valid or not in telegram

  • @anubhavrdasgupta447
    @anubhavrdasgupta4472 жыл бұрын

    How to make a telegram bot find the nearby places by sending the user's live location? Could you please help me.

  • @Scooploop1
    @Scooploop12 жыл бұрын

    i cannot figure out how to use the new "secrets" and it is very annoying

  • @otsov

    @otsov

    2 жыл бұрын

    sameeee

  • @someoneattack3626
    @someoneattack36263 жыл бұрын

    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

  • @rintoantony5449
    @rintoantony54492 жыл бұрын

    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
    @harshraj69663 жыл бұрын

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

  • @nb1587
    @nb15872 жыл бұрын

    Error 404 while accessing api method on telegram bot I have this error and I need help

  • @shusol.o
    @shusol.o3 жыл бұрын

    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

  • @witzcode
    @witzcode Жыл бұрын

    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

  • @utopiacringe
    @utopiacringe3 жыл бұрын

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

  • @quiupu07

    @quiupu07

    2 жыл бұрын

    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.

  • @txmthn
    @txmthn2 жыл бұрын

    Traceback (most recent call last): File "main.py", line 5, in bot = telebot.Telebot(API_KEY) AttributeError: module 'telebot' has no attribute 'Telebot'  KeyboardInterrupt  KeyboardInterrupt 

  • @morganwiggins1168

    @morganwiggins1168

    2 жыл бұрын

    TeleBot not Telebot

  • @terminalcreeds443
    @terminalcreeds4433 жыл бұрын

    how would i create a button in the bot and assign the button to some sort of function?

  • @mimosveta
    @mimosveta3 жыл бұрын

    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

  • @victorudofia549
    @victorudofia549 Жыл бұрын

    I cant find my App api. Id, all those space are empty.. why ??

  • @Ilhannemree.
    @Ilhannemree.2 жыл бұрын

    I want to ask the user to enter 3 data and take this data and use it as a parameter in functions, but I have no idea how to do it. Are there any resources that can help?

  • @Kaenjin24
    @Kaenjin243 жыл бұрын

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

  • @girlscoutfather6766
    @girlscoutfather67663 жыл бұрын

    “How to import modules. And use them.”

  • @nageshwarjadhav
    @nageshwarjadhav3 жыл бұрын

    how you link your python code with telegram, how telegram know which python code to call

  • @rezato73
    @rezato732 жыл бұрын

    How to make a menu in the Telegram bot: add a multi-option menu to the bot and send it to the user in response to pressing each of the buttons in this menu.