Cloudworker(Cloudflare) bot that forwards messages from the Discord channel to the Telegram channel
- Install node_modules
npm i
- Configure
.dev.vars
DISCORD_API_TOKEN = ''
DISCORD_CHAT_ID = ''
DISCORD_GUILD_ID = ''
TELEGRAM_TOKEN = ''
TELEGRAM_CHAT_ID = ''
KV_NAME = ''
- Run worker
npx wrangler dev --test-scheduled
- To execute the worker call this command in new terminal winodow
curl "http://localhost:8787/__scheduled?cron=0+*+*+*+*"
- You have to set all secrets see
.dev.vars.example
- Create KV store and called it as
KV_NAME
value inenv
- Edit
wrangler.toml
with KV id - Deploy by command
npm run deploy