From 8d462f5c9f568147ac54733dfa037ae429db0f76 Mon Sep 17 00:00:00 2001 From: Azalea <22280294+hykilpikonna@users.noreply.github.com> Date: Fri, 14 Mar 2025 15:05:54 -0400 Subject: [PATCH] [+] Disabled bot --- bot_disabled.py | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 bot_disabled.py diff --git a/bot_disabled.py b/bot_disabled.py new file mode 100644 index 0000000..e628ca1 --- /dev/null +++ b/bot_disabled.py @@ -0,0 +1,30 @@ +from telegram import Update +from telegram.ext import CommandHandler, Application, ContextTypes + +from utils import CONFIG + + +async def disabled(update: Update, context: ContextTypes.DEFAULT_TYPE): + if update.message.chat.type != "private": + return + + await update.message.reply_text(""" +植树节活动结束了哦,感谢大家一起种树! + +为了防止被滥用,频道树现在是只读的,不能再添加新的频道了。 + +最终的频道树在这里 qwq +https://tree.aza.moe +""".strip()) + + +if __name__ == '__main__': + BOT_TOKEN = CONFIG["token"] + + bot = Application.builder().token(BOT_TOKEN).build() + + # Add handlers + bot.add_handler(CommandHandler("start", disabled)) + bot.add_handler(CommandHandler("leaf", disabled)) + + bot.run_polling()