Skip to content

teonet-go/teofortune-tg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Teonet fortune telegram-bot microservice

This is simple Teonet telegram-bot micriservice application which get fortune message from Teonet Fortune microservice and show it in Telegram.

GoDoc Go Report Card

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.

Run the Teonet fortune telegram-bot microservice

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

1. From sources

git clone https://github.com/teonet-go/teofortune-tg
cd teofortune-tg
go run . -token=your-telegram-token -fortune=8agv3IrXQk7INHy5rVlbCxMWVmOOCoQgZBF -loglevel=debug

2. Install binary from github

go install github.com/teonet-go/teofortune-tg .
teofortune -token=your-telegram-token -fortune=8agv3IrXQk7INHy5rVlbCxMWVmOOCoQgZBF -loglevel=debug

3. Using docker

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

How to use

There is preinstalled teofortune-tg telegram bot with name @teofortune. Open @teofortune in Telegram and write him something.

Licence

BSD