Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
committed Mar 20, 2022
1 parent 43777a3 commit 7976a16
Show file tree
Hide file tree
Showing 17 changed files with 142 additions and 477 deletions.
3 changes: 3 additions & 0 deletions dart/telegram_client/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,6 @@
- add pretty update.


## 0.0.8

- add pretty update.
227 changes: 7 additions & 220 deletions dart/telegram_client/README.md
Original file line number Diff line number Diff line change
@@ -1,123 +1,4 @@
<h3 align="center">LOCALDB</h3>

Telegram Bot api dart library auto update from official [Telegram-Bot-Api](https://core.telegram.org/bots/api), Support All Method Api.

![](https://user-images.githubusercontent.com/38845275/128774296-40a55843-1893-44e6-936e-5e71c7cf72de.png)

---

<h3 align="center">
Welcome to Azkadev's profile!
<img src="https://media.giphy.com/media/hvRJCLFzcasrR4ia7z/giphy.gif" width="28">
</h3>

<!-- Typing SVG by azkadev - https://github.com/azkadev/readme-typing-svg -->
<p align="center">
<a href="https://github.com/azkadev/readme-typing-svg"><img src="https://readme-typing-svg.herokuapp.com/?lines=Full-stack%20web%20and%20app%20developer;Self-taught%20UI%2FUX%20Designer;6%2B%20month%20of%20coding%20experience;Always%20learning%20new%20things&font=Fira%20Code&center=true&width=440&height=45&color=f75c7e&vCenter=true&size=22"></a>
</p>

<!-- Social icons section -->
<p align="center">
<a href="https://www.youtube.com/c/UCj9stNGVvQJspYMp8-lG_ng"><img width="32px" alt="Youtube" title="Youtube" src="https://i.imgur.com/qiXu7b2.png"/></a>
&#8287;&#8287;&#8287;&#8287;&#8287;
<a href="https://twitter.com/azkadev"><img width="32px" alt="Twitter" title="Twitter" src="https://i.imgur.com/OXZM1L6.png"/></a>
&#8287;&#8287;&#8287;&#8287;&#8287;
<a href="https://discord.gg/fPrdqh3Zfu" alt="Dev Pro Tips Discussion & Support Server"><img width="32px" src="https://i.imgur.com/OViZO8J.png"/></a>
&#8287;&#8287;&#8287;&#8287;&#8287;
<a href="https://dev.to/azkadev"><img width="32px" alt="Dev.to" title="azkadev Dev.to" src="https://i.imgur.com/mVm29vK.png"></a>
&#8287;&#8287;&#8287;&#8287;&#8287;
<a href="https://ko-fi.com/azkadev"><img width="32px" alt="Ko-fi" title="Buy me a coffee" src="https://i.imgur.com/PpLeD3K.png"/></a>
&#8287;&#8287;&#8287;&#8287;&#8287;
<a href="http://eyl327.mywebcommunity.org/promos/"><img width="32px" alt="Free Stuff" title="Free gifts for you" src="https://i.imgur.com/0uVwkoZ.png"/></a>
</p>


[<img align="right" width="50%" src="https://bad-apple-github-readme.vercel.app/api?show_bg=1&username=azkadev">](https://metrics.lecoq.io/ouuan?template=classic)

I'm Gibran Alazka, a freshman at THU.

- :hammer_and_pick: Javascript / Dart / C++
- :pencil2: Ubuntu
- :seedling: Taking courses & doing assignments at THU
- :man: Pronouns: he/him

---

:page_with_curl: My Skilss:
<br><br>
![Dart](https://img.shields.io/badge/dart-%230175C2.svg?style=for-the-badge&logo=dart&logoColor=white)
![Express.js](https://img.shields.io/badge/express.js-%23404d59.svg?style=for-the-badge&logo=express&logoColor=%2361DAFB)
![Fastify](https://img.shields.io/badge/fastify-%23000000.svg?style=for-the-badge&logo=fastify&logoColor=white)
![Flutter](https://img.shields.io/badge/Flutter-%2302569B.svg?style=for-the-badge&logo=Flutter&logoColor=white)
![Figma](https://img.shields.io/badge/figma-%23F24E1E.svg?style=for-the-badge&logo=figma&logoColor=white)
![JavaScript](https://img.shields.io/badge/javascript-%23323330.svg?style=for-the-badge&logo=javascript&logoColor=%23F7DF1E)
![NodeJS](https://img.shields.io/badge/node.js-6DA55F?style=for-the-badge&logo=node.js&logoColor=white)
![Vue.js](https://img.shields.io/badge/vuejs-%2335495e.svg?style=for-the-badge&logo=vuedotjs&logoColor=%234FC08D)

<br>

[<img align="left" width="50%" src="https://github-readme-stats.vercel.app/api/top-langs/?username=azkadev&langs_count=8&layout=compact&theme=react&hide_border=true&bg_color=1F222E&title_color=F85D7F&icon_color=F8D866&hide=Jupyter%20Notebook">](https://metrics.lecoq.io/ouuan?template=classic)

---

I'm Gibran Alazka, a freshman at THU.

- :hammer_and_pick: Javascript / Dart / C++
- :pencil2: Ubuntu
- :seedling: Taking courses & doing assignments at THU
- :man: Pronouns: he/him


---

<h3 align="center">
My Social Media
<img src="https://media.giphy.com/media/hvRJCLFzcasrR4ia7z/giphy.gif" width="28">
</h3>

![Subscriber](https://custom-icon-badges.herokuapp.com/youtube/channel/subscribers/UCj9stNGVvQJspYMp8-lG_ng?color=%23E05D44&label=SUBSCRIBE&logo=video&logoColor=white&style=for-the-badge&labelColor=CE4630)
![](https://custom-icon-badges.herokuapp.com/youtube/channel/views/UCj9stNGVvQJspYMp8-lG_ng?color=%23E1AD0E&logo=video&logoColor=white&style=for-the-badge&labelColor=C79600)
![Stars](https://custom-icon-badges.herokuapp.com/badge/dynamic/json?logo=star&color=55960c&labelColor=488207&label=Stars&style=for-the-badge&query=%24.stars&url=https://api.github-star-counter.workers.dev/user/azkadev)
![](https://custom-icon-badges.herokuapp.com/github/followers/azkadev?color=236ad3&labelColor=1155ba&style=for-the-badge&logo=person-add&label=Follow&logoColor=white)
[![Custom badge](https://img.shields.io/badge/instagram-%23E4405F.svg?&style=for-the-badge&logo=instagram&logoColor=white)](https://www.instagram.com/azkadev/)
[![Custom badge](https://img.shields.io/badge/twitter-%231DA1F2.svg?&style=for-the-badge&logo=twitter&logoColor=white)](https://twitter.com/azkadev/)
[![Custom badge](https://img.shields.io/badge/Telegram-2CA5E0?style=for-the-badge&logo=telegram&logoColor=white)](https://t.me/azkadev)
[![Custom badge](https://img.shields.io/badge/Website-FF7139?style=for-the-badge&logo=Firefox-Browser&logoColor=white)](https://azkadev.com/)
[![Custom badge](https://img.shields.io/badge/GitHub-100000?style=for-the-badge&logo=github&logoColor=white)](https://github.com/azkadev)
[![Custom badge](https://img.shields.io/badge/dev.to-100000?style=for-the-badge&logo=dev.to&logoColor=white)](https://dev.to/azkadev)
[![Custom badge](https://img.shields.io/badge/devdojo-100000?style=for-the-badge&logo=devdojo&logoColor=white)](https://devdojo.com/azkadev)
---


# 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.

[![Github-sponsors-Badge](https://img.shields.io/badge/sponsor-30363D?style=for-the-badge&logo=GitHub-Sponsors&logoColor=#EA4AAA)](https://www.paypal.com/paypalme/azkadev)
[![Paypal-Badge](https://img.shields.io/badge/paypal-%2300457C.svg?&style=for-the-badge&logo=paypal&logoColor=white)](https://www.paypal.com/paypalme/azkadev)


# Framework

**ID**: Project ini Menggunakan beberapa bahasa framework sebagai berikut.

**EN**: This project uses several framework as follows.

[![Custom badge](https://img.shields.io/badge/Flutter-02569B?style=for-the-badge&logo=flutter&logoColor=white)](https://flutter.dev)

# Language Code

**ID**: Project ini Menggunakan beberapa bahasa code program sebagai berikut.

**EN**: This project uses several programming language languages as follows.

![Dart-Badge](https://img.shields.io/badge/Dart-0175C2?style=for-the-badge&logo=dart&logoColor=white)

---

# Use This Library
<h3 align="center">Telegram Client</h3>

**ID**: untuk anda yang ingin mencoba menggunakan source code ini, silahkan ikuti step berikut ini :

Expand All @@ -128,108 +9,14 @@ I'm Gibran Alazka, a freshman at THU.
dart pub add telegram_client
```

- [Documentation](https://github.com/azkadev/telegram_client/tree/main/dart/telegram_client/docs)
- [Tutorial](https://youtube.com/c/azkadev)

## Quickstart

- Apps
```dart
```bash
flutter pub add telegram_client
```

- Test Tdlib
```dart
import 'package:telegram_client/telegram_client.dart';
- [Doc + Example](https://github.com/azkadev/telegram_client/tree/main/dart/telegram_client/doc)
- [Tutorial](https://youtube.com/c/azkadev)

void main() {
var option = {
'api_id': 1917085,
'api_hash': 'a612212e6ac3ff1f97a99b2e0f050894',
'database_directory':"/home/azkadev/Documents/telegram_client/dart/telegram_client/bin/bot",
'files_directory': "/home/azkadev/Documents/telegram_client/dart/telegram_client/bin/bot"
};
Tdlib tg = Tdlib("/home/azkadev/Desktop/azkauserrobot/libtdjson.so", option);
tg.on("update", (UpdateTd update) async {
if (update.message.is_found) {
var msg = update.message;
if (!msg.is_outgoing) {
if (msg.text == "/start") {
return tg.request("sendMessage", {
"chat_id": msg.chat.id,
"text": "start message"
});
} else {
return tg.request("sendMessage", {
"chat_id": msg.chat.id,
"text": "Echo ${msg.text ?? "undefined"}"
});
}
}
}
});
await tg.bot("2123043767:AAEY0KTdVYo0JTRmFF5S4QPBnvoCdpe2yPI");
}
```
##### Feature

- Test Cli Telegram Api
```dart
import 'package:telegram_client/telegram_client.dart';
import 'dart:io';
- Support Server Side and Client Side

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,
"document": tg.api.file(
"/home/azkadev/Documents/telegram_client/dart/telegram_client/docs/README.md"),
"caption": "hello world",
"protect_content": true,
"reply_markup": {
"inline_keyboard": [
[
{"text": "form data nih bos", "url": "google.com"}
]
]
}
};
try {
try {
await tg.api.request("sendDocument", options, true);
} catch (e) {
print("eror");
}
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(request);
} 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");
}
}
```
Binary file removed dart/telegram_client/bin/bot/td.binlog
Binary file not shown.
82 changes: 0 additions & 82 deletions dart/telegram_client/bin/event.dart

This file was deleted.

Binary file removed dart/telegram_client/bin/hello.mp3
Binary file not shown.
27 changes: 0 additions & 27 deletions dart/telegram_client/bin/server.dart

This file was deleted.

Loading

0 comments on commit 7976a16

Please sign in to comment.