tele-go-m

command module
v0.0.0-...-d4cd08d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 8, 2021 License: MIT Imports: 10 Imported by: 0

README

tele-go-m

telegram bot in go (using webhook)

Beginner's guide for telegram bot

How to make the best use of tele-go-m

We have added the basic backend code to run your bot, you can clone this repo and use it as you'r own

git clone https://github.com/Co-Science/tele-go-m.git
cd tele-go-m

But before you begin create a .env file to the root directory and add your bot api key for testing:

TOKEN=<add your_bot_token here>

Now run the code:

go run main.go
  • The program now listens on port 3000 for some request.

  • Make use of ngrok to test your bot locally.

ngrok http 3000
  • Now set your bots webhook to that url
https://api.telegram.org/bot<your_bot_token>/setWebhook?url=<your_https_url_ngrok_provides>

| this is essentially connecting your bot with the telegram server

Congratss Your bot is now ready to chat with you(locally). Just type telegom or any letter in it and see the bot reply.

Fork, Edit and Deploy it in heroku or with any cloud provider to use the bot.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL