Membuat Bot Telegram Info Hotspot Mikrotik



Membuat Bot Telegram Info Hotspot Mikrotik
Apa kuabra gaes?
Semoga selalu tegak walaupun bukan keadilan. wkwkwk 



Oiya gaes. kali ini artikel lanjutan dari Bot Telegram.
tapiii
ini khusus untuk para pegiat usaha rt rw net berbasis hotspot
yang lain jangan minggir
ntar nyungsep

oke kita mulai langkah2 nya tanpa pandang bulu

Pertama :
ente harus sudah men-SETUP mikrotik dengan fitur hotspot
ente juga harus punya TOKEN BOT TELEGRAM beserta CHAT ID. ga punya ? KLIK DISINI

lalu masuk ke IP > HOTSPOT 
bagian User Profile 
buka salah satu profile

masuk ke tab Script

Kedua :
Pastekan Code ini :

#ONLOGIN

:local token "TOKENMU";
:local chat_id "CHAT_IDMU";
:local nama "$user";
:local date [/system clock get date];
:local time [/system clock get time];
:local ipx [/ip hotspot active get [find user="$nama"] address];
:local macx [/ip hotspot active get [find user="$nama"] mac-address];
:local sisa [/ip hotspot active get [find user="$nama"] session-time-left];
:local hostx [/ip dhcp-server lease get [find address="$ipx"] host-name];
:local paket [/ip hotspot user get [find name="$nama"] profile];
:local useraktif [/ip hotspot active print count-only];
:local msg "LOGIN%20[%20$nama%20]%0A$paket%0A$ipx%0A$macx%0A$hostx%0A$sis%0A%0A%F0%9F%8C%8D%20$useraktif%20Active%20User";
/tool fetch url="https://api.telegram.org/bot$token/sendMessage?chat_id=$chat_id&text=$msg" keep-result=no

#ONLOGOUT

:local token "TOKENMU";
:local chat_id "CHAT_IDMU";
:local nama "$user";
:local date [/system clock get date];
:local time [/system clock get time];
:local paket [/ip hotspot user get [find name="$nama"] profile];
:local useraktif [/ip hotspot active print count-only];
:local msg "LOGOUT%20[%20$nama%20]%20$paket%0A%0A%F0%9F%8C%8D%20$useraktif%20Active%20User";
/tool fetch url="https://api.telegram.org/bot$token/sendMessage?chat_id=$chat_id&text=$msg" keep-result=no
Ketiga :
Apply > OK

Keempat :
Ulangi langkah2 tersebut disemua User Profile Hotspot mu

Sampai disini paham kan?
kalau belum bisa dibantu deh
PM aja di FB FoXDamn

Segitu dulu artikelnya
see yuu next taim


Everything Just Need a Bullseeds.
Berbagi Macam Hal Informative dan Spesific.

Share this

Related Posts

Latest
Previous
Next Post »

2 komentar

komentar

Catatan:
1. Berkomentarlah dengan sopan sesuai topik yang relevan dan tidak melakukan SPAM
2. Untuk memasukan kode, gunakan tag <i rel="code">KODE ANDA DISINI</i>
3. Untuk memasukan gambar, gunakan tag <i rel="image">URL GAMBAR ANDA DISINI</i>

NB: Sebelum memasukkan kode silahkan parse terlebih dahulu dengan menggunakan tool konversi kode DISINI.