gobot

command module
v0.0.0-...-eb4b608 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 20, 2023 License: Unlicense Imports: 8 Imported by: 0

README

Gobot

Build Deploy to Koyeb

Multi-purpose bot for the Telegram Messenger based on Telebot 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. Choose a webhook port (e.g. 41320) - be careful, no error will be shown if the port is already in use (limitation of telebot)!
  3. 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).

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL