Giter Site home page Giter Site logo

cloudflare-serverless-telegram-bot's Introduction

A chatbot entirely built on Cloudflare Worker

Workflow of how This chatbot works

Will build more endpoint in the future, using typescript The features are

- getfxrate - fxrate
  + Usage: /getfxrate usd vnd (this example will convert usd into vnd)

- getfxratevnd - fxrateVND
  + Usage: get usd->vnd pair

- getcryptoprice - get crypto price
  + Usage: /getcryptoprice ethereum -> get ethereum to usd 

- getbtc - get bitcoin price
  + Usage: get bitcoin price

- listfiles - get all available folders 
  + Usage: to get the folder structure to choose folder to download

- getfile - download any file with a link
  + Usage: /getfile link_to_file folder_to_save_to (will save to root without specifying)

- downstats - get status of downloading files
  + Usage: /downstats -> get status of files being downloaded, is it finished or not etc

- pauseall - to pause all the being downloaded files at once
  + Usage: /pauseall

Just like below images

Installation and setup

To make cloudflare worker to be working normally, here is the required secret files you need to input into the cloudflare secret

List of required secrets for the cloudflare worker project

[
  {
    "name": "CHATID",
    "type": "secret_text"
  },
  {
    "name": "DOMINIC_CLIENT_ID",
    "type": "secret_text"
  },
  {
    "name": "DOMINIC_CLIENT_SECRET",
    "type": "secret_text"
  },
  {
    "name": "dominicDomain",
    "type": "secret_text"
  },
  {
    "name": "TELEGRAM_KEY",
    "type": "secret_text"
  }
]

Explaination

These secret vars have follwing purposes:

  • CHATID -> Your chat session you wish the bot to respond to
  • DOMINIC_CLIENT_ID -> Dominic is being served through Cloudflare Tunnel, you need to authen, need CLIENT_ID and SECRET
  • DOMINIC_CLIENT_SECRET -> Dominic is being served through Cloudflare Tunnel, you need to authen, need CLIENT_ID and SECRET dominicDomain -> Domain of dominic, for example https://iam.dominic.com
  • TELEGRAM_KEY -> Key of your bot, you can get from your botfather UI on telegram

cloudflare-serverless-telegram-bot's People

Contributors

freebie1101 avatar tikikun avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

tungsontran

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.