v2.2.11 — Stable

Build Soroush Plus Bots
with Python

A modern, asynchronous Python library for interacting with Soroush Plus — both as a user account and a bot account.
کتابخانه پایتون مدرن و ناهمگام برای تعامل با سروش پلاس — هم کاربر و هم ربات

$ pip install spluspy

Everything You Need

Packed with features for powerful Soroush Plus bots.

همه چیزی که برای ربات‌های قدرتمند سروش پلاس نیاز دارید

⚡

Fully Asynchronous

Built with asyncio. Non-blocking I/O for high-performance concurrent operations.

🔒

No API Key Required

Uses built-in Soroush Plus credentials. Install and start building immediately.

🎙

Event-Driven Handlers

Handle messages, edits, callbacks, inline queries, and more with decorators.

🧩

Composable Filters

Chain filters with & (AND), | (OR), ~ (NOT) for complex conditions.

🎮

Inline & Reply Buttons

Interactive keyboards with URL buttons, callback data, and more.

💬

Conversation API

Multi-step bot dialogs with context managers for interactive flows.

🔎

Finite State Machine

Built-in FSM with multiple storage backends and decorator routing.

🔧

Plugin System

Dynamic plugin loading. Modular architecture that scales.

🧐

Middleware

Pre/post processing of updates. Add logging and rate limiting.

⏰

Built-in Scheduler

Schedule messages and callbacks with interval or one-shot timing.

📦

Multiple Storage Backends

Memory, SQLite, Redis, PostgreSQL — choose what fits.

🚦

Rate Limiting

Token bucket algorithm with automatic flood wait handling.

🎯

AFK Auto-Reply

Smart auto-responder with per-chat rate limiting.

🛠

Chat Administration

Ban, mute, pin, purge — high-level admin API.

📶

Message Mirroring

Real-time message cloning between chats.

📤

File Transfer

Upload/download with progress tracking and chunked transfers.

📄

Sync Wrapper

Use without async/await via spluspy.sync.

📊

Batch Operations

Send, delete, forward multiple messages at once.

Complete API Reference

Every class, method, and parameter documented.

مستندات کامل تمام کلاس‌ها، متدها و پارامترها — به دو زبان

SoroushClient

Main entry point. Inherits from: AccountMethods, AuthMethods, DownloadMethods, DialogMethods, ChatMethods, MessageMethods, UploadMethods, ButtonMethods, UpdateMethods, MessageParseMethods, UserMethods, ExtraMethods
نقطه ورود اصلی. از تمام متدهای بالا ارث‌بری می‌کند.

SoroushClient(session, api_id=1030400, api_hash="...", *, connection=ConnectionWebSocket, ...) -> SoroushClient
Create a new client. Uses built-in API credentials by default. Supports SQLiteSession, MemorySession, or custom Session.
ساخت کلاینت جدید. به‌طور پیش‌فرض از credentials داخلی استفاده می‌کند.
ParamTypeDescription
sessionstr | SessionSession name or instance / نام یا نمونه نشست
api_idintAPI ID (built-in default)
api_hashstrAPI hash (built-in default)
connectionConnectionTransport (default: WebSocket)
flood_sleep_thresholdintAuto-sleep on FloodWait (default: 60)
request_retriesintNumber of retries (default: 5)
auto_reconnectboolAuto-reconnect on disconnect (default: True)
sequential_updatesboolProcess updates sequentially (default: False)
receive_updatesboolReceive updates from server (default: True)
async connect() -> None
Connect to Soroush Plus server.
اتصال به سرور سروش پلاس.
async disconnect() -> None
Disconnect and clean up resources.
قطع اتصال و پاکسازی منابع.
is_connected() -> bool
Check if connected. Synchronous.
بررسی اتصال. همزمان.
run_until_disconnected() -> None
Run the event loop until disconnected. Handles reconnections.
اجرای حلقه رویداد تا قطع اتصال. مدیریت reconnect.
add_event_handler(callback, event) -> None
Register an event handler.
ثبت هندلر رویداد.
remove_event_handler(callback, event=None) -> int
Remove one or all handlers for a callback.
حذف یک یا همه هندلرهای یک callback.
async get_me(input_peer=False) -> User | InputPeerUser
Get the current logged-in user.
دریافت کاربر فعلی.
async is_bot() -> bool
Return True if logged in as a bot.
بررسی ربات بودن.
async is_user_authorized() -> bool
Check if the user is authorized.
بررسی احراز هویت.
async get_entity(entity) -> User | Chat | Channel
Turn username/ID/phone into a full entity.
تبدیل شناسه به موجودیت کامل.
async get_input_entity(peer) -> InputPeer
Get InputPeer version of an entity.
دریافت InputPeer موجودیت.
async get_peer_id(peer, add_mark=True) -> int
Get the marked ID of a peer.
دریافت ID علامت‌دار همتا.

