0

I want to add chat functionality to a game I have developed using Unity, and I'm going to use Telegram for that. I didn't found telegram api documentation enough helpful, and it seemed to have steep learning curve specially for advanced features.

So I searched for something that could give me a high level tool, and I found Telegram Cli (also in Python) and Telegram Bot Api. But I don't know that they can be used to develop a chat app. Telgeram Bot is suggesting that is used for creating telgeram bots, not chat app instances. Also Telegram Cli seemed to be a command line version of desktop app.

Anyway what I want to add is chatting with friends, adding other players to friend list, and other thing that a chat application has.

My question is: Can I use either telgeram bot api or telegram cli to create something like a chat application? or I have to use Telegram Api and MTProto? If I have to use the second method, I would really appreciate some sample code or a simple guide.

Also I have read other questions like this and this. Second one is really good, but I don't understand VB.net. Some C-Like language or python is really better.

and I have read documentation pages like Creating an Authorization Key (Sample) or Creating an Authentication Key, and they weren't enough helpful. TL Language is quite complicated too (IMHO).

Edit: Since it might be ambiguous, I want to use Telegram Api to add chat In my game.

Community
  • 1
  • 1
Pooya
  • 89
  • 3
  • 13

1 Answers1

2

you didn't mention specifically if you want players to chat inside your app or out of your app in telegram?

  1. out of your app: well, you could just create telegram.me/username links inside your app and when a user clicks it. Telegram app would open and he would start chatting with the opponent just right away. this method is:

    • easy (no special coding required)
    • familiar UI
    • not limited to game users
    • some might not have telegram installed already and would be forced to download and extra app to use your game
    • it would be out of your control (who knows when their service might not )
  2. inside your app: you'd have to write your own telegram client, which is not easy and going by telegram rules, like getting pin codes for signing in and other stuff, I don't think it would work for you. Instead if you try to write your own game messaging system yourself, I guess you'll spend less time and get better results.

    • good amount of coding
    • have to go by an extra signing process for users
    • need to keep up with updates and changes
azerafati
  • 18,215
  • 7
  • 67
  • 72
  • I just want to use the api inside my app. but my question is can i use telegram cli or telegram bot api? (sorry i forgot to add links to the projects in my question. it is now added.) – Pooya Dec 12 '15 at 14:19
  • well, It's not a good choice, your users will have to go through another step to sign in into their telegram account. I suggest you would just be better off using your own messaging system. – azerafati Dec 13 '15 at 06:26