A Telegram Bot, written in Java-/GoogleappsScript and hosted as Google Web App. Built to request, receive and update a spreadsheets data by sending commands and chats using the Telegram Messenger.
Handles information about multiple users collection of miniature (S) and giant (L) crowns in Monster Hunter World: Iceborne. Allows for comfortable tracking and updating of MHWs Crown Collector Achievements progress.
Provides simplicity-focused chat responses for monsters and quests in Telegram and a (decently) visually appealing spreadsheet including overview of high chance crown quests (the music-themed ones).
- Create new Telegram Bot
- save API Token (you'll need that)
- Download
example_botsheet.xlsx
, edit and/or rename file and upload to your Google Sheets- rename user columns as needed, but leave trailing S and L unchanged to differentiate between miniature (S) and giant (L) crowns ("user1S" -> "examplenameS")
- this sheet is built for 4 users. fill unused users columns with '1's
- do not change formulas or rearrange columns A,B and C
- Open Spreadsheet in Google Sheets
- Open Script Editor (click Tools -> Script Editor)
- Remove all code in Script Editor, copy and paste all code in
crownbot.js
- Deploy as Web App (click Publish -> Deploy as web app)
Project Version: "New"
Execute the app as: "Me (example@gmail.com)"
Who has access: "Anyone, even anonymous"
(...and the telegram bot)- Save resulting web app URL (you'll need that, too)
- Enter global variable values into the Script Editor
TOKEN
is your Telegram Bot Token aquired in step 1SHEET_ID
is part of the URL of the Spreadsheet (switch to that tab)- here: https://docs.google.com/spreadsheets/X/
___{SHEET_ID}___
/edit#gid=XXXXXXXXXX "
- here: https://docs.google.com/spreadsheets/X/
WEB_APP_URL
is the URL from step 6ADMIN_ID
is your own Accounts Telegram ID for testing or debuggingALLOWED_USERS
is a list of Telegram IDs (users) that are allowed to edit data- Not on the list? No data editing power. But you can use the bot to view the data.
- As can everyone (in bounds of the scripts/bots functionality). Be aware of that!
- Save
- Run Function
setWebhook()
(click Run -> Run Funtion -> setWebhook)- Check Logs if function worked as it's supposed to (== no errors)
- Repeat Step 6 (yes, including
Project Version: "New"
) - That's it! Enter your data into the spreadsheet and happy hunting!
Be aware that this it neither professionally written nor thoroughly tested code. It's a hobby project. If you experience anything weird, got a question or want to suggest something - send me a message.