GithubHelp home page GithubHelp logo

sergkh / omega-telegram-bot Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 15 KB

Simple Telegram Bot for Omega2 written in Python 3

License: MIT License

Python 82.07% Shell 17.93%
omega2 telegram-bot python3 omega

omega-telegram-bot's Introduction

omega-telegram-bot

Small and simple Telegram Bot for Omega2 written in Python 3.

Features

  • Files upload and download
  • Can be used without a SD card
  • Accepts messages only from allowed users list
  • Allows to execute bash commands
  • Displays messages on Omega's display
  • Torrents management (using transmission client)
  • Easy to add user commands

Installation on Raspberry Pi

  1. Register a bot using @BotFather.
  2. Run a script
curl -o- -L https://raw.githubusercontent.com/sergkh/omega-telegram-bot/master/raspberry-install.py | sudo bash

Installation on Omega2

  1. Register a bot using @BotFather.
  2. Install Python3 and necessary modules:
# opkg update
# opkg install python3 python3-base python3-codecs python3-logging python3-openssl
  1. Copy bot.py into Omega's root folder:
# cd ~ && wget https://raw.githubusercontent.com/sergkh/omega-telegram-bot/master/bot.py
  1. Create a configuration file: /root/.config/telegram_bot:
# mkdir /root/.config/ && vi /root/.config/telegram_bot

with the following contents:

{ "token": "bot_token", "allowed_users": ["your_username"] }
  1. Copy init.d script into your init.d folder:
# cd /etc/init.d/ && wget https://raw.githubusercontent.com/sergkh/omega-telegram-bot/master/init.d/bot
  1. Enable a service autostart and run it:
# chmod +x /etc/init.d/bot
# /etc/init.d/bot enable 
# /etc/init.d/bot start

omega-telegram-bot's People

Contributors

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