Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sxzz/twitter-bot


https://github.com/sxzz/twitter-bot

Last synced: about 2 months ago
JSON representation

Awesome Lists containing this project

README

        

# Twitter Bot for Telegram

## Local Development

1. Create a bot with [@BotFather](https://t.me/BotFather), and get the bot token.
2. Clone this repo.
3. Run `pnpm install` to install dependencies.
4. Copy `.env.example` to `.env`, and fill in the `BOT_TOKEN` and `SECRET_HASH` in `.env`.
5. Run `pnpm dev` to start the development server.
6. Expose your local server to the internet with [Local Port Forwarding of VSCode](https://code.visualstudio.com/docs/editor/port-forwarding) (**set Port Visibility to Public**) or [ngrok](https://ngrok.com/).
7. Visit https://your-domain.com/telegram-hook?setWebhook=true
8. Send `/start` to your bot.

## Deployment

1. Deploy on [Vercel](https://vercel.com), [Netlify](https://netlify.com) or [others](https://nitro.unjs.io/deploy), with `BOT_TOKEN` and `SECRET_HASH` environment variables.
2. Visit https://your-domain.com/telegram-hook?setWebhook=true
3. Send `/start` to your bot.

## Sponsors





## License

[MIT](./LICENSE) License © 2024 [三咲智子 Kevin Deng](https://github.com/sxzz)