Since PoW Ethereum mining is over deprecated.
Just like https://gogs.veloe.link/Veloe/EthemineTelegramBotCore but in Golang!
|
3 年之前 | |
---|---|---|
api | 3 年之前 | |
cmd | 3 年之前 | |
internal | 3 年之前 | |
.gitignore | 3 年之前 | |
README.md | 3 年之前 | |
go.mod | 3 年之前 | |
go.sum | 3 年之前 |
GoEthemineTelegramBot is attempt to port EthemineTelegramBotCore into Golang.
As for now where are no releases for GoEthemineTelegramBot, so to run it you need to compile it by yourself. It's easy you will see.
Simply run following commands depending on your OS in project's root directory:
# go build -o GoEthemineTelegramBot .
> go build -o GoEthemineTelegramBot.exe .
As for first launch you dont need to specify anything, just start the bot:
# ./GoEthemineTelegramBot
> GoEthemineTelegramBot.exe
GoEthemineTelegramBot will generate config template config.json
in its working directory. With this stucture:
{
"Token": "",
"ApiUrl": "",
"DbHost": "",
"DbName": "",
"FullLogPath": "",
"ErrorLogPath": "",
"Currency": ""
}
Fill the brackets with settings suitable for you. Example:
{
"Token": "idontsayyoumytopsecrettelegrambottokennever",
"ApiUrl": "https://api.ethermine.org",
"DbHost": "127.0.0.1",
"DbName": "telegrambotdb",
"FullLogPath": "logs\full.log",
"ErrorLogPath": "logs\error.log",
"Currency": "ETH"
}
Make sure to create schema with right* tables at your server: GoEthemineTelegramBot can't create or check if tables structure right or not on it's own ... for now!
*I will not say you what is right
After launch GoEthemineTelegramBot will ask you for username and password for specified database. You can skip it by launching it with arguments like this:
# ./GoEthemineTelegramBot username password
> GoEthemineTelegramBot.exe username password
I will not stop you from stopping bot with Ctrl+C. But I should say that you could stop bot by pressing Enter. I never stop the bot this way thou.