Closed fidoriel closed 9 months ago
It would be nice to have a feature to type a 2FA code by Telegram, instead of logging in to terminal
This doesn't look technically feasible in app's current form. The library is async and app is sync. Once I move the app to use async, this integration can be done.
This works for me. It's just sending, but it works.
import os
from telegram import Bot
import asyncio
CHAT_ID = os.environ.get("CHAT_ID")
BOT_TOKEN = os.environ.get("BOT_TOKEN")
def msg(topic: str, body: str):
bot = Bot(BOT_TOKEN)
asyncio.run(bot.send_message(CHAT_ID, f"{topic}\n\n{body}"))
Please help me test the implementation using 'mandarons/icloud-drive:main' docker image and let me know if it works.
Use case I would love to see the option to receive the messages that are sent via mail alternatively via telegram.
Describe the solution you'd like Just put two env vars into the config files. ChatID and token https://github.com/python-telegram-bot/python-telegram-bot