Message

Represents a message. Inherits from ChatGetter, SenderGetter, TLObject.
نمایانگر پیام. از ChatGetter و SenderGetter ارث‌بری می‌کند.

PropertyTypeDescription
idintMessage ID
textstrFormatted text (Markdown/HTML)
raw_textstrRaw text without formatting
datedatetimeTimestamp
chat_idintChat ID
sender_idintSender ID
senderUser | NoneResolved sender
chatChat | Channel | UserResolved chat
is_privateboolPrivate chat?
is_groupboolGroup or megagroup?
is_channelboolChannel?
is_replyboolIs a reply?
forwardForwardForward info
mediaMessageMediaMedia object
media_typeMessageMediaTypePHOTO, VIDEO, DOCUMENT, etc.
photoPhotoPhoto media
documentDocumentDocument media
audioDocumentAudio file
voiceDocumentVoice note
videoDocumentVideo file
gifDocumentGIF animation
stickerDocumentSticker
fileFileHelper for file attributes
viewsintView count
forwardsintForward count
repliesMessageRepliesReply info
reactionsMessageReactionsReaction info
edit_datedatetimeLast edit time
grouped_idintAlbum group ID
outboolOutgoing?
pinnedboolPinned?
ttl_periodintSelf-destruct TTL
async reply(text=None, *, buttons=None, file=None, **kwargs) -> Message
Reply to this message.
پاسخ به این پیام.
async edit(text=None, *, delay=0, **kwargs) -> Message
Edit this message's text or media.
ویرایش متن یا رسانه این پیام.
async delete() -> bool
Delete this message.
حذف این پیام.
async forward(to_chat_id) -> Message
Forward this message.
فوروارد این پیام.
async copy(to_chat_id) -> Message
Copy without forward header.
کپی بدون هدر فوروارد.
async pin(notify=True) -> bool
Pin this message.
سنجاق کردن پیام.
async react(emoji) -> bool
React with an emoji.
واکنش با ایموجی.
async mark_read() -> bool
Mark as read.
علامت خواندن.
async download(file=None, *, progress_callback=None) -> str | bytes
Download attached media.
دانلود رسانه پیوست.
async get_reply_message() -> Message | None
Fetch the message this replies to.
دریافت پیامی که به آن پاسخ داده شده.

Filters

Composable with & (AND), | (OR), ~ (NOT).
قابل ترکیب با عملگرهای & و | و ~

FilterMatchesتوضیحات
filters.privatePrivate chatsچت‌های خصوصی
filters.groupGroups / supergroupsگروه‌ها
filters.channelChannelsکانال‌ها
filters.meSent by youارسال شده توسط شما
filters.textText messagesپیام‌های متنی
filters.linkContains URLحاوی لینک
filters.mediaAny mediaهر رسانه‌ای
filters.photoPhotosعکس‌ها
filters.videoVideosویدیوها
filters.documentDocumentsاسناد
filters.audioAudio filesفایل صوتی
filters.voiceVoice notesیادداشت صوتی
filters.stickerStickersاستیکرها
filters.animationGIF animationsگیف‌ها
filters.new_chat_membersNew members joinedعضو جدید
filters.left_chat_memberMember leftعضو خارج شد
filters.command(commands, prefixes="/") -> CommandFilter
Match /command or !command. Supports multiple prefixes.
تطابق با /command یا !command.
filters.regex(pattern) -> RegexFilter
Match by regex. Stores match in event.pattern_match.
تطابق با عبارت باقاعده.
filters.word(words) -> WordFilter
Match if any word in the list is present in the message.
تطابق اگر هر کلمه‌ای از لیست در پیام باشد.

