Skip to content

ssalvatori/zbot-telegram

Repository files navigation

zbot-telegram

Build Status Coverage Status Go Report Card

Features

Requirements

Setup

You must set the ZBOT_CONFIG_FILE environment variable with the path to the configuration file

  • ZBOT_CONFIG_FILE : Path to the configuration file (default ./zbot.conf)

Configuration File

zbot:
  token: <TELEGRAM_TOKEN>
  ignore_duration: 300
  ignore: true
  level: false
db:
  engine: sqlite
  name: db_name
  file: path_to_sqlite_file.db
  host: 127.0.0.1
  port: 3306
  username: db_username 
  password: db_password
webhook:
  disable: true
  port: 13371
  auth:
    - channel: channel1
      id: 1234
      token: <YOUR_SECURE_TOKEN>
    - channel: channel2
      token: <YOUR_SECURE_TOKEN>s  
commands:  
  learn:
    disabled:
      - zbot_dev
  disabled:
    - ignore
    - level
    - forget
modules:
  path: ./modules/
  list:
    - key: crypto
      file: cypto
      description: get some crypto data
    - key: test
      file: test
      description: test module
    - key: temp
      file: temp.sh
      description: get weather info
    - key: plex
      file: plex2.py
      description: get plext information

Database Schemas

GORM, will creat all the schemas and migrations

Development

docker build -t zbot-telegram -f Dockerfile .
docker run --rm --name zbot-telegram -v ${PWD}/modules:/app/modules -v ${PWD}/zbot.conf:/app/zbot.conf -e ZBOT_CONFIG_FILE=/app/zbot.conf zbot-telegram:latest