StockBot is a Telegram bot, made in scala using the telegrambot4s library. It aims to help managing home stocks and make the logistics/communication easier.
You obviously need Scala and SBT to make it run.
Then you'll need a Google Drive key as well as one for the Telegram Bot.
Simply create a 'keys' folder at the root and add the keys (see Configuration).
The configuration is done through the application.conf file.
It's composed of two parts, the first one drive-client
which is the Google Drive related configuration and the telegram-client
file
which is the telegram one.
The base configuration:
drive-client {
email="stockbot@telegrambot-1166.iam.gserviceaccount.com" // Email of the Drive Service Account
key-path="keys/drive.p12" // Path to the drive key
filename="stock" // The sheet's name
start-row=2 // The row from which there are items
cols=[1,3] // The columns that contains items
}
telegram-client {
key-path="./keys/telegram.key" // Path to the telegram key
}
You are good to go ! The last step is to share the stock sheet you want the bot to manage to the Service Account email so the bot can access it.
Feel free to contribute, report any bug or submit ideas to improve the bot !
See License !