Events

@client.on_message(filters=None) -> Decorator
Register a handler for NewMessage events.
ثبت هندلر برای رویداد پیام جدید.
@client.on_edited_message(filters=None) -> Decorator
Register a handler for MessageEdited events.
ثبت هندلر برای رویداد ویرایش پیام.
@client.on_deleted_messages(filters=None) -> Decorator
Register a handler for MessageDeleted events.
ثبت هندلر برای رویداد حذف پیام.
@client.on_chat_action(filters=None) -> Decorator
Register a handler for ChatAction events (join/leave/pin/...).
ثبت هندلر برای رویدادهای عملیات چت.
@client.on_user_status(filters=None) -> Decorator
Register a handler for UserUpdate (online/offline/typing).
ثبت هندلر برای تغییر وضعیت کاربر.
@client.on_raw_update(types=None) -> Decorator
Register a handler for raw, unparsed updates.
ثبت هندلر برای رویدادهای خام.
@client.on_group(filters=None) -> Decorator
Alias for on_message(filters.group & filters).
مخفف برای پیام‌های گروهی.
@client.on_channel(filters=None) -> Decorator
Alias for on_message(filters.channel & filters).
مخفف برای پیام‌های کانال.
@client.on_me(filters=None) -> Decorator
Alias for on_message(filters.me & filters).
مخفف برای پیام‌های ارسالی خودتان.
events.Album(chats=None, func=None) -> Album
Event for album (grouped media). event.messages contains the list.
رویداد آلبوم (چند رسانه‌ای گروهی).
events.Raw(types=None, func=None) -> Raw
Raw update event. Pass types to filter by TL type.
رویداد خام. با types می‌توان فیلتر کرد.

Conversation

Used with async with client.conversation(peer) as conv:
استفاده با async with

async send_message(text, **kwargs) -> Message
Send a message in this conversation.
ارسال پیام در این مکالمه.
async get_response(timeout=None) -> Message
Wait for the next incoming message.
انتظار پیام بعدی.
async get_reply(timeout=None) -> Message
Wait for a message that explicitly replies to your last message.
انتظار پیامی که به‌طور مستقیم پاسخ داده باشد.
async get_edit(timeout=None) -> Message
Wait for an edit to your last message.
انتظار ویرایش پیام.
async wait_read(timeout=None) -> bool
Wait until your message is marked as read.
انتظار تا خوانده شدن پیام.
async wait_event(event, timeout=None) -> Event
Wait for a custom event.
انتظار رویداد سفارشی.
mark_read(message=None) -> bool
Mark messages as read.
علامت خواندن.
cancel() -> None
Cancel the conversation. Synchronous.
لغو مکالمه. همزمان.

Button

