Spaces:
No application file
No application file
File size: 1,348 Bytes
d6fa01c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | """
DevOps Daily Tips Telegram Bot — Telegram Bot
Telegram bot delivering daily DevOps tips, incident postmortem summaries, tool-of-the-week spotlights, and on-call readiness prompts. Commands include /tip for today's DevOps best practice, /tool for
"""
import os
import logging
from dotenv import load_dotenv
from telegram import Update
from telegram.ext import Application, CommandHandler, ContextTypes
load_dotenv()
logging.basicConfig(level=logging.INFO)
TOKEN = os.getenv("TELEGRAM_BOT_TOKEN", "")
async def start(update: Update, context: ContextTypes.DEFAULT_TYPE):
await update.message.reply_text(
f"Welcome to DevOps Daily Tips Telegram Bot!\n\nTelegram bot delivering daily DevOps tips, incident postmortem summaries, tool-of-the-week spotlights, and on-call readiness prompts. Commands include /tip for today's DevOps best practice, /tool for \n\nType /help to see all commands."
)
async def help_cmd(update: Update, context: ContextTypes.DEFAULT_TYPE):
await update.message.reply_text("Available commands:\n/start - Welcome\n/help - This message")
def main():
app = Application.builder().token(TOKEN).build()
app.add_handler(CommandHandler("start", start))
app.add_handler(CommandHandler("help", help_cmd))
app.run_polling()
if __name__ == "__main__":
main()
|