I want to create a messaging module using telegram api in my flutter application. What I want to do is, I want to create a UI like messaging and I want to message telegram users using my module in my application. Is it possible? Any help or links will be appreciated.
Yes, it is possible. There is a TeleDart package. You can use it. You will need a Telegram API token. And then you can use it like this:
import 'package:teledart/teledart.dart';
import 'package:teledart/telegram.dart';
import 'package:teledart/model.dart';
void main() {
var teledart = TeleDart(Telegram('YOUR_BOT_TOKEN'), Event());
teledart.start().then((me) => print('${me.username} is initialised'));
teledart
.onMessage(keyword: 'Fight for freedom')
.listen((message) => message.reply('Stand with Hong Kong'));
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With