This project allows you to deploy a TelegramX
ChatGPT auto bounty issue creator using Cloudflare Workers and wrangler.
-
Fork/clone the repository:
-
Install dependencies:
If you are using yarn
:
cd telegram-ubiquibot
yarn
- Environment Setup:
-
Copy the
environment.example.json
file and rename it toenvironment.json
. -
Fill in the required data in the environment.json file.
-
After filling in the data, run the setup key command:
If you are using yarn:
yarn setup-key
This command will set up the necessary secrets for your Cloudflare Workers application and await until the setup is complete.
- Changing Keys:
If you need to change any key, you can use the following command:
wrangler secret delete <KEY>
Replace <KEY>
with the name of the secret key you want to change. After deleting the key, you can run the setup key command again to set the new key.
- Deploying the App:
To deploy the application, simply run:
yarn deploy
This command will deploy your Cloudflare Workers application and make it accessible.
This project allows you to deploy a TelegramX
ChatGPT auto bounty issue creator using Cloudflare Workers and wrangler.
-
Fork/clone the repository:
-
Install dependencies:
If you are using yarn
:
cd telegram-ubiquibot
yarn
- Environment Setup:
-
Copy the
environment.example.json
file and rename it toenvironment.json
. -
Fill in the required data in the environment.json file.
{
"telegram_bot_token": "", // Telegram Bot Token, use @BotFather to create a bot an input the token here
"webhook": "/endpoint", // Path for telegram cloudflare communication (default preffered)
"secret": "QUEVEDO_BZRP_Random_String_52", // Random string for secure communication
"openai_api_key": "", // OpenAI ChatGPT API Key (Valid)
"github_pat": "", // Github Personal Access Token (Empty if you are using a bot)
"default_priority": "Priority: 0 (Normal)",
"github_installation_token": "", // Automatically generated by Github Action if you are using a bot
"client_id": "", // Github OAuth App Client ID
"client_secret": "", // Github OAuth App Client Secret
"supabase_key": "", // Supabase Service Role Key
"supabase_url": "" // Supabase Project URL
}
Here's a guide to create Github App
Note: Your Github App Callback URL should be https://YOUR_CLOUDFLARE_WORKER_URL/endpoint
or /
whatever you used in place of "webhook": "/endpoint"
- After filling in the data, run the setup key command:
If you are using yarn:
yarn setup-key
This command will set up the necessary secrets for your Cloudflare Workers application and await until the setup is complete.
- Changing Keys:
If you need to change any key, you can use the following command:
wrangler secret delete <KEY>
Replace <KEY>
with the name of the secret key you want to change. After deleting the key, you can run the setup key command again to set the new key.
- Deploying the App:
To deploy the application, simply run:
yarn deploy
This command will deploy your Cloudflare Workers application and make it accessible.
- Install Bot on your group
- Edit Bot in @BotFather dashboard (On Telegram) - Add slash commands
/start
- Copy your Worker URL on Github and add
/registerWebhook
as suffix, ex:https://WORKER_URL/registerWebhook
- it should returnOk
if everything works then you can move to the next step - Use the private chat as an admin to trigger the
/start
command and link a Github Repo to any of the listed channels
- Members of your group can use
/register
command (sent to the group) and a link will be sent to their inbox to bind their telegram with their Github accounts
- Bot cannot read messages - Solution
- Every other errors can be debugged from the Cloudflare Worker dashboard (under Real-time Logs)