This repository has been archived by the owner on Nov 1, 2024. It is now read-only.
generated from ubiquity/ts-template
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3f90a61
commit 0bdf9a5
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,26 @@ yarn | |
|
||
- Fill in the required data in the environment.json file. | ||
|
||
```json | ||
{ | ||
"token": "", // Telegram Bot Token, use @BotFather to create a bot an input the token here | ||
"webhook": "/endpoint", // Path for telegram cloudflare communication (default preffered) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
seprintour
Author
Collaborator
|
||
"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)", | ||
"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](https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/creating-an-oauth-app) | ||
|
||
[@BotFather for telegram bots](https://t.me/botfather) | ||
|
||
- After filling in the data, run the setup key command: | ||
|
||
If you are using yarn: | ||
|
@@ -50,3 +70,17 @@ yarn deploy | |
``` | ||
|
||
This command will deploy your Cloudflare Workers application and make it accessible. | ||
|
||
## Testing Telegram Bot | ||
|
||
1. Install Bot on your group | ||
2. Edit Bot in [@BotFather](https://t.me/botfather) dashboard (On Telegram) - Add slash commands `/start` | ||
3. Use the private chat as an admin to trigger the `/start` command and link a Github Repo to any of the listed channels | ||
![Screenshot 2023-08-18 at 8 15 28 PM](https://github.com/ubiquity/telegram-ubiquibot/assets/51956013/4e3d9313-af18-406e-9c91-3efcc372eb54) | ||
|
||
4. Members of your group can use `/github_link` command (sent to the group) and a link will be sent to their inbox to bind their telegram with their Github accounts | ||
|
||
# Troubleshooting Telegram | ||
|
||
1. Bot cannot read messages - [Solution](https://www.teleme.io/articles/group_privacy_mode_of_telegram_bots?hl=en) | ||
2. Every other errors can be debugged from the Cloudflare Worker dashboard (under Real-time Logs) |
Can you elaborate on this @seprintour ?