telegram_client 0.0.0 telegram_client: ^0.0.0 copied to clipboard
telegram client library to make bot or userbot.
LOCALDB
Telegram Bot api dart library auto update from official Telegram-Bot-Api, Support All Method Api.
Welcome to Azkadev's profile!
I'm Gibran Alazka, a freshman at THU.
- ⚒ Javascript / Dart / C++
- ✏️ Ubuntu
- 🌱 Taking courses & doing assignments at THU
- 👨 Pronouns: he/him
📃 My Skilss:
I'm Gibran Alazka, a freshman at THU.
- ⚒ Javascript / Dart / C++
- ✏️ Ubuntu
- 🌱 Taking courses & doing assignments at THU
- 👨 Pronouns: he/him
My Social Media
#
Donate #
ID: Jika Anda Menyukai karya saya dan ingin memberikan dana untuk saya membeli beberapa snack silahkan donasi seberapapun itu akan saya terima dan terima kasih banyak ya.
EN: If you like my work and want to give me funds to buy some snacks, please donate any amount I will accept and thank you very much.
Framework #
ID: Project ini Menggunakan beberapa bahasa framework sebagai berikut.
EN: This project uses several framework as follows.
Language Code #
ID: Project ini Menggunakan beberapa bahasa code program sebagai berikut.
EN: This project uses several programming language languages as follows.
Use This Library #
ID: untuk anda yang ingin mencoba menggunakan source code ini, silahkan ikuti step berikut ini :
EN: for those of you who want to try to using this source code, please follow these steps :
Install Library
dart pub add telegram_client
Quickstart #
- Apps
- Test Cli
import 'package:telegram_client/telegram_client.dart';
import 'package:switchscript/switchscript.dart';
import 'dart:io';
void main() async {
stdout.write("Paste your token bot from @botfather here: ");
var tokenBot = stdin.readLineSync().toString();
if (tokenBot.isNotEmpty) {
var tg = Telegram(tokenBot);
stdout.write("Enter your chat_id : ");
var chatId = stdin.readLineSync();
if (chatId.toString().isNotEmpty) {
// ignore: non_constant_identifier_names
var chat_id = chatId;
// request raw auto update library latest
var options = {"chat_id": chat_id, "text": "hello world"};
try {
await tg.api.request("sendMessage", options);
await tg.api.sendMessage(chat_id, "hello world", {
"reply_markup": {
"inline_keyboard": [
[
{
"text": "hewlo",
"url": "google.com"
}
]
]
}
});
var request = await tg.api.request("getMe");
print(JSON.stringify(request, null, 2));
} catch (e) {
try {
await tg.api.sendMessage(chat_id, e.toString());
} catch (e) {
print(e);
}
}
} else {
print("silahkan ulangin lagi dari awal");
}
} else {
print("silahkan ulangin lagi dari awal");
}
}