Depending on the shell you're using, you can do it like this:
telegram-send "$(ping -c1 192.168.1.1)"