Giter Club home page Giter Club logo

asmagic's Introduction

ASMagic

Short introduction

This bot has been created with ❤️ by @jan123 to help people administrate their groups, and includes many useful tools.

MagicAntiSpam bot was born as a python telebot it has been turned into an administration bot.

MagicAntiSpam on Telegram:


Setup

List of required packages:

  • python2.7
  • redis-server

You will need some other Python modules too, which can be (and should be) installed through the Python package manager(pip)

Installation

You can easily install MagicAntiSpam by running the following commands:

# Tested on Ubuntu 16.04

$ wget https://raw.githubusercontent.com/MagicNews/ASMagic/master/install.sh
$ bash install.sh

or

# Tested on Ubuntu 14.04, 15.04 and 16.04, Debian 7, Linux Mint 17.2

$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install python2.7 python-pip

# We are going now to install the required Python modules

$ pip install requests
$ pip install redis

# Clone the repository and give the launch script permissions to be executed

$ git clone https://github.com/MagicNews/ASMagic.git
$ cd ASMagic
$ sudo chmod 777 launch.sh
$ mv ./usr/local/lib/python2.7/dist-packages/telebot /

Other things to check before running the bot:

First of all, take a look at your bot settings:

• Make sure privacy is disabled (more info can be found by heading to the official Bots FAQ page). Send /setprivacy to @BotFather to check the current status of this setting.

Before you do anything else, open config.py (in a text editor or nano) and make the following changes:

• Set token to the authentication token that you received from @BotFather.

• Insert your numerical Telegram ID into the sudos table. Other superadmins can be added too. It is important that you insert the numerical ID and NOT a string.

• Insert your admins numerical Telegram ID into the admins table. Other superadmins can be added too. It is important that you insert the numerical ID and NOT a string.

• Set your log_chat (the ID of the chat where the bot will send all the bad requests received from Telegram) and your errors_chat (the ID of the chat that will receive execution errors).

Before you start the bot, you have to start the Redis process.

# Start Redis

$ sudo service redis-server start

Starting the process

To start the bot, run ./launch.sh. To stop the bot, press Control CTRL+C twice.

You may also start the bot with python bot.py, however it will not restart automatically.


Some notes about the database

Everything is stored on Redis, and the fastest way to edit your database is via the Redis CLI.

You can find a backup of your Redis database in /etc/redis/dump.rdb. The name of this file and the frequency of saves are dependent on your redis configuration file.


Credits

eternnoir, for telebot

All the people who reported bugs and suggested new stuffs

Good Luck:)

asmagic's People

Contributors

kingjan123 avatar

Watchers

James Cloos 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.