Ask coding questions

← Back to all posts
set webhook
AnbiaBarekzay

how can set webhook for my py files in replit?
I'm beginner thanks in advance

Voters
AnbiaBarekzay
Comments
hotnewtop
MrVoo

You probably don't want a public token.... use environment variables with the secrets tab

Glitchez

Hey, doing a quick scroll through your code, it is not very beginner friendly. I see 2 options here, either you are not a beginner or you copied the code from somewhere. The second option seems more likely. My suggestion to you is first familiarize yourself with python and creating bots, and secondly start by making a discord bot, as they are more popular and have better documentation on them so it would be easier for you. Once you get the hang of it, come back to this. Also please next time you post, have it all in English because you clearly can't expect everyone to read Arabic.

AnbiaBarekzay

Thanks for you reply. yes Im a beginner and I just copied this code i can run this code on my pc via ngrok app my bot is working but i cannot run it on replit @Glitchez

AnbiaBarekzay

And im very eager to learn coding but unfortunately in my country there isnt any institute or any organization to teach me. how i can start is there any video for beginners in youtube i found some videos but they are for high level and i cant understant @Glitchez

Glitchez

@AnbiaBarekzay glad to hear that you are eager to learn. Nowadays most people learn programming online, not from in person institutes. There are a measurable amount of tutorials for programming languages especially Python since it is very popular. Heck, even replit has a bunch:
https://replit.com/talk/learn?q=python
here is another great resource that I myself used:
https://www.w3schools.com/python/
and here is a quick telegram bot tutorial I found:
https://www.freecodecamp.org/news/learn-to-build-your-first-bot-in-telegram-with-python-4c99526765e4/

Just out of curiosity where are you? Judging from the arabic in the text you are somewhere in the middle east, but I know for a fact that in that area programming is very respected, unless you are a female in some of the more restrictive countries. I would know since I am from that area. Also Replit is probably not the best lace to run your bot since it is an online IDE and is not connected locally to your computer

AnbiaBarekzay

@Glitchez Thanks bro! for your suggestion. unfortunately I'm from Afghanistan the worse country for learning . I have loved learning programming since I was younger but there was no internet in our country. I started learning again when the Internet spread all over the world and provided the conditions for learning.

Glitchez

@AnbiaBarekzay oh man that sucks. we are all 🙏 for your country. But like I said, it is better to run this program, on your computer, not on replit. And it would be better to follow a tutorial not just copying and pasting

AnbiaBarekzay

@Glitchez Thanks bro! I will definitely do it.

AnbiaBarekzay

@Glitchez I just run it on replit and I'm very happy thank you bro!