Enhance /reboot command to create .reboot_claude if requested
This commit is contained in:
@@ -78,6 +78,10 @@ class TelegramHelper:
|
||||
await query.edit_message_text(text=result)
|
||||
|
||||
async def reboot(self, update: Update, context: ContextTypes.DEFAULT_TYPE) -> None:
|
||||
user_message = update.message.text.split() # Split the message to check for 'claude'
|
||||
if len(user_message) > 1 and user_message[1].lower() == 'claude':
|
||||
open('./.reboot_claude', 'w').close() # Create an empty file
|
||||
|
||||
if update:
|
||||
await update.message.reply_text("Rebooting the bot...")
|
||||
logging.info("Received reboot command. Exiting process...")
|
||||
|
||||
Reference in New Issue
Block a user