Merge pull request #1 from AndreiJirohHaliliDev2006/clients
Improve the README + add more stuff
This commit is contained in:
commit
2d13a842fa
|
@ -123,6 +123,8 @@ dmypy.json
|
|||
|
||||
# Pyre type checker
|
||||
.pyre/
|
||||
|
||||
# Pyrogram stuff + Userbot config
|
||||
*.session
|
||||
spam/config.py
|
||||
*.session-journal
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
# Intellivoid SpamProtection Agent Userbot
|
||||
|
||||
An userbot that automates the process of reporting spam for [Spam Protection](https://t.me/SpamProtectionLogs), an antispam service by Intellivoid.
|
||||
|
||||
## Terms of Service
|
||||
|
||||
By using this userbot (or any userbot), you agree:
|
||||
|
||||
- **that this userbot is for agents of SP**. Please join the Support chat and ask us that you want to use this.
|
||||
- **that you must notify Telegram that you're using an userbot**. When or before you first sign up or login you have to send an email with the phone number to <recover@telegram.org>; explaining what will your userbot do. PLEASE DO NOT LIE, just tell them what your userbot will do.
|
||||
- **to the [Telegram TOS](https://telegram.org/tos) and its [API TOS](https://core.telegram.org/api/terms)**.
|
||||
Please be reminded that we're NOT responsible for your TOS violations.
|
||||
|
||||
## Setting up
|
||||
|
||||
### Run Locally
|
||||
|
||||
1. Clone the repository and navigate to it.
|
||||
2. Install dependencies with `pip install -r requirements.txt`.
|
||||
3. Copy the sample config file with `cp spam/config.sample.py spam/config.py` and edit it.
|
||||
4. After setting up, run `python3 -m spam`.
|
||||
|
||||
### With Heroku
|
||||
|
||||
Currently, not yet supported. It will, very soon.
|
||||
|
||||
## Community Support
|
||||
|
||||
If you need help setting up this userbot or gone into trouble while running it, join the [Spam Protection Support][sp-support] chat. You can also report spam there so our friendly operators log and blacklist it for you if you're not an agent yet.
|
||||
|
||||
[sp-support]: https://t.me/SpamProtectionSupport
|
|
@ -0,0 +1,17 @@
|
|||
# Reporting Security Vulnerabilities
|
||||
|
||||
## In the userbot itself
|
||||
|
||||
If you found any security vulnerabilities in the userbot, please contact the maintainers using the following contact information available below.
|
||||
|
||||
| Method | Link |
|
||||
| --- | --- |
|
||||
| Email | <security@intellivoid.net> |
|
||||
| Contacting support directly in Telegram | [@IntellivoidSupport](https://t.me/IntellivoidSupport) |
|
||||
| Contacting one of the maintainers directly | [@Netkas](https://t.me/Netkas), [@pokurt](https://t.me/pokurt), [@nicuuut](https://t.me/nicuuut)
|
||||
|
||||
Your help in finding security issues will be fully recognized.
|
||||
|
||||
## In the Telegram API in general
|
||||
|
||||
For reporting security issues in the API in general, please [see this page](https://telegram.org/faq#q-what-if-my-hacker-friend-says-they-could-decipher-telegram-mes) instead.
|
|
@ -0,0 +1,2 @@
|
|||
pyrogram
|
||||
asyncio-dev
|
|
@ -15,7 +15,7 @@ ENABLE = Config.ENABLE
|
|||
|
||||
# if version < 3.6, stop bot.
|
||||
if sys.version_info[0] < 3 or sys.version_info[1] < 6:
|
||||
logging.error("You MUST have a python version of at least 3.6! Multiple features depend on this. Bot quitting.")
|
||||
logging.error("You MUST have a python version of at least 3.6! Multiple features depend on this. Bot quitting...")
|
||||
quit(1)
|
||||
|
||||
|
||||
|
@ -29,10 +29,10 @@ if ENABLE:
|
|||
|
||||
Command = Config.Command
|
||||
else:
|
||||
print('Enable me first in config.py')
|
||||
print('Enable me first in config.py!')
|
||||
|
||||
if user1_api_id and user1_api_hash:
|
||||
clients += [Client("spambot", api_id=user1_api_id, api_hash=user1_api_hash)]
|
||||
clients += [Client("SpamProtectionAgentBot", api_id=user1_api_id, api_hash=user1_api_hash)]
|
||||
|
||||
|
||||
# if user2_api_id and user2_api_hash:
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
# This file is an template for configuring your SpamProtectionAgent Userbot.
|
||||
# Duplicate this file and save as config.py.
|
||||
|
||||
# To run the userbot, make this variable defined. DO NOT LEAVE IT BLANK!
|
||||
ENABLE = ""
|
||||
|
||||
# Need to debug stuff? Enable this one to show debug logs which might contains
|
||||
# senstive information.
|
||||
LOGGER = ""
|
||||
|
||||
# Command prefix for userbot commands.
|
||||
Command = "!"
|
||||
|
||||
# ID and Hash for first user.
|
||||
# Get one from https://my.telegram.org/apps
|
||||
user1_api_id = ""
|
||||
user1_api_hash = ""
|
||||
user1_session_string = ""
|
|
@ -96,7 +96,7 @@ async def whois(client, message):
|
|||
try:
|
||||
user = await client.get_users(get_user)
|
||||
except PeerIdInvalid:
|
||||
await message.edit("I don't know that User.")
|
||||
await message.edit("I don't know that User. Forward their messages to me (only if forward privacy enabled) and try again.")
|
||||
await sleep(2)
|
||||
await message.delete()
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue