Fiber Chat Bot is a bot that queries a local fiber node and when detecting a new block broadcasts it via chat (currently only telegram).
The bot currently supports a local fiber node that is accessible via HTTP.
HTTPS might be implemented in a later version
The bot depends on a local instance of a fiber node.
See information about a fiber node on https://github.com/skycoin/skycoin.git.
!! You have to install a local node and then let it synchronize to the latest block to use the bot !!
-
Clone the bot in your go directory
git clone https://github.com/4rchim3d3s/fiber-chat-bot.git $GOPATH/src/github.com/4rchim3d3s/fiber-chat-bot
- Copy
default_config.json
to a*_config.json
of your choice (e.g. fibercoin_config.json) - Edit the config depending to your preferences.
- Open Telegram application then search for @BotFather
- Click Start
- Click Menu ->
/newbot
or type/newbot
and hit Send - Copy your token and paste it in
your_config.json
"telegram" : { "bot_token" : "your-bot-token", "chat_id" : YourChatID },
!!! Attention: Never share this token. Everyone having this token can fully control your bot
- Make a new Telegram channel
- Add your bot as admin to the channel
- Add the bot @IDBot as admin to the channel
- type
/getgroupid
and hit Send - copy your channel/groupid and paste it in
your_config.json
! If you want to post in a certain topic inside a supergroup just fill the "chat_thread_id" variable with the last number shown inside the t.me/c/.../. link inside the topic info."telegram" : { "bot_token" : "your-bot-token", "chat_id" : YourChatID, "chat_thread_id": "", },
-
Change directory to the cloned repo:
cd $GOPATH/src/github.com/4rchim3d3s/fiber-chat-bot
-
Install it with:
go install
-
Run the bot with:
go run fiber-chat-bot -cfg your_config.json -block theBlockYouWantToStartToQueryAndSendFirst
e.g.
go run fiber-chat-bot -cfg skycoin_config.json -block 186798