@@ -14,7 +14,7 @@ and manage customization through messages and buttons on Telegram.
14
14
## 📝 Information
15
15
16
16
- Send notifications of your GitHub/GitLab repositories to Telegram Bots, Groups, Super Groups (Multiple Topics), and Channels.
17
- - The bot must be created using the [ BotFather] ( https://core.telegram.org/bots#6-botfather )
17
+ - The bot must be created using the [ BotFather] ( https://core.telegram.org/bots#6-botfather )
18
18
19
19
## 🎉 Features
20
20
@@ -62,8 +62,8 @@ and manage customization through messages and buttons on Telegram.
62
62
## 📋 Requirements
63
63
64
64
- PHP ^8.0
65
- - [ Composer] ( https://getcomposer.org/ )
66
- - Core: [ Telegram Git Notifier] ( https://github.com/lbiltech/telegram-git-notifier )
65
+ - [ Composer] ( https://getcomposer.org/ )
66
+ - Core: [ Telegram Git Notifier] ( https://github.com/lbiltech/telegram-git-notifier )
67
67
68
68
## 🔧 Installation
69
69
@@ -100,9 +100,9 @@ These files are used to store the data and serve for features in this bot.
100
100
To create a new bot, you need to talk to [ BotFather] ( https://core.telegram.org/bots#6-botfather ) and follow a few simple steps.
101
101
102
102
1 . Open a chat with [ BotFather] ( https://telegram.me/botfather ) and send ` /newbot ` command.
103
- 2 . Enter a friendly name for your bot. This name will be displayed in contact details and elsewhere.
104
- 3 . Enter a unique username for your bot. It must end in ` bot ` . Like this, for example: ` TetrisBot ` or ` tetris_bot ` .
105
- 4 . Copy the HTTP API access token provided by [ BotFather] ( https://telegram.me/botfather ) and paste it into your ` .env ` file.
103
+ 2 . Enter a friendly name for your bot. This name will be displayed in contact details and elsewhere.
104
+ 3 . Enter a unique username for your bot. It must end in ` bot ` . Like this, for example: ` TetrisBot ` or ` tetris_bot ` .
105
+ 4 . Copy the HTTP API access token provided by [ BotFather] ( https://telegram.me/botfather ) and paste it into your ` .env ` file.
106
106
107
107
``` dotenv
108
108
TELEGRAM_BOT_TOKEN=123456789:ABCDEFGHIJKLMNOPQRSTUVWXYZ
@@ -115,9 +115,9 @@ You can build your own server or use a service like [Heroku](https://www.heroku.
115
115
116
116
In this example, we will use localhost and [ ngrok] ( https://ngrok.com/ ) to set up the domain and webhook:
117
117
1 . Download and install [ ngrok] ( https://ngrok.com/download ) .
118
- 2 . Go to this project directory and run the command in the terminal: ` php -S localhost:8000 `
119
- 3 . Continue to run the command in the terminal: ` ngrok http 8000 `
120
- 4 . Copy the HTTPS URL provided by ngrok and paste it into your ` .env ` file.
118
+ 2 . Go to this project directory and run the command in the terminal: ` php -S localhost:8000 `
119
+ 3 . Continue to run the command in the terminal: ` ngrok http 8000 `
120
+ 4 . Copy the HTTPS URL provided by ngrok and paste it into your ` .env ` file.
121
121
122
122
``` dotenv
123
123
TGN_APP_URL=https://123456789.ngrok.io
@@ -126,10 +126,10 @@ TGN_APP_URL=https://123456789.ngrok.io
126
126
#### 3. Get your Chat ID and add it to the .env file
127
127
128
128
1 . Open a chat with your bot.
129
- 2 . Send any message to your bot. (This handle needs to get your chat ID)
130
- 3 . Go to the following URL: ` <TGN_APP_URL>/webhook/getUpdate.php `
131
- 4 . Look for the ` "chat":{"id": ` field and copy the number after it. This is your Chat ID.
132
- 5 . Paste the Chat ID in your ` .env ` file.
129
+ 2 . Send any message to your bot. (This handle needs to get your chat ID)
130
+ 3 . Go to the following URL: ` <TGN_APP_URL>/webhook/getUpdate.php `
131
+ 4 . Look for the ` "chat":{"id": ` field and copy the number after it. This is your Chat ID.
132
+ 5 . Paste the Chat ID in your ` .env ` file.
133
133
134
134
``` dotenv
135
135
TELEGRAM_BOT_CHAT_ID=123456789
@@ -175,8 +175,8 @@ CONTAINER_NAME=tgn-app
175
175
> ** Note:**
176
176
>
177
177
> - The ` PHP_VERSION_SELECTED ` variable is the PHP version you want to use in the container.
178
- > - The ` APP_PORT ` variable is the port of the container. (Please don't set the same port as the host)
179
- > - The ` CONTAINER_NAME ` variable is the name of the container you want to create.
178
+ > - The ` APP_PORT ` variable is the port of the container. (Please don't set the same port as the host)
179
+ > - The ` CONTAINER_NAME ` variable is the name of the container you want to create.
180
180
181
181
#### 2. Install and run the container
182
182
@@ -195,9 +195,9 @@ To create a new bot,
195
195
you need to talk to [ BotFather] ( https://core.telegram.org/bots#6-botfather ) and follow a few simple steps.
196
196
197
197
1 . Open a chat with [ BotFather] ( https://telegram.me/botfather ) and send ` /newbot ` command.
198
- 2 . Enter a friendly name for your bot. This name will be displayed in contact details and elsewhere.
199
- 3 . Enter a unique username for your bot. It must end in ` bot ` . Like this, for example: ` TetrisBot ` or ` tetris_bot ` .
200
- 4 . Copy the HTTP API access token provided by [ BotFather] ( https://telegram.me/botfather ) and paste it into your ` .env ` file.
198
+ 2 . Enter a friendly name for your bot. This name will be displayed in contact details and elsewhere.
199
+ 3 . Enter a unique username for your bot. It must end in ` bot ` . Like this, for example: ` TetrisBot ` or ` tetris_bot ` .
200
+ 4 . Copy the HTTP API access token provided by [ BotFather] ( https://telegram.me/botfather ) and paste it into your ` .env ` file.
201
201
202
202
``` dotenv
203
203
TELEGRAM_BOT_TOKEN=123456789:ABCDEFGHIJKLMNOPQRSTUVWXYZ
@@ -216,7 +216,7 @@ Example:
216
216
![ image] ( https://github.com/lbiltech/lemp-docker/assets/35853002/8dc8ba3f-b1e9-4bff-901d-6bb7747acda4 )
217
217
218
218
2 . Download and install [ ngrok] ( https://ngrok.com/download ) .
219
- 2 . Continue to run the command in the terminal: ` ngrok http <CONTAINER_IP> `
219
+ 2 . Continue to run the command in the terminal: ` ngrok http <CONTAINER_IP> `
220
220
221
221
> ** Note:** Replace ` <CONTAINER_IP> ` is the IP address of the container in step 1.
222
222
@@ -235,10 +235,10 @@ TGN_APP_URL=https://123456789.ngrok-free.app
235
235
#### 5. Get your Chat ID and add it to the .env file
236
236
237
237
1 . Open a chat with your bot.
238
- 2 . Send any message to your bot. (This handle needs to get your chat ID)
239
- 3 . Go to the following URL: ` <TGN_APP_URL>/webhook/getUpdate.php `
240
- 4 . Look for the ` "chat":{"id": ` field and copy the number after it. This is your Chat ID.
241
- 5 . Paste the Chat ID in your ` .env ` file.
238
+ 2 . Send any message to your bot. (This handle needs to get your chat ID)
239
+ 3 . Go to the following URL: ` <TGN_APP_URL>/webhook/getUpdate.php `
240
+ 4 . Look for the ` "chat":{"id": ` field and copy the number after it. This is your Chat ID.
241
+ 5 . Paste the Chat ID in your ` .env ` file.
242
242
243
243
``` dotenv
244
244
TELEGRAM_BOT_CHAT_ID=123456789
@@ -334,12 +334,12 @@ TELEGRAM_BOT_CHAT_ID=6872320129
334
334
# -------------------------------------------------------
335
335
# Note:
336
336
# Please use semicolon ";" to separate chat ids
337
- # And use colon ":" to separate chat ID and thread ID
337
+ # And use a colon ":" to separate chat ID and thread ID
338
338
# And use comma "," if you want to add multiple thread ids
339
339
# -------------------------------------------------------
340
340
# The environment variable is expected to be in the format:
341
341
# "chat_id1;chat_id2:thread_id2;chat_id3:thread_id3_1,thread_id3_2;..."
342
- TELEGRAM_NOTIFY_CHAT_IDS="-978339113, -1001933979183"
342
+ TELEGRAM_NOTIFY_CHAT_IDS="-978339113; -1001933979183:2,13;6872320129 "
343
343
344
344
TIMEZONE=Asia/Ho_Chi_Minh
345
345
@@ -389,13 +389,13 @@ Now you will need to add the Webhook for your GitHub and GitLab repository to re
389
389
## 📌 Add webhook on your GitHub repository to receive notifications
390
390
391
391
1 . Go to your repository settings.
392
- 2 . Go to the ` Webhooks ` section.
393
- 3 . Click on ` Add webhook ` .
394
- 4 . Set ` Payload URL ` to ` <APP_URL> ` .
395
- 5 . Set ` Content type ` to ` application/x-www-form-urlencoded ` .
396
- 6 . Which events would you like to trigger this webhook? Select ` Let me select individual events. ` .
397
- 7 . Click on the ` Active ` checkbox and Add webhook button.
398
- 8 . Done. You will receive a notification when your repository has a new event.
392
+ 2 . Go to the ` Webhooks ` section.
393
+ 3 . Click on ` Add webhook ` .
394
+ 4 . Set ` Payload URL ` to ` <APP_URL> ` .
395
+ 5 . Set ` Content type ` to ` application/x-www-form-urlencoded ` .
396
+ 6 . Which events would you like to trigger this webhook? Select ` Let me select individual events. ` .
397
+ 7 . Click on the ` Active ` checkbox and Add webhook button.
398
+ 8 . Done. You will receive a notification when your repository has a new event.
399
399
400
400
Here is the first notification you will receive:
401
401
@@ -406,11 +406,11 @@ Here is the first notification you will receive:
406
406
## 📌 Add a webhook on your GitLab repository to receive notifications
407
407
408
408
1 . Go to your repository settings.
409
- 2 . Go to the ` Webhooks ` section.
410
- 3 . Click on ` Add new webhook ` .
411
- 4 . Set ` URL ` to ` <APP_URL> ` .
412
- 5 . Choose any ` Trigger ` you want.
413
- 6 . Click on the ` Enable SSL verification ` checkbox and Add webhook button.
409
+ 2 . Go to the ` Webhooks ` section.
410
+ 3 . Click on ` Add new webhook ` .
411
+ 4 . Set ` URL ` to ` <APP_URL> ` .
412
+ 5 . Choose any ` Trigger ` you want.
413
+ 6 . Click on the ` Enable SSL verification ` checkbox and Add webhook button.
414
414
415
415
> ** Note: You can set up this webhook for different repositories. Please similarly set up the webhook for each repository.**
416
416
0 commit comments