-
Notifications
You must be signed in to change notification settings - Fork 135
Client Telegram
#Telegram Bot
The Telegram Client provides a way for a Telegram Messenger to interact with a bot client.
To begin, you'll need an Access Token. Read and follow the Introduction to the API on the Telegram Developer website. When you are ready you then need to create an Access Token, which do by talking to the @BotFather via Telegram Messenger and follow a few simple steps.
You create new bots by directly interacting with the Telegram BotFather via your favourite Telegram client.
Login to Telegram Client
Start a conversation with BotFather by searching for ‘botfather’ in the search box, click on @BotFather and a new conversation will start
We create a new bot with the ‘/newbot’ command
/newbot
Give it a name
Give it a username
Telegram will now create a token to access HTTP API is given
Take the token (blacked out for security purposes) and add it to licenses.keys
TELEGRAM_TOKEN = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
You are now ready to run your Telegram client
Run ./y-bot-telegram.sh
Loading Telegram client, please wait. See log output for progress...
No bot root argument set, defaulting to [../../config/xnix]
Found a total of 1 errors in your grammars, check your errors store
Found a total of 6 duplicates in your grammars, check your duplicates store
Telegram Bot connected and running...
Once you can can see its runnings, you can go to Telegram Client and search for the bot name you used above
Click on your bot and then on ‘start’ and you can then start talking to you bot
Telegram client needs little configuration apart from which message to return if you send it an unknown command. This can be configured by adding the following client configuration to config.yaml.
telegram:
unknown_command: Sorry, that is not a command I have been taught yet!
To run the Telegram client, you can use the shell script in Y-Bot scripts folder
./y-bot-telegram.sh
Or you can use the command line
python3 -m programy.clients.polling.telegram.client --config <PATH TO CONFIG> --cformat yaml --logging <PATH TO LOGGING>
Email: keiffster@gmail.com | Twitter: @keiffster | Facebook: keith.sterling | LinkedIn: keithsterling | My Blog
- Home
- Background
- Guiding Principles
- Reporting an Issue
- Installation
- You And Your Bot
- Bots
- Clients
- Configuration
- AIML
- Sentence Splitting
- Natural Langauge Processing
- Normalization
- Spelling
- Sentiment Analysis
- Translation
- Security
- Hot Reload
- Logging
- Out of Band
- Multi Language
- RDF Support
- Rich Media
- Asynchronous Events
- Triggers
- External Services
- Dynamic Sets, Maps & Vars
- Extensions
- Pre & Post Processors
- Custom Nodes
- The Brain Tree
- Utilities
- Building It Yourself
- Creating Your Own Bot
- Contributing
- Performance Testing
- FAQ
- History
- Website