Skip to content
Permalink
Browse files

simplified A LOT

  • Loading branch information...
Pitasi committed Aug 14, 2016
1 parent 5527cfc commit 5fada8081102bc767894c6b622ca51a12ca35387
Showing with 100 additions and 1,296 deletions.
  1. +1 −0 .gitignore
  2. +7 −56 README.md
  3. +0 −182 aux.py
  4. +0 −48 boot.py
  5. +0 −47 botan.py
  6. +0 −202 db_aux.py
  7. +0 −47 l10n/ar.json
  8. +0 −1 l10n/de.json
  9. +0 −52 l10n/en.json
  10. +0 −47 l10n/es.json
  11. +0 −47 l10n/it.json
  12. +0 −551 main.py
  13. +0 −15 offline_mode.py
  14. +0 −1 replies.json
  15. +92 −0 tagalert.py
@@ -0,0 +1 @@
userdb
@@ -1,5 +1,5 @@
# TagAlertBot
Telegram bot that notifies users when they are tagged in groups,
Telegram bot that notifies users when they are tagged in groups,
with advanced features and multi-language support.

You can freely user the bot already running: @TagAlertBot (http://telegram.me/tagalertbot)
@@ -14,34 +14,7 @@ This Readme file is a work in progress.
### Privacy
A lot of people asked for what is being logged and what I'm doing with these logs.

Just to be sure, I'm not reading all of your messages, they are a lot and I'm not going to waste my time doing this :)

_So, what I am logging?_ I log every message that triggers the bot: that means commands, tags, and people entering/leaving a group.

_Why you need to log all this stuff?_ I'm doing this just to be sure that bot is safe and not being used for flooding, spamming, etc.

_Where are the logs files?_ There are no logs files. I'm using an auxiliary bot to send to myself the logs.
This way I can be updated in every moment and check for users report even if I am not in front of my computer.

### Commands available

| Command | Description |
| ----------------- | ----------------------------------------------------- |
| /help | Show a presentation message. |
| /enable | Enable notifications for the user. |
| /disable | Disable notifications for the user. |
| /retrieve_[CODE] | Search for the message inside the relative group. |
| /ignore_[CODE] | Ignore notifications from a specific user. |
| /unignore_[CODE] | Unignore notifications from a specific user. |
| /groups | Show a list of groups in which user is known |
| /setlang | Show a list of available languages |
| /donate | Show a PayPal link for donating to dev |
| /sourcecode | Show a link to this repository |
| /feedback | Send a message to dev through the Feedback Bot |
| /ban [ID] | Ban an user from using the bot (admin only) |
| /unban [ID] | Unban an user |
| /stats | Show some statistics |
| /credits | Show credits for bot and translations |
I'm not logging anything.

### Requirements
* Python 3
@@ -51,51 +24,29 @@ sudo apt-get install python3-setuptools
sudo easy_install3 pip
```

* A Redis server __and__ his relative python's module
```bash
sudo apt-get install redis
sudo pip3 install redis
```

* pyTelegramBotAPI module
```bash
sudo pip3 install pyTelegramBotAPI
```

* Six module
```bash
sudo pip3 install six
```

* Three Telegram's bot tokens _(for main bot, log bot, and feedback bot)_
* A Telegram's bot token

[How to obtain a token for telegram](https://unnikked.ga/getting-started-with-telegram-bots/)


### Run the bot
First of all, you need to gather all the scripts in this repository.<br>
In your terminal just:
```bash
git clone https://github.com/pitasi/TagAlertBot
```

Then open the folder just created:
Edit `tagalert.py` with you preferences.

```bash
cd TagAlertBot
```
And make sure `main.py` is executable:
```bash
chmod +x main.py
python3 tagalert.py
```

Finally, to run the bot:
```bash
./main.py
```

### How to be sure the bot doesn't restart or crash

I'm actually using [PM2](https://github.com/Unitech/pm2) to be sure that my bot is turned on, even if some exceptions occurs.

It allows you to keep applications alive forever, to reload them without downtime and to facilitate common system admin tasks.

182 aux.py

This file was deleted.

48 boot.py

This file was deleted.

This file was deleted.

0 comments on commit 5fada80

Please sign in to comment.
You can’t perform that action at this time.