-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to login bot by using a token? #36
Comments
Note to newcomers: things have evolved since this issue was first posted, and Telethon now makes it just as easy to write bots as it does to write scripts that control user accounts (although that could be seen further below). So yes, Telethon can be used to make bots too. Below follow the original comments. If I understood correctly, no. Telethon is for using Telegram as a normal client would, not for bots. You can build a bot with this and it would seem to be a normal use, but you can't control Telegram bots per se with Telethon. You can, however, manage them by talking to the @BotFather, in the same way you can do with any client. |
By the way, if you want to build a bot, maybe Lonabot is a good start, if you're looking for something that I made. There are tons of other libraries out there. |
I want to access full MTProto method rather than normal vanilla bot API. What I need is a bot token login method like Telegram-CLI --bot (https://github.com/vysheng/tg/wiki/Telegram-CLI-Arguments). |
But there's no bot token, is there? It's just a normal user, and it would need a phone (even if it is just a virtual one), as far as I know.
I don't know if it's possible to use a bot token to access the full list of methods as a normal user would, but if you manage to succeed, I'd be glad to merge! |
@XyLoNaMiyX if you use Telegram-CLI --bot to start it, it will ask you a bot token instead of phone number and code. Then the client works like a normal one but you are a bot. You can chat with others like normal user. But bot limitations are still there, like you can't initiate a new chat. |
I see… Pretty cool. Maybe we could make a different class, |
I have more questions. What are we supposed to implement for the bot? Should we parse the bot methods just like we parsed the original |
you dont need to implement anything other than the authorize |
I didn't know that was a thing @JuanPotato, thanks for pointing us in the right direction! |
Usage: |
Can this works on the telegram desktop application? |
No description provided.
The text was updated successfully, but these errors were encountered: