Giter Site home page Giter Site logo

telegrammemobot's Introduction

English | δΈ­ζ–‡

Telegram bot for the Memos project

Breaking changes

  • Photos sending is set using environment variable INCLUDE_PHOTO instead of using different docker image tag.

Usage

  1. Create a bot using @BotFather, and get your bot token.
  2. Get your chatid from @userinfobot
  3. Get your memos API URL.
  4. Run the bot with the following command:
docker run -d \
        --name tgmemobot \
        -e BOT_TOKEN="xxx" \
        -e CHAT_ID="yyy" \
        -e MEMO_API="zzz" \
        fwing/tgmemobot

Example usage

docker run -d \
        --name tgmemobot \
        -e BOT_TOKEN="588859xyz:xyz" \
        -e CHAT_ID="470183200" \
        -e MEMO_API="https://example.com/api/memo?openId=xyz" \
        fwing/tgmemobot

(Optional) Support for photos

Add INCLUDE_PHOTO=True to the environment variables to enable photo support.

docker run -d \
        --name tgmemobot \
        -e INCLUDE_PHOTO=True \
......

However, due to limited API, message with multiple photos will be considered as multiple single photo message, which leads to multiple text memos with only one message sent! This may lead to undesired behaviour.

PRs are welcome!

(Optional) Custom Telegram API Endpoint

Set TG_API_URL in the environment variables to use a custom Telegram API endpoint.

For example

docker run -d \
          --name tgmemobot \
          -e TG_API_URL="https://workers.dev/bot" \
......

Notice that it should end with /bot.

Notice for China Mainland users

You will need a server that can access telegram services to run this bot. Or alternatively, you can use a custom Telegram API endpoint.

Special Thanks

FlomoBot

telegrammemobot's People

Contributors

qazxcdswe123 avatar okhaibo avatar onewdd avatar

Watchers

 avatar

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.