GithubHelp home page GithubHelp logo

grachale / telegram_bot_ads Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 287 KB

The script defines a Telegram bot that allows users to schedule and manage advertisements. It utilizes the Telebot library for the Telegram Bot API, Schedule for scheduling tasks, and psycopg2 for interacting with the PostgreSQL database.

Python 100.00%
postgresql psycopg2 python scheduling telebot telegram-bot thread json

telegram_bot_ads's Introduction

Telegram Bot Server for Scheduled Adds

The script app/src/main.py defines a Telegram bot that allows users to schedule and manage advertisements. It utilizes the Telebot library for the Telegram Bot API, Schedule for scheduling tasks, and psycopg2 for interacting with the PostgreSQL database.

Features

  • User authentication
  • Creating and scheduling new advertisements
  • Displaying user and advertisement information
  • Deleting users or advertisements
  • Storing adds and users in PostgreSQL database.

Dependencies

  • Telebot
  • Schedule
  • Psycopg2
  • Tabulate

How to Run Server

To run the script go to the app/src directory, provide it with a configuration file path as a command-line argument:

python main.py <config_file>

The configuration file should be in JSON format and include the token for the Telegram Bot API, as well as the configuration for the PostgreSQL database. Example of usage (must be executed in the app/src directory):

python main.py ../configs/config.json

How to Run Tests

pytest

Before running the server and tests, ensure you have the required dependencies installed, started PostgreSQL database with correct configuration as you have provided as a command-line argument - <config_file>.

telegram_bot_ads's People

Contributors

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