This is simple Teonet telegram-bot micriservice application which get fortune message from Teonet Fortune microservice and show it in Telegram.
This microservice use telegram bot api. To create your telergam bot api token see How to Create and Connect a Telegram Chatbot. We have created the @teofortune
Telegram bot and run it in Teonet Cloud.
There are various ways to start this Teonet microservice application:
In code blow we use preinstalled in Teonet Cloud teofortune microservice address: '-fortune=8agv3IrXQk7INHy5rVlbCxMWVmOOCoQgZBF'.
Change this address to your application address. Or you can use this address, but than you will connect to teofortune
microservice application running in Teonet Cloud. The address prints after you start Teonet application in string:
Teonet address: 8agv3IrXQk7INHy5rVlbCxMWVmOOCoQgZBF
git clone https://github.com/teonet-go/teofortune-tg
cd teofortune-tg
go run . -token=your-telegram-token -fortune=8agv3IrXQk7INHy5rVlbCxMWVmOOCoQgZBF -loglevel=debug
go install github.com/teonet-go/teofortune-tg .
teofortune -token=your-telegram-token -fortune=8agv3IrXQk7INHy5rVlbCxMWVmOOCoQgZBF -loglevel=debug
docker run -d -it --network=host --restart=always --name teofortune-tg -v \
$HOME/.config/teonet/teofortune-tg:/root/.config/teonet/teofortune-tg ghcr.io/teonet-go/\
teofortune-tg:latest teofortune-tg -token=your-telegram-token \
-fortune=8agv3IrXQk7INHy5rVlbCxMWVmOOCoQgZBF -loglevel=debug
There is preinstalled teofortune-tg telegram bot with name @teofortune. Open @teofortune in Telegram and write him something.