Giter Site home page Giter Site logo

gobot's Introduction

Gobot

Build Deploy to Koyeb

Multi-purpose bot for the Telegram Messenger based on gotgbot and inspired by Python-Telegram-Bot.

The source code is here so YOU can do what you want with it - don't ask questions about it nor ask for help on how to use it!

Features

  • Written in Go
  • Uses MySQL database
  • Supports plugins
  • Whitelist included
  • Supports webhooks and long-polling

Usage

  1. Download binaries from Actions tab or build it yourself (go build)
  2. Copy .env.exampleto .env and fill it in (you can also use environment variables)
  3. Run it!

Using a webhook

To use a webhook, set the webhook-related variables. If you don't, long-polling will be used.

Example with Hookdeck:

  1. Copy your https://events.hookdeck.com/e/... URL to WEBHOOK_PUBLIC_URL variable
  2. Set a webhook port (e.g. 41320) to PORT
  3. Set WEBHOOK_URL_PATH to a custom path
    1. This is where the internal webhook server will listen on. Gotgbot does not support an empty path sadly.
    2. For Hookdeck, set "Destionation Type" to "CLI" and insert your path
  4. Use the Hookdeck CLI: hookdeck listen 41320 [SOURCE]

More options

Set the following variables to any value (like "1") to enable them:

  • PRINT_MSGS: Print all messages the bot receives to the terminal
  • PRETTY_PRINT_LOG: Pretty print log
  • DEBUG: Enable debug logs (verbose, contains secrets!)
  • IGNORE_SQL_MIGRATION: Ignore the SQL migration feature when you want to migrate yourself (for example with PlanetScale since it doesn't support foreign key references).

gobot's People

Contributors

brawl345 avatar dependabot[bot] avatar

Stargazers

 avatar

Watchers

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