Skip to content

A Telegram Bot to request, receive and update progress for Monster Hunter: Worlds crown achievements in a Google Sheet.

Notifications You must be signed in to change notification settings

xabepa/telegram-mhw-crownbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MHW Telegram Crown Collector Bot

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).

"If in doubt - take a bite!"

Examples

Setup

  1. Create new Telegram Bot
    • save API Token (you'll need that)
  2. 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
  3. Open Spreadsheet in Google Sheets
  4. Open Script Editor (click Tools -> Script Editor)
  5. Remove all code in Script Editor, copy and paste all code in crownbot.js
  6. Deploy as Web App (click Publish -> Deploy as web app)
    • Project Version: "New"
    • Execute the app as: "Me ([email protected])"
    • Who has access: "Anyone, even anonymous" (...and the telegram bot)
    • Save resulting web app URL (you'll need that, too)
  7. Enter global variable values into the Script Editor
    • TOKEN is your Telegram Bot Token aquired in step 1
    • SHEET_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 "
    • WEB_APP_URL is the URL from step 6
    • ADMIN_ID is your own Accounts Telegram ID for testing or debugging
    • ALLOWED_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!
  8. Save
  9. Run Function setWebhook() (click Run -> Run Funtion -> setWebhook)
    • Check Logs if function worked as it's supposed to (== no errors)
  10. Repeat Step 6 (yes, including Project Version: "New")
  11. That's it! Enter your data into the spreadsheet and happy hunting!

Limitations

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.

About

A Telegram Bot to request, receive and update progress for Monster Hunter: Worlds crown achievements in a Google Sheet.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published