Button.inline(text, data=None) -> KeyboardButtonCallback
Inline button with callback data (max 64 bytes).
دکمه اینلاین با داده بازخورد.
Button.url(text, url=None) -> KeyboardButtonUrl
Button that opens a URL.
دکمه برای باز کردن لینک.
Button.text(text, *, resize=None, single_use=None, selective=None, persistent=None, placeholder=None) -> Button
Reply keyboard button.
دکمه کیبورد ریپلای.
Button.request_location(text, **kwargs) -> Button
Button that requests the user's location.
درخواست موقعیت کاربر.
Button.request_phone(text, **kwargs) -> Button
Button that requests the user's phone.
درخواست شماره تلفن.
Button.request_poll(text, *, force_quiz=False, **kwargs) -> Button
Button that requests the user to create a poll.
درخواست ساخت نظرسنجی.
Button.clear(selective=None) -> ReplyKeyboardHide
Clear the reply keyboard.
پاک کردن کیبورد.
Button.force_reply(single_use=None, selective=None, placeholder=None) -> ReplyKeyboardForceReply
Force a reply to the message.
اجبار به پاسخ.
Button.buy(text) -> KeyboardButtonBuy
Buy button for payments.
دکمه خرید.
Button.game(text) -> KeyboardButtonGame
Game button.
دکمه بازی.
Button.switch_inline(text, query='', same_peer=False) -> KeyboardButtonSwitchInline
Switch to inline query.
تغییر به جستجوی اینلاین.

Dialog Methods

iter_dialogs(limit=None, *, offset_date=None, offset_id=0, offset_peer=InputPeerEmpty(), ignore_pinned=False, ignore_migrated=False, folder=None) -> AsyncGenerator[Dialog]
Iterate over dialogs (conversations).
پیمایش دیالوگ‌ها.
async get_dialogs(limit=None, **kwargs) -> TotalList[Dialog]
Get all dialogs as a list.
دریافت لیست دیالوگ‌ها.
iter_drafts(entity=None) -> AsyncGenerator[Draft]
Iterate over drafts.
پیمایش پیش‌نویس‌ها.
async edit_folder(entity, folder, *, unpack=None) -> Updates
Move dialogs to a folder (archive/unarchive).
انتقال دیالوگ به پوشه.
async delete_dialog(entity, *, revoke=False) -> Updates | None
Delete a dialog (leave chat).
حذف دیالوگ (خروج از چت).
conversation(entity, *, timeout=60, total_timeout=None, max_messages=100, exclusive=True) -> Conversation
Create a conversation context manager.
ساخت مدیر زمینه مکالمه.

Chat Methods

iter_participants(entity, limit=None, *, search='', filter=None) -> AsyncGenerator[User]
Iterate over chat participants.
پیمایش اعضای چت.
async get_participants(entity, limit=None, **kwargs) -> TotalList[User]
Get all participants as a list.
دریافت لیست اعضا.
iter_admin_log(entity, limit=None, *, search=None, admins=None, **filters) -> AsyncGenerator[AdminLogEvent]
Iterate over admin log events.
پیمایش لاگ مدیریتی.
async edit_admin(entity, user, *, change_info=None, post_messages=None, delete_messages=None, ban_users=None, invite_users=None, pin_messages=None, add_admins=None, anonymous=None, is_admin=None, title=None) -> Updates
Edit admin permissions.
ویرایش دسترسی‌های ادمین.
async edit_permissions(entity, user=None, until_date=None, *, view_messages=True, send_messages=True, send_media=True, ...) -> Updates
Edit user restrictions (ban/mute).
ویرایش محدودیت‌های کاربر.
async leave_chat(entity) -> Updates | bool
Leave a chat or channel.
خروج از چت.
async kick_participant(entity, user) -> Message | None
Kick a user from a chat.
اخراج کاربر از چت.
async get_permissions(entity, user=None) -> ParticipantPermissions | ChatBannedRights
Get permissions of a user or default rights.
دریافت دسترسی‌های کاربر.
action(entity, action, *, delay=4, auto_cancel=True) -> ChatAction | Coroutine
Send a chat action (typing, uploading, etc.).
ارسال وضعیت چت (تایپ، آپلود و...).

Upload Methods

