Giter Club home page Giter Club logo

telegram-mhw-crownbot's Introduction

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.