So basically the file is on the desktop/pythonBot folder, but the cmd cant open it up? The code I type in is python bot.py
. I followed this dude’s guide here:
https://www.smartspate.com/how-to-create-a-telegram-bot-with-ai-in-30-lines-of-code-in-python/
(Sorry I am just a senior high student with no coding background)
Question posted in Telegram API
A comprehensive official documentation can be found here.
A comprehensive official documentation can be found here.
2
Answers
It looks like you are not in the correct directory, us
cd
to navigate todesktop/pythonBot
or alternatively, use the full path when running the file.From screenshot i guessed you have .py in another directory.
cmd is searching for “bot.py” file in C:Userss9800 directory.From error i can guess your bot.py file is in another direcotry.Provide full of .py file
1st way :open cmd,drag and drop .py file to cmd and press enter
2nd way:Go to directory where your .py file is.Wrtie “cmd” in address bar ,it will open cmd ,type file name and press enter.