async upload_file(file, *, part_size_kb=None, file_size=None, file_name=None, progress_callback=None) -> InputFile
Upload a file to Soroush Plus servers.
آپلود فایل به سرور سروش پلاس.
async send_file(entity, file, *, caption=None, force_document=False, progress_callback=None, reply_to=None, attributes=None, thumb=None, voice_note=False, video_note=False, buttons=None, silent=None, schedule=None, ttl=None, **kwargs) -> Message | list[Message]
Send a file (photo, video, document, audio, etc.). Supports albums with a list.
ارسال فایل (عکس، ویدیو، سند و...). پشتیبانی از آلبوم.
async send_photo(chat_id, photo, *, caption=None, reply_to=None, **kwargs) -> Message
Send a photo (convenience wrapper).
ارسال عکس.
async send_video(chat_id, video, *, caption=None, reply_to=None, **kwargs) -> Message
Send a video.
ارسال ویدیو.
async send_audio(chat_id, audio, *, caption=None, reply_to=None, **kwargs) -> Message
Send an audio file.
ارسال فایل صوتی.
async send_voice(chat_id, voice, *, caption=None, reply_to=None, **kwargs) -> Message
Send a voice note.
ارسال یادداشت صوتی.
async send_document(chat_id, document, *, caption=None, reply_to=None, **kwargs) -> Message
Send a document.
ارسال سند.
async send_reaction(chat_id, message_id, emoji, **kwargs) -> Updates
Add a reaction to a message.
افزودن واکنش به پیام.

Download Methods

async download_media(message, file=None, *, thumb=None, progress_callback=None) -> str | bytes | None
Download media from a message.
دانلود رسانه از پیام.
async download_file(input_location, file=None, *, part_size_kb=None, file_size=None, progress_callback=None, dc_id=None, key=None, iv=None) -> bytes | str
Low-level file download.
دانلود فایل سطح پایین.
iter_download(file, *, offset=0, stride=None, limit=None, chunk_size=None, request_size=512*1024, file_size=None, dc_id=None) -> AsyncGenerator[bytes]
Stream a file download chunk by chunk.
پخش فایل به صورت تکه‌تکه.
async download_profile_photo(entity, file=None, *, download_big=True) -> str | bytes | None
Download a user/chat/channel profile photo.
دانلود عکس پروفایل.

Extra Methods

async copy_message(chat_id, from_chat_id, message_id, **kwargs) -> Message
Copy a message without "Forwarded from" tag.
کپی پیام بدون تگ فوروارد.
async read_chat_history(chat_id) -> bool
Mark all messages in a chat as read.
علامت خواندن همه پیام‌های چت.
async get_chat(chat_id) -> ChatFull | ChannelFull
Get full chat information.
دریافت اطلاعات کامل چت.
async get_user(user_id) -> User | None
Get full user information.
دریافت اطلاعات کامل کاربر.
async create_group(title, users) -> Updates
Create a new group chat.
ساخت گروه جدید.
async create_channel(title, about='', megagroup=False) -> Updates
Create a channel or megagroup.
ساخت کانال یا سوپرگروه.
async archive_chat(chat_id) -> Updates
Archive a chat.
بایگانی چت.
async unarchive_chat(chat_id) -> Updates
Unarchive a chat.
خروج از بایگانی چت.
async join_chat(chat) -> Chat | Updates
Join a chat by invite link or username.
پیوستن به چت با لینک یا نام کاربری.
async update_profile(first_name=None, last_name=None, about=None) -> User
Update current user's profile.
به‌روزرسانی پروفایل کاربر فعلی.
async update_username(username) -> User
Update current user's username.
تغییر نام کاربری.
async block_user(user_id) -> bool
Block a user.
مسدود کردن کاربر.
async unblock_user(user_id) -> bool
Unblock a user.
رفع مسدودیت کاربر.

Auth Methods

start(phone=None, password=None, *, code_callback=None, first_name='New User', last_name='', max_attempts=3) -> Self
Interactive authentication flow.
جریان احراز هویت تعاملی.
async sign_in(phone=None, code=None, *, password=None, phone_code_hash=None) -> User | None
Sign in with phone and code, or password.
ورود با شماره و کد یا رمز.
async sign_up(code, first_name, last_name='', *, phone=None, phone_code_hash=None) -> User
Sign up (not supported for third-party apps).
ثبت‌نام (پشتیبانی نمی‌شود).
async send_code_request(phone, *, code_callback=None) -> SentCode
Send a confirmation code to the phone.
ارسال کد تأیید به تلفن.
async log_out() -> bool
Log out and delete the session.
خروج و حذف نشست.
async edit_2fa(current_password=None, new_password=None, *, hint='', email=None, email_code_callback=None) -> bool
Enable or change two-factor authentication.
فعال یا تغییر احراز هویت دو مرحله‌ای.
async qr_login(ignored_ids=None) -> QRLogin
Login via QR code (not supported for bots).
ورود با QR (پشتیبانی نمی‌شود).

