Penggunaan idbot pada telegram memang sangatlah efisien ketika ingin mendapatkan id telegram. akan tetapi pada waktu kita searching idbot muncul banyak pilihan sehingga sangat kesulitan untuk mendapatkan idbot termasuk muncul beberapa pencarian yang tidak selayaknya tampil
Nah untuk alternatifnya bisa kita ganti dengan menggunakan script arduino
seperti berikut ini :
#include "CTBot.h"
CTBot myBot;
String ssid = "gatinamassid"; //wajib diganti dengan ssidwifinya
String pass = "gantipaswifi"; //wajib diganti dengan password wifinya
String token = "gantitokenbotfather"; //wajib diganti dengan botfather token
void setup() {
Serial.begin(9600);
Serial.println("Starting TelegramBot...");
// connect the ESP8266 to the desired access point
myBot.wifiConnect(ssid, pass);
// set the telegram bot token
myBot.setTelegramToken(token);
// check if all things are ok
if (myBot.testConnection())
Serial.println("\ntestConnection OK");
else
Serial.println("\ntestConnection NOK");
}
void loop() {
// a variable to store telegram message data
TBMessage msg;
// if there is an incoming message...
if (myBot.getNewMessage(msg)) {
int idne = msg.sender.id;
Serial.println(idne);
if (msg.text.equalsIgnoreCase("myid")) {
String idtelegram = String(idne);
myBot.sendMessage(msg.sender.id, idtelegram);
}
else {
String reply;
reply = (String)"Welcome " + msg.sender.username + (String)". Try myid";
myBot.sendMessage(msg.sender.id, reply);
}
}
delay(500);
}
CTBot myBot;
String ssid = "gatinamassid"; //wajib diganti dengan ssidwifinya
String pass = "gantipaswifi"; //wajib diganti dengan password wifinya
String token = "gantitokenbotfather"; //wajib diganti dengan botfather token
void setup() {
Serial.begin(9600);
Serial.println("Starting TelegramBot...");
// connect the ESP8266 to the desired access point
myBot.wifiConnect(ssid, pass);
// set the telegram bot token
myBot.setTelegramToken(token);
// check if all things are ok
if (myBot.testConnection())
Serial.println("\ntestConnection OK");
else
Serial.println("\ntestConnection NOK");
}
void loop() {
// a variable to store telegram message data
TBMessage msg;
// if there is an incoming message...
if (myBot.getNewMessage(msg)) {
int idne = msg.sender.id;
Serial.println(idne);
if (msg.text.equalsIgnoreCase("myid")) {
String idtelegram = String(idne);
myBot.sendMessage(msg.sender.id, idtelegram);
}
else {
String reply;
reply = (String)"Welcome " + msg.sender.username + (String)". Try myid";
myBot.sendMessage(msg.sender.id, reply);
}
}
delay(500);
}
Upload ke arduino,
dan kirim perintah melalui bot yang sudah di buat
Nah id sudah didapat dan siap dimasukkan ke aplikasi telegram lainnya yang dibuat.
Salam Arduino Indonesia
All of our rated on line casino reviews are based on a number of|numerous|a variety of} essential on line casino comparison criteria managed by our staff of specialists. If you are be} new to on-line on line casino, take a look at|try} our really helpful casinos to get began. The games you'll find on our own site are precisely the same as the actual money variations, the only distinction being that you can't withdraw your winnings. If you stick to these, or free games out there on any of our really helpful sites, received't|you will not} have to worry about them being rigged. Free on line casino games are additionally good for training and getting used to the principles. Certain games, similar to blackjack, could require a component of strategy so as to to} 온라인카지노 win.
BalasHapus