Just a simple service for notifying about discord channel joins to Telegram
- Create Discord app via official guide
- Copypaste token from "Bot" page to
appsettings.json
(DiscordNotifier.Token
section) - Turn off "Public bot" setting
- Create Telegram bot via @BotFather
- Copypaste bot's token to
appsettings.json
(Telegram.Token
section) - Goto
https://api.telegram.org/bot<token>/getUpdates
via your browser - Add bot to your channel/chat
- If you are want to specify topic, create it and send any message to it
- Refresh page at browser
- You will see some events about chat, you need next values:
{
"ok": true,
"result": [
{
"update_id": 112498495,
"message": {
"message_id": 69978,
...
"chat": {
"id": -10101782938225, <--- This is TelegramTargetId
"title": "...",
},
"new_chat_participant": {
"id": <yours_bot_id>,
"is_bot": true,
"first_name": "<Your's bot name>",
"username": "<yours_bot_username>"
},
...
}
},
{
"message": {
"message_id": ...,
...
"message_thread_id": 69979, <--- This is TelegramThreadId
"forum_topic_created": {
"name": "<Topic name>",
...
},
"is_topic_message": true
}
}
]
}
- Copypaste them to
appsettings.json
Just start it via docker compose up -d
Change ConnectionStrings.Redis
field at appsettings.json
to correct value and start app as you want.