Spaces:
No application file
No application file
| """ | |
| 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() | |