Account Methods

takeout(finalize=True, *, contacts=None, users=None, chats=None, megagroups=None, channels=None, files=None, max_file_size=None) -> TakeoutClient
Create a takeout session for data export (lower flood limits).
ایجاد نشست Takeout برای خروجی داده.
async end_takeout(success) -> bool
Finish the current takeout session.
پایان نشست Takeout.

FSM (Finite State Machine)

State(name=None) -> State
Define a state. Auto-named from class attribute.
StateTransition(target, guard=None) -> StateTransition
Define a transition with optional async guard.
FSMContext.get_state() / set_state(state) / get_data() / set_data(**kwargs) / get(key) / set(key, value) / reset() / finish()
Context for user state and data.
StateMachine.state(state) -> Decorator
Register a handler for a specific state.
StateMachine.fallback() -> Decorator
Register a handler for unmatched states.

Storage Backends

BackendClassDescription
MemoryMemoryStorage()In-memory, non-persistent
SQLiteSQLiteStorage(path)Persistent file-based
RedisRedisStorage(url)Shared state (requires redis)
PostgreSQLPostgresStorage(dsn)Enterprise (requires asyncpg)
get_storage(backend="memory", **kwargs) -> Storage
Factory function: "memory", "sqlite", "redis", "postgres".

Middleware

Middleware.on_update(update, handler) -> Any
Abstract method. Process every update.
MiddlewareManager.add(mw) / remove(mw) / execute(update, handler)
Manage middleware chain.
RateLimitMiddleware(rate=1.0, capacity=1.0)
Rate limiting middleware with token bucket.

AfkManager

AfkManager(client, message="...", *, cooldown=60.0, max_replies=10, only_private=False)
AFK auto-responder manager.
set_afk(enabled, *, reason="", message=None) -> None
Enable/disable AFK mode.
async handle(message) -> bool
Process incoming message while AFK.
get_stats() -> dict
Returns AFK stats.

ChatAdmin

async ban_user(chat, user, until_date=None) -> Updates
async mute_user(chat, user, until_date=None) -> Updates
async unmute_user(chat, user) -> Updates
async purge_messages(chat, limit=100) -> AffectedMessages | None
async bulk_action(chat, action, user_ids, *, delay=0.5) -> dict[int, bool]
async get_admin_log(chat, *, limit=100) -> list[dict]

MessageMirror

add_route(source, targets, *, strip_forward=True, add_prefix=None) -> None
async start() / async stop()
get_stats() -> dict

MessageScheduler

schedule_message(chat_id, text, *, delay=None, when=None, name=None) -> ScheduledTask
schedule_interval(chat_id, text, *, interval, name=None) -> ScheduledTask
schedule_callback(name, callback, *, delay=None, interval=None) -> ScheduledTask
cancel(name) -> bool
async start() / async stop()

Utils

LRUCache(max_size=1024, default_ttl=None)
Thread-safe LRU cache with TTL.
RateLimiter(default_rate=1.0, default_capacity=1.0)
Token bucket rate limiter.
ChatLockManager()
Per-chat locking.
ProgressTracker(callback=None, update_interval=0.1)
Track file transfer progress.
batch_send / batch_delete / batch_forward
Efficient batch operations.
setup_logging(level, log_file, log_dir, errors_only=False)
Configure logging.
check_for_update() -> str | None
Check PyPI for newer version.

Error Hierarchy

