╭─ scp
├──── core / clients - filters - functions
├─────── # core files
├──── database
├─────── # a cache memory database
├──── plugins / bot - private - user
├─────── # the plugins directory
├──── utils
╰─────── # few helper scripts laying around for plugins
- a brain
- python==3.9.2
- clone this repository with
git clone
with--recursive
flag and change directory to the root of the project - this project only works on python 3.9.2. I suggest using pyenv on unix or pyenv-win on windows to install version 3.9.2
- create a
venv
withpython -m venv venv
and activate thevenv
- install all modules in requirements with
python -m pip install -r requirements.txt
andpython -m pip install -r session/requirements.txt
- move config sample from
config.ini.sample
toconfig.ini
and fill in the configs
[pyrogram]
api_id = API_ID from my.telegram.org
api_hash = API_HASH from my.telegram.org
test_mode = 0
[scp-5170]
sudolist = List of users you want to have to control your userbot (seperated by spaces)
prefixes = Command Trigger prefixes (seperated by spaces)
logchannel = a channel you create with your bot and user inside it as administrator
ignoregroups = IDs of groups you want to disable bot from working (seperated by spaces)
plugins = Plugins directories (seperated by spaces)
- create session for user and bot
- user:
python -m session -s scp-user
- bot :
python -m session -s scp-bot -t {bot_token}
- user:
- all done. run the userbot with
hy -m scp
as you know SCP-5170 is using a Customized Client around Pyrogram library.
therefore a plugin can be very simple to make and import into scp/plugins/private
directory:
scp.bot - The Bot Client
scp.user - The User Client
- an Example plugin the echo to a command with
(*prefix)hello
:
from scp import user
@user.on_message(
user.filters.sudo
& user.filters.command('hello')
)
async def _(_, message: types.Message):
return await message.reply('hello')
(import [scp[user]])
(with-decorator (
user.on_message (user.filters.command "hello"))
(defn/a _ [_ message]
(return (await (message.reply "hello")))))
or
(import [scp[user]])
(defn/a echo-hello [_ message]
(return (await (message.reply "hello"))))
(user.add_handler
:handler (user.handlers.MessageHandler
:callback echo-hello
:filters (& user.filters.me (bot.filters.command "hello" :prefixes "/") bot.filters.private)))
-
why given that name? the name speaks to itself,
the Pattern Screamer
-
will there ever be a Heroku or Fly.io support...? just use localhost, trust me.
-
Why does it look like kantek? i always loved it, therefore i did add KanteX to globally use in this userbot
- hylang - hy team <3
- Dan - pyrogram
- Fluffy Shark - QR Code session generator Script
- Kneesocks - 13 year old with multiple police records (also eval module is originally by him)
- Davide Goggles - spam check and automatic logging with extra pineapple toppings
and everyone who built awesome modules that are being used by this project