WhatsApp API Bot
Telegram bot to create direct links with pre-filled text for WhatsApp Chats
You can check our bot here.
The bot is based on the API provided by WhatsApp.
Translation Contributions
You can add your language to the bot by editing the strings.py file and adding a translation in the appropriate format:
strings = {
"example1": {
"en": "This string represents message exmple1",
"he": "המחרוזת הזו מייצגת הודעת דוגמה 1",
"ru": "Эта строка представляет сообщение exmple1"
},
"example2": {
"en": "This string represents message exmple2",
"he": "המחרוזת הזו מייצגת הודעת דוגמה 2",
"ru": "Эта строка представляет сообщение exmple2"
}
}
- Add your language code as key, the lang-code should be in
IETF language tag
format. - Try to stick to the format and translate from the English language available in the file.
- Maintain the position of the special characters (emojis,
.*,-/\{}
). - When you done, open a pull request or send us the file to our Telegram.
Run the bot by yourself
- Clone this reposetory:
git clone https://github.com/RobotTrick/WhatsApp-API-Bot.git
- Install requirements (
pyrogram, tgcrypto
):
pip3 install -U pyrogram tgcrypto
- Edit and insert the folowing values into the config file:
[pyrogram]
api_id = XXXXXXXXXXX
api_hash = XXXXXXXXXXXXXXXXXXXXXXXXXX
bot_token = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
api_id
&api_hash
You can get from my.telegram.org.bot_token
you can get by create new bot on BotFather.
- Run the bot:
python3 main.py
Supported languages
- English
- Hebrew
TODO's
- Send message to specific phone number.
- Open chat with specific number.
- Create link with pre-filled message to pick chat.