Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lekoowo/short-link-bot
A telegram short link bot hosting onCloudflare Workers powered by short.io
https://github.com/lekoowo/short-link-bot
Last synced: 25 days ago
JSON representation
A telegram short link bot hosting onCloudflare Workers powered by short.io
- Host: GitHub
- URL: https://github.com/lekoowo/short-link-bot
- Owner: lekoOwO
- License: mit
- Created: 2021-06-03T12:59:05.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-06-26T09:08:58.000Z (over 2 years ago)
- Last Synced: 2024-11-08T00:37:11.215Z (2 months ago)
- Language: JavaScript
- Size: 79.1 KB
- Stars: 3
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# short-link-bot
A telegram short link bot hosting on [Cloudflare Workers](https://workers.cloudflare.com/) powered by [short.io](https://short.io).
## Usage
| Variable | Description |
|------------------|---------------------------------------------------------------|
| BOT_TOKEN | Telegram bot token |
| DOMAIN | Your short.io domain |
| SHORT_IO_API_KEY | Your short.io PUBLIC key |
| WEBHOOK | Your webhook secure path, using a random UUID is recommended. |Please install [wrangler](https://developers.cloudflare.com/workers/cli-wrangler) first.
```shell
git clone https://github.com/lekoOwO/short-link-bot
cd short-link-bot
wrangler init# Append `webpack_config = "webpack.config.js"` to wrangler.toml here.
wrangler secret put BOT_TOKEN
wrangler secret put DOMAIN
wrangler secret put SHORT_IO_API_KEY
wrangler secret put WEBHOOK
wrangler publish
```And then set your bot's webhook url to `{YOUR_WORKER_URL}/{WEBHOOK}`.
Ta-da!
Note: `wrangler secret put` will prompt the secret value, thus DO NOT replace variable names with the secret value in the previous command.
## Special Thanks
[神代綺凛](https://github.com/Tsuk1ko) for https://github.com/Tsuk1ko/cfworker-middware-telegraf
[telegraf.js](https://telegraf.js.org/) (BTW, the document sucks)