Kumpulan Script Mikrotik Bot Telegram Memberi Tahu User Remove <FULL | FIX>

/system script run set-telegram-vars /system script add name="notify-user-removed" source= :global tgToken :global tgChatId :local logMsg "$[/system clock get date] $[/system clock get time] - User removed: $[/log get $1 message]" :local message "🚫 User removed from Mikrotik\n$logMsg"

:local url "https://api.telegram.org/bot$tgToken/sendMessage" :local postData "chat_id=$tgChatId&text=$[:escape $message]&parse_mode=HTML" :local chatId \"YOUR_CHATID\"

To trigger manually:

Note: The scheduler approach assumes removal = deletion. Adjust logic as needed. This script can be manually tested or called from a log trigger. :local name \"\$1\"

# Copy-paste sequence (adjust token & chatId) /system script add name=telegram-removed source=":local token \"YOUR_TOKEN\"; :local chatId \"YOUR_CHATID\"; :local name \"\$1\"; :local text \"User \$name removed\"; /tool fetch url=\"https://api.telegram.org/bot\$token/sendMessage?chat_id=\$chatId&text=\$[:escape \$text]\" keep-result=no" /log add topics=ppp,info action=script script=telegram-removed This completes the technical documentation for the . :local text \"User \$name removed\"