ExceptionDescription / توضیحات
SplusPyErrorBase for all errors
RPCErrorAPI errors (code + message)
FloodWaitErrorFlood wait. Has .seconds
FloodPremiumWaitErrorPremium flood wait
SlowModeWaitErrorSlow mode wait
UnauthorizedErrorAuth required
ForbiddenErrorPermission denied
BadRequestErrorBad request
ServerErrorInternal server error
TimedOutErrorTimeout
InvalidDCErrorWrong data center
AuthKeyDuplicatedErrorSession used from two IPs
SessionExpiredErrorSession expired
PhoneNumberInvalidErrorInvalid phone
PhoneCodeInvalidErrorInvalid code
PasswordHashInvalidErrorInvalid password
MessageIdInvalidErrorInvalid message ID
MessageNotModifiedErrorMessage content not changed
ChannelPrivateErrorChannel is private
UserNotParticipantErrorUser not in chat
BotMethodInvalidErrorMethod not for bots
FloodWaitErrorAlias for FloodWait
TakeoutInitDelayErrorTakeout requires wait
FileReferenceExpiredErrorFile reference expired
LocationInvalidErrorInvalid file location
MediaInvalidErrorInvalid media
PhotoInvalidDimensionsErrorPhoto dimensions invalid
StickerEmojiInvalidErrorInvalid sticker emoji

Start in Seconds

Get a working Soroush Plus bot in just a few lines.

در چند خط کد، یک ربات سروش پلاس بسازید

bot.py
from spluspy import SoroushClient, filters

bot = SoroushClient("my_session")

@bot.on_message(filters.command("start"))
async def start_handler(client, message):
    await message.reply("Hello!")

@bot.on_message(filters.private & filters.text)
async def echo(client, message):
    await message.reply(f"You said: {message.text}")

bot.run_until_disconnected()
conversation.py
async with bot.conversation(chat_id) as conv:
    await conv.send_message("What's your name?")
    response = await conv.get_response()
    await conv.send_message(f"Nice to meet you, {response.text}!")

Installation

Install with the features you need.

SplusPy را با قابلیت‌های مورد نیاز نصب کنید

Basic

pip install spluspy

Core library / کتابخانه اصلی

Fast Encryption

pip install spluspy[speed]

Performance optimized / بهینه عملکرد

Redis Backend

pip install spluspy[redis]

Shared state storage / ذخیره‌سازی مشترک

PostgreSQL

pip install spluspy[postgres]

Enterprise storage / ذخیره‌سازی سازمانی

All Dependencies

pip install spluspy[all]

Everything included / همه چیز

Sync Usage

from spluspy.sync import SoroushClient

No async needed / بدون async

Development Version

pip install git+https://github.com/Itskillmaster/spluspy.git

Latest commits / آخرین تغییرات

🤝 Contributing

We welcome contributions! Read our guidelines.

کمک به توسعه‌ی پروژه — خوش‌آمدید!

  1. Fork the repo & create a new branch
  2. Install dev dependencies: pip install -e .[dev]
  3. Run tests: pytest
  4. Submit a Pull Request with clear description

📖 Full Contributing Guide

📦 Changelog

Recent updates and improvements.

تغییرات اخیر و بهبودها

v2.2.10 (2026-08-25)

  • ✨ Support plain-callable (lambda) filters in on_message and all event decorators
  • 📦 Added Client.leave_all(), Client.get_all_groups(), Client.delete_all_private()
  • 🐛 Fixed get_chat misuse by adding get_entity-based resolution helpers

v2.2.1 (2025-01-15)

  • ✨ Added Message.media_type property
  • 🐛 Fixed auto-reconnect issue on WebSocket
  • 📚 Updated API documentation
  • 🔧 Improved flood wait handling

v2.2.0 (2025-01-01)

  • 🎉 Added Message.reply_photo, reply_video, reply_document, reply_voice, reply_sticker, reply_location, reply_poll, reply_dice
  • 🐛 Fixed Message.forward property
  • 📦 Added SQLite entity cache