Last active
January 1, 2017 14:57
-
-
Save JuanjoSalvador/9c4bad7dcbbd4135e2e9a278299f85b4 to your computer and use it in GitHub Desktop.
Send an auto "Happy New Year" message with Telegram.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| ############################################ | |
| # Author: Juanjo Salvador Piedra | |
| # Website: http://juanjosalvador.es | |
| # GitHub: https://github.com/JuanjoSalvador | |
| # Twitter: @Linuxneitor | |
| # Telegram: @JuanjoSalvador | |
| ############################################ | |
| # PATH to your Telegram-Cli installation | |
| PATH="/home/juanjo/GitHub/tg" | |
| # Replace this with your own message | |
| MESSAGE="Feliz año nuevo! De parte de Juanjo y el equipo de JotaDevs ;)" | |
| # File where is all usernames (one per line) | |
| FILE="usernames.txt" | |
| while read -r USERNAME; do | |
| $PATH/bin/telegram-cli -W -e "msg $USERNAME $MESSAGE" > /dev/null && echo "Message sent to $USERNAME" | |
| sleep 10 | |
| done < "$FILE" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment