Skip to content

Instantly share code, notes, and snippets.

@JuanjoSalvador
Last active January 1, 2017 14:57
Show Gist options
  • Select an option

  • Save JuanjoSalvador/9c4bad7dcbbd4135e2e9a278299f85b4 to your computer and use it in GitHub Desktop.

Select an option

Save JuanjoSalvador/9c4bad7dcbbd4135e2e9a278299f85b4 to your computer and use it in GitHub Desktop.
Send an auto "Happy New Year" message with Telegram.
#!/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