Files
solana-agent-kit/examples/tg-bot-starter
2024-12-31 12:02:55 +09:00
..
2024-12-28 13:53:48 +05:30
2024-12-30 14:37:47 +05:30
2024-12-28 13:53:48 +05:30
2024-12-28 13:53:48 +05:30
2024-12-28 13:53:48 +05:30
2024-12-28 13:53:48 +05:30
2024-12-28 13:53:48 +05:30
2024-12-28 13:53:48 +05:30
2024-12-31 12:02:55 +09:00
2024-12-28 13:53:48 +05:30
2024-12-28 13:53:48 +05:30

Telegram Bot Starter with Solana Agent Kit

This example showcases how we can make a telegram bot with the Solana Agent Kit by Send AI.

Quick Deploy

Deploy with Vercel

How to get the telegram bot token

You can check here how you can obtain a bot token for your telegram bot.

How to setup the project

  • Set env variables
  • Run pnpm install
  • Run pnpm run dev
  • Run ngrok http 3000
  • With the URL you got from ngrok, where your bot is hosted at https://yourUrl.app/api/bot
  • Set the webhook by using this command curl https://api.telegram.org/bot<telegram_bot_token>/setWebhook?url=https://<your-deployment-url>.app/api/bot or simply clicking on that link.
  • You can host it on Vercel too as we have used NextJs in this.
  • Once the URL is set successfully, you will see this {"ok":true,"result":true,"description":"Webhook was set"}

Done!!! Congratulations you just hosted Solana Agent Kit on a Telegram bot.