https://github.com/dwisiswant0/teleslack
Posting Public Telegram Channel Messages to Slack Channel
https://github.com/dwisiswant0/teleslack
slack slack-webhook telegram telegram-channel
Last synced: 4 months ago
JSON representation
Posting Public Telegram Channel Messages to Slack Channel
- Host: GitHub
- URL: https://github.com/dwisiswant0/teleslack
- Owner: dwisiswant0
- Created: 2020-01-28T03:37:26.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-01-28T22:23:06.000Z (over 6 years ago)
- Last Synced: 2025-08-05T11:42:55.467Z (11 months ago)
- Topics: slack, slack-webhook, telegram, telegram-channel
- Language: Python
- Size: 3.91 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Teleslack
### Installation
#### Dependencies
```bash
$ pip3 install -U telethon --user
```
#### Setup
```bash
$ git clone git@github.com:dwisiswant0/Teleslack.git
$ cd Teleslack
$ cp config.yaml.sample config.yaml
```
### Configuration
```yaml
telegram:
name : "dw1" # session name
api_id : **********
api_hash: "**********"
## Public Telegram Channels ##
channels:
- "thehackernews"
- "thebugbountyhunter"
slack:
webhook: "https://hooks.slack.com/services/**********" # Incoming Webhooks URL
log : "channel-messages.log" # Log file
```
#### Telegram
1. [Login to your Telegram account](https://my.telegram.org/) with the phone number of the developer account to use.
2. Click under API Development tools.
3. A _**Create new application**_ window will appear. Fill in your application details. There is no need to enter any URL, and only the first two fields (App title and Short name) can currently be changed later.
4. Click on Create application at the end. Remember that your **API hash is secret** and Telegram won’t let you revoke it. Don’t post it anywhere!
> This API ID and hash is the one used by your application, not your phone number. You can use this API ID and hash with any phone number or even for bot accounts.
#### Slack
Read this [basic app Slack setup](https://api.slack.com/authentication/basics).
### Usage
Cron every 30 minutes _(recommended)_.
```bash
*/30 * * * * cd /home/dw1/Teleslack && /usr/bin/python3 main.py
```