[ { "instruction": "یکی رباتی که پیام مارو دوباره برامون می‌فرسته", "input": "", "output": "from rubpy import BotClient\nfrom rubpy.bot import filters\nfrom rubpy.bot.models import Update\n\napp = BotClient(\"bot-token\")\n\n@app.on_update(filters.text, filters.private)\nasync def echo(client, update: Update):\n await update.reply(update.new_message.text)\n\napp.run()" }, { "instruction": "رباتی که به یک چت ایدی پیام سلام دنیا ارسال کنه و بعدش خاموش بشه", "input": "", "output": "from rubpy import BotClient\nimport asyncio\n\napp = BotClient(\"bot-token\")\n\nasync def main():\n await app.start()\n await app.send_message(\"chat_id\", \"Hi there! I'm using **Rubpy**\")\n await app.stop()\n\nasyncio.run(main())" }, { "instruction": "چطور چت ایدی و یا اطلاعات دیگه رو بگیریم؟", "input": "", "output": "from rubpy.bot import BotClient, filters\nfrom rubpy.bot.models import Update\n\nbot = BotClient('your-bot-token')\n\n@bot.on_update(filters.commands('start'))\nasync def handle_start(c: BotClient, update: Update):\n if update.new_message:\n text = (\n \"🆔 شناسه کاربری شما:\\n{user_id}\\n\\n\"\n \"💬 شناسه چت شما:\\n{chat_id}\\n\\n\"\n \"\\n\\n👨‍💻 سورس‌کد این ربات:\\nhttps://rubpy.shayan-heidari.ir/bot_examples/#_4\"\n ).format(\n user_id=update.new_message.sender_id,\n chat_id=update.chat_id\n )\n await update.reply(text)\n\nbot.run()" }, { "instruction": "چطوری انواع فرمت پیام توی روبپای به روبیکا رو ارسال کنیم؟", "input": "", "output": "from rubpy import BotClient\nfrom rubpy.bot import filters\nfrom rubpy.bot.models import Update\n\napp = BotClient(\"BOT_TOKEN\")\n\nTEST_TEXT = \"\"\"🎉 **تست کامل Markdown** 🚀\n\nاین یک متن __ایتالیک__ و این هم --زیرخط دار-- است.\nهمچنین می‌توانیم ~~خط خورده~~ و ||اسپویلر|| داشته باشیم!\n\n> این یک quote چند خطی است\n> که شامل فرمت‌های مختلف می‌شود\n\n```python\ndef test_markdown():\n return \"این یک بلوک کد است\"\n```\n\"\"\"\n\n@app.on_update(filters.text, filters.private)\nasync def markdown_test(client, update: Update):\n await update.reply(TEST_TEXT)\n\n@app.on_update(filters.text, filters.group)\nasync def markdown_group_test(client, update: Update):\n await update.reply(TEST_TEXT + f\"\\n\\n[منشن]({update.new_message.sender_id})\")\n\napp.run()" }, { "instruction": "چطوری از state ها برای مدیریت حالت کاربر در ربات استفاده کنیم؟", "input": "", "output": "from rubpy.bot import BotClient, filters\nfrom rubpy.bot.models import Update\n\napp = BotClient(\"bot-token\")\n\nstate_filter = filters.states(\"awaiting_email\", match_mode=\"exact\", scope=\"user\", auto_clear=True)\n\n@app.on_update(filters.commands(\"start\"))\nasync def start(c, update: Update):\n await state_filter.set_state_for(update, \"awaiting_email\", expire=300)\n await update.reply(\"لطفاً ایمیل خود را ارسال کنید.\")\n\n@app.on_update(filters.commands(\"cancel\"))\nasync def cancel(c, update: Update):\n await state_filter.clear_state_for(update)\n await update.reply(\"جریان لغو شد.\")\n\n@app.on_update(state_filter)\nasync def got_email(c, update: Update):\n text = update.find_key(\"text\")\n await update.reply(f\"ایمیل دریافت شد: {text}\")\n\napp.run()" }, { "instruction": "مثال ربات وبهوک به همراه دکمه‌های اینلاین شیشه‌ای", "input": "", "output": "from rubpy.bot import BotClient, filters\nfrom rubpy.bot.models import Button, InlineMessage, Keypad, KeypadRow, Update\nfrom rubpy.bot.enums import ButtonTypeEnum\nimport asyncio\n\nRUBIKA_TOKEN = \"bot-token\"\nWEBHOOK_URL = \"https://example.com\"\n\nasync def main():\n bot = BotClient(token=RUBIKA_TOKEN, use_webhook=True)\n\n @bot.on_update(filters.commands(\"start\"))\n async def handle_start(client, update: Update):\n await client.send_message(\n chat_id=update.chat_id,\n text=\"Welcome\",\n inline_keypad=Keypad(rows=[\n KeypadRow(buttons=[\n Button(id=\"btn1\", type=ButtonTypeEnum.SIMPLE, button_text=\"Hello\")\n ])\n ])\n )\n\n await bot.run(webhook_url=WEBHOOK_URL, port=8000)\n\nasyncio.run(main())" }, { "instruction": "کد گرفتن تعداد تمامی اعضای گروه", "input": "", "output": "from rubpy import Client\n\nOBJECT_GUID = \"\"\n\nwith Client('get_all_members') as bot:\n next_start_id = None\n total = 0\n\n while True:\n response = bot.get_members(OBJECT_GUID, start_id=next_start_id)\n if not response:\n break\n next_start_id = response.next_start_id\n for m in response.in_chat_members or []:\n total += 1\n\n print(\"Total members:\", total)" }, { "instruction": "رباتی که تمام پیام‌های ادمین را حذف کند و خودش ارسال کند", "input": "", "output": "from rubpy.bot import BotClient, filters\nfrom rubpy.bot.models import Update\n\napp = BotClient(token=\"BOT_TOKEN\")\n\nGROUP_CHAT_IDS = [\"GROUP_CHAT_ID\"]\nADMIN_SENDER_ID = \"USER_SENDER_ID\"\n\n@app.on_update(filters.chat(GROUP_CHAT_IDS) & filters.text)\nasync def handler(client, update: Update):\n if update.new_message.sender_id == ADMIN_SENDER_ID:\n await update.delete()\n await client.send_message(update.chat_id, update.new_message.text)\n\napp.run()" }, { "instruction": "چطوری انواع دکمه‌های شیشه‌ای اینلاین بسازیم؟", "input": "", "output": "from rubpy.bot.models import Button, ButtonLink, JoinChannelData, Keypad, KeypadRow\nfrom rubpy.bot.enums import ButtonTypeEnum, ButtonLinkTypeEnum\n\nkeypad = Keypad(rows=[\n KeypadRow(buttons=[\n Button(\n id=\"1\",\n type=ButtonTypeEnum.LINK,\n button_text=\"عضویت اجباری\",\n button_link=ButtonLink(\n type=ButtonLinkTypeEnum.JoinChannel,\n joinchannel_data=JoinChannelData(username=\"rubikapy\", ask_join=True)\n )\n )\n ])\n])" }, { "instruction": "ساخت نمونه", "input": "", "output": "این کلاس شامل پارامترهایی برای تنظیم برخی تنظیمات است.\nclient\n=\nBotClient\n(\ntoken\n=\n\"YOUR_BOT_TOKEN\"\n,\nrate_limit\n=\n0.5\n,\n# تأخیر بین درخواست‌ها (ثانیه)\nuse_webhook\n=\nFalse\n# True برای وبهوک\n)" }, { "instruction": "پارامترهای سازنده", "input": "", "output": "پارامتر | نوع | پیش‌فرض | توضیحات\ntoken | str | — | توکن صادرشده توسط روبیکا.\nrate_limit | float | 0.5 | حداقل فاصله بین درخواست‌ها برای جلوگیری از محدودیت.\nuse_webhook | bool | False | تعیین حالت اجرا (وب‌هوک یا پولینگ).\ntimeout | float | 10.0 | تایم‌اوت کلی هر درخواست HTTP.\nconnector | aiohttp.TCPConnector | None | اشتراک‌گذاری کانکشن با اپلیکیشن‌های دیگر.\nmax_retries | int | 3 | تعداد تلاش مجدد برای خطاهای قابل بازیابی.\nbackoff_factor | float | 0.5 | ضریب تصاعدی برای تأخیر بین تلاش‌های مجدد.\nretry_statuses | Tuple[int,...] | (408,425,429,500,502,503,504) | کدهای HTTP که باعث تلاش مجدد می‌شوند.\nlong_poll_timeout | float | 30.0 | افزودن تایم‌اوت به درخواست (getUpdates) برای پولینگ طولانی.\nparse_mode | ParseMode \\| str | ParseMode.MARKDOWN | حالت پیش‌فرض قالب‌بندی متن.\nfallback_urls | Sequence[str] | (\"https://botapi.rubika.ir/v3/{}/\",) | URLهای جایگزین در صورت قطعی آدرس اصلی.\nignore_timeout | bool | False | ادامهٔ تلاش در خطاهای Timeout.\nplugins | Sequence[str] | None | فهرست پلاگین‌های فعال شوندهٔ خودکار.\nauto_enable_plugins | bool | False | فعال‌سازی خودکار پلاگین‌ها هنگام start.\nplugin_entry_point_group | str | \"rubpy.plugins\" | گروه entry point برای کشف پلاگین‌ها.\nplugin_manager_class | Type[PluginManager] | PluginManager | کلاس مدیریت پلاگین.\n\nنکته:\nاز کانتکست‌منیجرهای\nasync with BotClient(...)\nو\nwith BotClient(...)\nنیز می‌توان برای مدیریت خودکار\nstart/stop\nاستفاده کرد." }, { "instruction": "شروع بات", "input": "", "output": "متد:\nstart\n\nپارامتر | نوع | توضیحات\n— | — | شروع و آماده سازی BotClient برای ارتباط با API بات روبیکا\n\nشرح کوتاه:\nآماده‌سازی سشن HTTP برای ارسال درخواست‌ها.\n\nبازگشت:\nNone\n(async)" }, { "instruction": "مدیریت پلاگین‌ها", "input": "", "output": "متد | توضیحات\nenable_plugins(identifiers: Optional[Sequence[str]] = None) | پلاگین‌های مشخص‌شده یا فهرست پیش‌فرضِ سازنده را فعال می‌کند. خروجی: List[Plugin].\ndisable_plugins(identifiers: Optional[Sequence[str]] = None) | اگر شناسه ندهید تمام پلاگین‌های فعال غیرفعال می‌شوند.\nregister_plugin(plugin_cls, name=None) | پلاگین جدید را به مدیر داخلی ثبت می‌کند و نام یکتا بازمی‌گرداند.\n\nنکته:\nاین API با سیستم\nentry points\nپایتون سازگار است؛ با فعال بودن\nauto_enable_plugins\nپلاگین‌ها هنگام\nstart\nفعال می‌شوند." }, { "instruction": "مدیریت کیپد چت", "input": "", "output": "edit_chat_keypad\n: برای تغییر کیبورد نمایشی چت.\nmiddleware\n+\nprocess_update\n: امکان ساخت کیبوردهای تعاملی پیچیده را فراهم می‌کند." }, { "instruction": "فرمت‌دهی متن و متادیتا", "input": "", "output": "_apply_text_formatting\n: براساس\nparse_mode\nمتن را به Markdown داخلی تبدیل کرده و\nmetadata\nرا (در صورت ارسال\nMetadata\nاز rubpy.bot.models) به payload اضافه می‌کند.\nحالت‌های معتبر:\nParseMode.MARKDOWN\n,\nParseMode.HTML\n, یا\nNone\n(متن خام)." }, { "instruction": "غیرفعال کردن بات", "input": "", "output": "متد:\nstop\n\nپارامتر | نوع | توضیحات\n— | — | آماده سازی برای متوقف کردن\n\nشرح کوتاه:\nمتوقف کردن client و بستن منابع.\n\nبازگشت:\nNone\n(async)" }, { "instruction": "اجرای بات", "input": "", "output": "متد:\nrun\n\nپارامتر | نوع | توضیحات\nwebhook_url | Optional[str] | اگر تعیین شود، وب‌هوک فعال می‌شود\npath | Optional[str] | مسیر وب‌هوک (پیش‌فرض /webhook)\nhost | str | میزبان برای وب‌سرور (پیش‌فرض 0.0.0.0)\nport | int | پورت وب‌سرور (پیش‌فرض 8080)\n\nشرح کوتاه:\nمتد اجرایی اصلی:\n\nاگر\nwebhook_url\nارائه شده باشد: یک سرور\naiohttp.web\nبرای دریافت وب‌هوک‌ها راه‌اندازی و endpoint‌ها به API ثبت می‌شوند.\nدر غیر این صورت: وارد حلقهٔ پولینگ (\nupdater\n) شده و به‌صورت دوره‌ای\ngetUpdates\nمی‌خواند و\nprocess_update\nاجرا می‌شود.\n\nبازگشت:\nNone\n(async)\n\nنکات:\nrun\nخودش\nstart()\nرا فراخوانی می‌کند؛ در حالت وب‌هوک باید HTTPS و احیاناً مکانیزم اعتبارسنجی اضافه در نظر گرفته شود." }, { "instruction": "کانتکست‌منیجر", "input": "", "output": "__aenter__\n/\n__aexit__\n: اجرای خودکار\nstart/stop\nدر محیط‌های async.\n__enter__\n/\n__exit__\n: نسخهٔ همگام برای اسکریپت‌های ساده." }, { "instruction": "مدیریت سشن و محدودیت سرعت", "input": "", "output": "_ensure_session\n: ایجاد\naiohttp.ClientSession\nبا هدر کاربری روبیکا و تنظیمات محدودیت اتصال.\n_rate_limit_delay\n: قبل از هر درخواست، اختلاف زمان آخرین درخواست را بررسی کرده و در صورت نیاز\nawait asyncio.sleep\nانجام می‌دهد.\n_make_request\n: تمهیدات کامل برای تلاش مجدد، سوییچ خودکار بین\nBASE_URL\nو\nFALLBACK_URLS\nو تبدیل خطاها به\nAPIException\n." }, { "instruction": "دریافت اطلاعات بات", "input": "", "output": "متد:\nget_me\n\nپارامتر | نوع | توضیحات\n— | — | دریافت اطلاعات بات\n\nشرح کوتاه:\nدریافت اطلاعات بات.\n\nبازگشت:\nBot\n(async)\n\nمثال:\n\nbot\n=\nawait\nclient\n.\nget_me\n()" }, { "instruction": "ارسال پیام متنی", "input": "", "output": "متد:\nsend_message\n\nپارامتر | نوع | توضیحات\nchat_id | str | شناسهٔ مقصد\ntext | str | متن پیام\nchat_keypad | Optional[Keypad] | کیپد چت\ninline_keypad | Optional[Keypad] | کیپد اینلاین\ndisable_notification | bool | غیرفعال کردن اعلان؟ (پیشفرض False)\nreply_to_message_id | Optional[str] | در جوابِ پیامِ؟\nchat_keypad_type | ChatKeypadTypeEnum | نوع کیپد چت\n\nشرح کوتاه:\nارسال پیام های متنی، به همراه پشتیبانی از Keypad و InlineKeypad.\n\nبازگشت:\nMessageId\n(async)\n\nمثال:\n\nmid\n=\nawait\nclient\n.\nsend_message\n(\n\"chat_id\"\n,\n\"سلام!\"\n,\nchat_keypad\n=\nkeypad\n,\nchat_keypad_type\n=\nChatKeypadTypeEnum\n.\nSIMPLE\n)" }, { "instruction": "ارسال استیکر", "input": "", "output": "متد:\nsend_sticker\n\nپارامتر | نوع | توضیحات\nchat_id | str | شناسه مقصد\nsticker_id | str | شناسهٔ استیکر\nسایر پارامترها | — | مشابه send_message\n\nشرح کوتاه:\nارسال استیکر به چت.\n\nبازگشت:\nMessageId\n(async)" }, { "instruction": "ارسال فایل", "input": "", "output": "متد:\nsend_file\n\nپارامتر | نوع | توضیحات\nchat_id | str | شناسه مقصد\nfile | Optional[Union[str, Path]] | مسیر فایل در حافظه برای آپلود (اختیاری)\nfile_id | Optional[str] | شناسهٔ فایل اگر از قبل آپلود شده\ntext | Optional[str] | به عنوان کپشن فایل\nfile_name | Optional[str] | نام فایل هنگام آپلود\ntype | Literal[\"File\",\"Image\",\"Voice\",\"Music\",\"Gif\",\"Video\"] | نوع فایل\nسایر پارامترها | — | مشابه send_message\n\nشرح کوتاه:\nاگر مسیر فایل به پارامتر\nfile\nداده شود، ابتدا فایل آپلود شده و سپس ارسال می‌شود، در غیر این صورت، اگر\nfile_id\nبه پارامتر مربوطه داده شود، فایل مستقیما، بدون نیاز به آپلود مجدد ارسال می‌شود.\n\nبازگشت:\nMessageId\n(async) —\nfile_id\nنیز در نتیجه قرار می‌گیرد.\n\nمثال:\n\nmid\n=\nawait\nclient\n.\nsend_file\n(\n\"chat_id\"\n,\nfile\n=\n\"/tmp/photo.jpg\"\n,\ntype\n=\n\"Image\"\n,\ntext\n=\n\"عکس\"\n)" }, { "instruction": "درخواست ارسال فایل", "input": "", "output": "متد:\nrequest_send_file\n\nپارامتر | نوع | توضیحات\ntype | Literal[...] | نوع فایل مجاز\n\nشرح کوتاه:\nارسال درخواست آپلود فایل به سرور روبیکا و دریافت\nupload_url\nدر صورت مجاز بودن\ntype\nبرای آپلود فایل در سرور روبیکا.\n\nبازگشت:\nstr\n—\nupload_url\n\nخطا:\nاگر\ntype\nنامعتبر باشد\nValueError\nخواهد داد." }, { "instruction": "بارگذاری فایل", "input": "", "output": "متد:\nupload_file\n\nپارامتر | نوع | توضیحات\nurl | str | آدرس آپلود دریافت‌شده\nfile_name | str | نام فایل\nfile_path | str | مسیر محلی فایل\n\nشرح کوتاه:\nآپلود فایل در سرور روبیکا با استفاده از آدرسی که توسط متد\nrequest_send_file\nدریافت کرده‌ایم.\n\nبازگشت:\nstr\n—\nfile_id" }, { "instruction": "دریافت فایل", "input": "", "output": "متد:\nget_file\n\nپارامتر | نوع | توضیحات\nfile_id | str | شناسهٔ فایل\n\nشرح کوتاه:\nدریافت آدرس دانلود فایل (\ndownload_url\n) با استفاده از\nfile_id\n\nبازگشت:\nstr\n—\ndownload_url" }, { "instruction": "بارگیری فایل", "input": "", "output": "متد:\ndownload_file\n\nپارامتر | نوع | توضیحات\nfile_id | str | شناسهٔ فایل\nsave_as | Optional[str] | مسیر ذخیره (اگر as_bytes=False)\nprogress | Optional[Callable[[int,int],None]] | کال‌بک پیشرفت (downloaded, total)\nchunk_size | int | اندازهٔ chunk (بایت)\nas_bytes | bool | اگر True، محتوای بایتی برگردانده شود\n\nشرح کوتاه:\nدانلود فایل از سرور روبیکا با استفاده از آدرس دانلود فایل. اگر\nas_bytes\nبرابر\nTrue\nباشد، محتوای کامل فایل را به صورت کامل برمی‌گرداند، در غیر این صورت فایل را در حافظه ذخیره می‌کند و مسیر را بازمی‌گرداند.\n\nبازگشت:\nUnion[str, bytes, None]\n(async)\n\nخطاها:\nاگر\nget_file\nشکست بخورد\nValueError\nپرتاب می‌شود؛ اگر دانلود ناموفق باشد\nException\nپرتاب می‌شود." }, { "instruction": "ارسال نظرسنجی", "input": "", "output": "متد:\nsend_poll\n\nپارامتر | نوع | توضیحات\nchat_id | str | شناسه مقصد\nquestion | str | متن سوال\noptions | List[str] | گزینه‌ها\n\nشرح کوتاه:\nارسال نظرسنجی.\n\nبازگشت:\nMessageId\n(async)" }, { "instruction": "ارسال موقعیت مکانی", "input": "", "output": "متد:\nsend_location\n\nپارامتر | نوع | توضیحات\nchat_id | str | شناسه مقصد\nlatitude | Union[str,float] | عرض جغرافیایی\nlongitude | Union[str,float] | طول جغرافیایی\nسایر پارامترها | — | مشابه send_message\n\nشرح کوتاه:\nارسال موقعیت مکانی.\n\nبازگشت:\nMessageId\n(async)" }, { "instruction": "ارسال مخاطب", "input": "", "output": "متد:\nsend_contact\n\nپارامتر | نوع | توضیحات\nchat_id | str | شناسه مقصد\nfirst_name | str | نام مخاطب\nlast_name | str | نام خانوادگی\nphone_number | str | شماره تلفن\nسایر پارامترها | — | مشابه send_message\n\nشرح کوتاه:\nارسال اطلاعات تماس.\n\nبازگشت:\nMessageId\n(async)" }, { "instruction": "دریافت آپدیت ها", "input": "", "output": "متد:\nget_updates\n\nپارامتر | نوع | توضیحات\nlimit | int | تعداد آپدیت‌ها برای درخواست (پیش‌فرض 100)\noffset_id | str | آفست (اختیاری)\n\nشرح کوتاه:\nفراخوانی سادهٔ\ngetUpdates\nو تولید لیستی از اشیاء\nUpdate\n/\nInlineMessage\n(نسخهٔ نمونه حداقلی پیاده‌سازی شده).\n\nبازگشت:\nList[Union[Update, InlineMessage]]\n(async)" }, { "instruction": "حلقهٔ پولینگ پیشرفته", "input": "", "output": "متد:\nupdater\n\nپارامتر | نوع | توضیحات\nlimit | int | حداکثر تعداد آپدیت در هر درخواست.\noffset_id | str | آیدی ادامهٔ آپدیت‌ها؛ در صورت عدم مقدار از next_offset_id داخلی استفاده می‌شود.\npoll_timeout | float | افزودن تایم‌اوت به درخواست (getUpdates) برای پولینگ طولانی.\n\nشرح کوتاه:\nwrapper هوشمند برای\ngetUpdates\nکه موارد قدیمی را حذف کرده، آپدیت‌های حذف‌شده را نادیده می‌گیرد و\nself.next_offset_id\nرا نگه می‌دارد.\n\nبازگشت:\nList[Union[Update, InlineMessage]]\n(async) — هر آپدیت با\nclient\nتزریق‌شده بازمی‌گردد تا بتوان متدهای پاسخ‌دهی مثل\nupdate.reply\nرا صدا زد." }, { "instruction": "پردازش آپدیت", "input": "", "output": "متدها:\nprocess_update\n,\n_dispatch_update\n,\n_filters_pass\n\nprocess_update\n: زنجیرهٔ middlewareها را اجرا و سپس\n_dispatch_update\nرا صدا می‌زند.\n_dispatch_update\n: deduplication بر اساس\nmessage_id\n، اجرای نخستین هندلر که تمام فیلترها را پاس کند و پشتیبانی از هندلرهای sync/async.\n_filters_pass\n: نمونه‌سازی خودکار فیلترهایی که کلاس پاس داده شده‌اند و اجرای\nawait filter.check(update)\n." }, { "instruction": "دریافت وب‌هوک", "input": "", "output": "متد:\nhandle_webhook\n\nتنها درخواست‌های\nPOST\nرا می‌پذیرد و JSON را به\nUpdate\nیا\nInlineMessage\nتبدیل می‌کند.\nبرای هر آپدیت\nasyncio.create_task(self.process_update(update))\nفراخوانی می‌شود تا پاسخ سریع ارسال گردد.\nپاسخ موفق:\n{\"status\": \"OK\"}\n.\n\nنکته:\nrun\nهنگام فعال بودن وب‌هوک endpointهای\nReceiveUpdate\n,\nReceiveInlineMessage\n, ... را با آدرس جدید ثبت می‌کند." }, { "instruction": "دریافت اطلاعات گفتگو", "input": "", "output": "متد:\nget_chat\n\nپارامتر | نوع | توضیحات\nchat_id | str | شناسهٔ چت\n\nشرح کوتاه:\nدریافت اطلاعات گفتگو.\n\nبازگشت:\nChat\n(async)" }, { "instruction": "دریافت مدیران چت", "input": "", "output": "متد:\nget_chat_administrators\n\nپارامتر | نوع | توضیحات\nchat_id | str | شناسهٔ گفتگو\n\nشرح کوتاه:\nدریافت لیست مدیران گروه. (در صورتی که بات در گروه مورد نظر مدیر باشد)\n\nبازگشت:\nDict[str, Any]\n— پاسخ خام API شامل فهرست مدیران.\n\nمثال:\n\nadmins\n=\nawait\nclient\n.\nget_chat_administrators\n(\n\"chat_id\"\n)" }, { "instruction": "دریافت تعداد اعضای گروه", "input": "", "output": "متد:\nget_chat_member_count\n\nپارامتر | نوع | توضیحات\nchat_id | str | شناسهٔ گفتگو\n\nشرح کوتاه:\nدریافت تعداد ممبرهای یک گروه، در صورتی که بات در گروه ادمین باشد.\n\nبازگشت:\nint\n— تعداد اعضا.\n\nمثال:\n\nmember_count\n=\nawait\nclient\n.\nget_chat_member_count\n(\n\"chat_id\"\n)" }, { "instruction": "حذف عضو از گروه", "input": "", "output": "متد:\nban_chat_member\n\nپارامتر | نوع | توضیحات\nchat_id | str | شناسهٔ گفتگو\nuser_id | str | شناسهٔ کاربر مورد نظر\n\nشرح کوتاه:\nحذف یک عضو از گروه.\n\nبازگشت:\nbool\n— آیا حذف انجام شد؟\n\nمثال:\n\nawait\nclient\n.\nban_chat_member\n(\n\"chat_id\"\n,\n\"user_id\"\n)" }, { "instruction": "حذف عضو از لیست سیاه", "input": "", "output": "متد:\nunban_chat_member\n\nپارامتر | نوع | توضیحات\nchat_id | str | شناسهٔ گفتگو\nuser_id | str | شناسهٔ کاربر مورد نظر\n\nشرح کوتاه:\nحذف یک عضو از لیست سیاه گروه.\n\nبازگشت:\nbool\n— آیا حذف انجام شد؟\n\nمثال:\n\nawait\nclient\n.\nunban_chat_member\n(\n\"chat_id\"\n,\n\"user_id\"\n)" }, { "instruction": "دریافت اطلاعات عضو", "input": "", "output": "متد:\nget_chat_member\n\nپارامتر | نوع | توضیحات\nchat_id | str | شناسهٔ گروه یا کانال\nuser_id | str | شناسهٔ کاربر مورد نظر\n\nشرح کوتاه:\nدریافت اطلاعات عضو از گروه یا کانال در صورت عضو بودن.\n\nبازگشت:\nChatMember\n— اطلاعات عضو.\n\nمثال:\n\nawait\nclient\n.\nget_chat_member\n(\n\"chat_id\"\n,\n\"user_id\"\n)" }, { "instruction": "ارتقای عضو", "input": "", "output": "متد:\npromote_chat_member\n\nپارامتر | نوع | توضیحات\nchat_id | str | شناسهٔ گروه یا کانال\nuser_id | str | شناسهٔ کاربر مورد نظر\n\nشرح کوتاه:\nارتقا از عضو به مدیر در گروه یا کانال.\n\nبازگشت:\nbool\n— آیا ارتقا انجام شد؟\n\nمثال:\n\nawait\nclient\n.\npromote_chat_member\n(\n\"chat_id\"\n,\n\"user_id\"\n)" }, { "instruction": "تنظیم دسترسی کاربران در گفتگو", "input": "", "output": "متد:\nset_chat_permissions\n\nپارامتر | نوع | توضیحات\nchat_id | str | شناسه گروه\n\nشرح کوتاه:\nتنظیم دسترسی های کاربران در گفتگو.\n\nبازگشت:\nbool\n— آیا تنظیم دسترسی انجام شد؟\n\nمثال:\n\nawait\nclient\n.\nset_chat_permissions\n(\n\"chat_id\"\n,\n...\n)" }, { "instruction": "دکوراتور هندلر آپدیت", "input": "", "output": "متد:\non_update\n\nپارامتر | نوع | توضیحات\n*filters | Filter... | مجموعه‌ای از فیلترها (کلاس یا نمونه)\n\nشرح کوتاه:\nدکوراتور on_update یک دکوراتور سطح بالا برای ثبت هندلرها به همراه فیلترها است. شما میتوانید هندلرهای\nasync\nو\nsync\nرا همزمان در کنار یکدیگر استفاده کنید.\n\nمثال:\n\n@client\n.\non_update\n()\nasync\ndef\necho\n(\nclient\n,\nupdate\n):\nif\nupdate\n.\nnew_message\nand\nupdate\n.\nnew_message\n.\ntext\n:\nawait\nupdate\n.\nreply\n(\n\"pong\"\n)" }, { "instruction": "افزودن هندلر", "input": "", "output": "متد:\nadd_handler\n\nپارامتر | نوع | توضیحات\nhandler | Callable | تابعی با امضای (bot, update)\n*filters | Filter... | فیلترهای اجرایی مشابه on_update\n\nبازگشت:\nstr\n— کلید یکتا برای حذف بعدی.\n\nمثال:\n\nasync\ndef\nhello_world\n(\nclient\n,\nupdate\n):\nif\nupdate\n.\nnew_message\nand\nupdate\n.\nnew_message\n.\ntext\n:\nawait\nupdate\n.\nreply\n(\n\"Hello, World!\"\n)\nclient\n.\nadd_handler\n(\nhello_world\n,\nfilters\n.\ncommands\n(\n\"hello\"\n))\nmy_handler\n=\nclient\n.\nadd_handler\n(\nhello_world\n)" }, { "instruction": "حذف هندلر", "input": "", "output": "متد:\nremove_handler\n\nپارامتر | نوع | توضیحات\nhandler_key | str | خروجی add_handler یا on_update.\nhandler | Callable | (اختیاری) حذف فقط یک تابع خاص زیر همان کلید.\n\nبازگشت:\nbool\n— آیا هندلری حذف شد؟\n\nمثال:\n\nmy_handler\n=\nclient\n.\nadd_handler\n(\nhello_world\n)\nclient\n.\nremove_handler\n(\nmy_handler\n)" }, { "instruction": "به محض شروع", "input": "", "output": "متد:\non_start\n\nمثال:\n\n@app\n.\non_start\n()\nasync\ndef\ngreet\n(\nbot\n):\nprint\n(\n\"Bot started...\"\n)\nprint\n(\nawait\nbot\n.\nget_me\n())" }, { "instruction": "به محض خاموش شدن", "input": "", "output": "متد:\non_shutdown\n\nمثال:\n\n@app\n.\non_shutdown\n()\nasync\ndef\nbye\n(\nbot\n):\nprint\n(\n\"👋 Bot is shutting down!\"\n)" }, { "instruction": "میان‌افزار (Middleware)", "input": "", "output": "متد:\nmiddleware\n\nپارامتر | نوع | توضیحات\n— | — | این متد دکوراتور است؛ تابعی را می‌گیرد که قبل از رسیدن هر آپدیت به هندلرها اجرا می‌شود.\n\nشرح کوتاه:\nمیان‌افزارها لایه‌هایی هستند که روی جریان آپدیت‌ها قرار می‌گیرند. هر آپدیت قبل از رسیدن به هندلرها از زنجیرهٔ middlewareها عبور می‌کند. هر middleware سه آرگومان دریافت می‌کند:\n\nasync\ndef\nmiddleware\n(\nbot\n,\nupdate\n,\ncall_next\n):\n...\nawait\ncall_next\n()\n# ادامه مسیر به middleware بعدی یا هندلر اصلی\n\nbot\n: نمونه‌ی BotClient\nupdate\n: شیء Update یا InlineMessage\ncall_next\n: تابعی برای ارسال کنترل به middleware بعدی یا در نهایت هندلر\n\nاگر یک middleware\nawait call_next()\nرا صدا نزند، زنجیره متوقف می‌شود و هندلرها اجرا نمی‌شوند (برای مسدود کردن یا فیلتر کردن مفید است).\n\nبازگشت:\nNone\n(async)" }, { "instruction": "مثال ۱ — ارسال پیام ساده", "input": "", "output": "client\n=\nBotClient\n(\n\"MY_TOKEN\"\n)\nawait\nclient\n.\nstart\n()\nmid\n=\nawait\nclient\n.\nsend_message\n(\n\"chat_id\"\n,\n\"سلام، ربات آزمایشی!\"\n)\nawait\nclient\n.\nstop\n()" }, { "instruction": "مثال ۲ — آپلود و ارسال عکس", "input": "", "output": "mid\n=\nawait\nclient\n.\nsend_file\n(\n\"chat_id\"\n,\nfile\n=\n\"/tmp/photo.jpg\"\n,\ntype\n=\n\"Image\"\n,\ntext\n=\n\"عکس تست\"\n)" }, { "instruction": "مثال ۳ — ثبت هندلر و اجرای پولینگ", "input": "", "output": "@client\n.\non_update\n()\nasync\ndef\necho\n(\nclient\n,\nupdate\n):\nif\nupdate\n.\nnew_message\nand\nupdate\n.\nnew_message\n.\ntext\n:\nawait\nupdate\n.\nreply\n(\n\"دریافت شد: \"\n+\nupdate\n.\nnew_message\n.\ntext\n)\nawait\nclient\n.\nrun\n()\n# اجرای پولینگ (یا use webhook اگر webhook_url داده باشد)" }, { "instruction": "مثال ۴ — اجرا با وب‌هوک", "input": "", "output": "# فرض: سرویس شما در https://example.com است\nawait\nclient\n.\nrun\n(\nwebhook_url\n=\n\"https://example.com\"\n,\npath\n=\n\"/rubika/webhook\"\n,\nhost\n=\n\"0.0.0.0\"\n,\nport\n=\n8080\n)" }, { "instruction": "مثال ۵ — استفاده از پلاگین و middleware", "input": "", "output": "client\n=\nBotClient\n(\n\"TOKEN\"\n,\nauto_enable_plugins\n=\nTrue\n,\nplugins\n=\n[\n\"echo\"\n])\n@client\n.\nmiddleware\n()\nasync\ndef\nlogger\n(\nbot\n,\nupdate\n,\ncall_next\n):\nprint\n(\n\"Update arrived\"\n,\nupdate\n.\ntype\n)\nawait\ncall_next\n()\nawait\nclient\n.\nrun\n()" }, { "instruction": "استفادهٔ کلی", "input": "", "output": "from\nrubpy\nimport\nBotClient\nfrom\nrubpy.bot\nimport\nfilters\nbot\n=\nBotClient\n(\n\"your_bot_token\"\n)\n@bot\n.\non_update\n(\nfilters\n.\ntext\n(\n\"hello\"\n))\nasync\ndef\nhandle_hello\n(\nc\n,\nupdate\n):\nawait\nc\n.\nsend_message\n(\nupdate\n.\nchat_id\n,\n\"Hello!\"\n)" }, { "instruction": "طراحی کلی فیلترها", "input": "", "output": "همهٔ فیلترها\nآسینک\nهستند و متد\ncheck(update)\nرا پیاده‌سازی می‌کنند.\nیک فیلتر هنگام استفاده می‌تواند به‌صورت کلاس (نمونه‌سازی داخلی) یا نمونهٔ آماده به دکوراتور پاس داده شود.\nچند فیلتر را می‌توان به‌صورت positional به\n@on_update(...)\nپاس داد تا همگی با هم بررسی شوند (AND منطقی)." }, { "instruction": "text", "input": "", "output": "پارامتر | نوع | توضیحات\npattern | Optional[str] | متن یا الگوی regex (اگر None یعنی هر متنی)\nregex | bool | آیا pattern به‌صورت regex تفسیر شود؟ (پیش‌فرض False)\nignore_case | bool | نادیده گرفتن بزرگ/کوچک بودن حروف در مقایسه (پیش‌فرض True)\n\nشرح کوتاه:\nفیلتر بر اساس متن پیام؛ از تطبیق دقیق یا regex پشتیبانی می‌کند.\n\nبازگشت:\nنمونه‌ی فیلتر (قابل استفاده در\n@on_update\n)\n\nمثال‌ها:\n\n@bot\n.\non_update\n(\nfilters\n.\ntext\n)\n# هر متنی\nasync\ndef\nany_text\n(\nc\n,\nu\n):\n...\n@bot\n.\non_update\n(\nfilters\n.\ntext\n(\n\"hello\"\n))\n# تطبیق دقیق\nasync\ndef\nexact\n(\nc\n,\nu\n):\n...\n@bot\n.\non_update\n(\nfilters\n.\ntext\n(\nr\n\"^/start\"\n,\nregex\n=\nTrue\n))\n# regex\nasync\ndef\nstart_cmd\n(\nc\n,\nu\n):\n...\n\nنکته:\nاگر\npattern\nخالی باشد و\nregex=False\n، فیلتر فقط چک می‌کند که پیام متنی وجود دارد." }, { "instruction": "commands", "input": "", "output": "پارامتر | نوع | توضیحات |\ncommands | `str | List[str]` | نامِ فرمان(ها) بدون /\n\nشرح کوتاه:\nپیام‌هایی که با دستور مشخص شروع می‌شوند (مثلاً\n/start\n).\n\nمثال:\n\n@bot\n.\non_update\n(\nfilters\n.\ncommands\n(\n\"start\"\n))\nasync\ndef\nstart\n(\nc\n,\nu\n):\n...\n@bot\n.\non_update\n(\nfilters\n.\ncommands\n([\n\"help\"\n,\n\"about\"\n]))\nasync\ndef\nhelp_or_about\n(\nc\n,\nu\n):\n...\n\nنکته:\nاین فیلتر معمولاً متن پیام را به صورت tokenized بررسی می‌کند تا فرمان در ابتدای متن باشد." }, { "instruction": "update_type", "input": "", "output": "پارامتر | نوع | توضیحات |\ntypes | `str | List[str]` | یک یا چند مقدار از UpdateTypeEnum یا معادل رشته‌ای آن\n\nشرح کوتاه:\nفیلتر براساس نوع آپدیت (مثلاً\nNewMessage\n,\nUpdatedMessage\n,\nInlineMessage\n).\n\nمثال:\n\n@bot\n.\non_update\n(\nfilters\n.\nupdate_type\n(\n\"NewMessage\"\n))\nasync\ndef\nnewmsg\n(\nc\n,\nu\n):\n...\n@bot\n.\non_update\n(\nfilters\n.\nupdate_type\n([\n\"NewMessage\"\n,\n\"InlineMessage\"\n]))\nasync\ndef\nmulti\n(\nc\n,\nu\n):\n..." }, { "instruction": "private", "input": "", "output": "پارامتر | نوع | توضیحات\n— | — | بدون پارامتر\n\nشرح کوتاه:\nپاس کردن تنها زمانی که آپدیت از یک چت خصوصی (user) باشد.\n\nمثال:\n\n@bot\n.\non_update\n(\nfilters\n.\nprivate\n)\nasync\ndef\npriv\n(\nc\n,\nu\n):\n..." }, { "instruction": "group", "input": "", "output": "پارامتر | نوع | توضیحات\n— | — | بدون پارامتر\n\nشرح کوتاه:\nپاس کردن تنها زمانی که پیام از گروه باشد.\n\nمثال:\n\n@bot\n.\non_update\n(\nfilters\n.\ngroup\n)\nasync\ndef\ngrp\n(\nc\n,\nu\n):\n..." }, { "instruction": "channel", "input": "", "output": "پارامتر | نوع | توضیحات\n— | — | بدون پارامتر\n\nشرح کوتاه:\nپاس کردن تنها زمانی که پیام از کانال باشد.\n\nمثال:\n\n@bot\n.\non_update\n(\nfilters\n.\nchannel\n)\nasync\ndef\nchl\n(\nc\n,\nu\n):\n..." }, { "instruction": "bot", "input": "", "output": "پارامتر | نوع | توضیحات\n— | — | بدون پارامتر\n\nشرح کوتاه:\nپیام‌هایی که فرستنده‌شان از نوع\nBot\nاست.\n\nمثال:\n\n@bot\n.\non_update\n(\nfilters\n.\nbot\n)\nasync\ndef\nfrom_bot\n(\nc\n,\nu\n):\n..." }, { "instruction": "chat", "input": "", "output": "پارامتر | نوع | توضیحات |\nchat_ids | `str | List[str]` | یک شناسه یا لیست شناسه‌های چت که اجازه دارد\n\nشرح کوتاه:\nمحدود کردن اجرای هندلر به یک یا چند\nchat_id\nمشخص.\n\nمثال:\n\n@bot\n.\non_update\n(\nfilters\n.\nchat\n(\n\"b0_test_chat\"\n))\nasync\ndef\ntest\n(\nc\n,\nu\n):\n...\n@bot\n.\non_update\n(\nfilters\n.\nchat\n([\n\"b0_admin\"\n,\n\"b0_mod\"\n]))\nasync\ndef\nadmin_mod\n(\nc\n,\nu\n):\n..." }, { "instruction": "button", "input": "", "output": "پارامتر | نوع | توضیحات\npattern | str | متن یا الگوی شناسه دکمه\nregex | bool | آیا pattern به‌صورت regex باشد؟ (پیش‌فرض False)\n\nشرح کوتاه:\nفیلتر کلیک روی دکمه‌ها (callback / button id) — تطبیق دقیق یا regex.\n\nمثال:\n\n@bot\n.\non_update\n(\nfilters\n.\nbutton\n(\n\"btn_123\"\n))\nasync\ndef\nb123\n(\nc\n,\nu\n):\n...\n@bot\n.\non_update\n(\nfilters\n.\nbutton\n(\nr\n\"btn_\\d+\"\n,\nregex\n=\nTrue\n))\nasync\ndef\nnumbered\n(\nc\n,\nu\n):\n..." }, { "instruction": "forward", "input": "", "output": "پارامتر | نوع | توضیحات\n— | — | بدون پارامتر\n\nشرح کوتاه:\nپاس می‌شود اگر پیام از جایی فوروارد شده باشد (\nforwarded_from\nوجود داشته باشد).\n\nمثال:\n\n@bot\n.\non_update\n(\nfilters\n.\nforward\n)\nasync\ndef\nfwd\n(\nc\n,\nu\n):\n..." }, { "instruction": "replied", "input": "", "output": "پارامتر | نوع | توضیحات\n— | — | بدون پارامتر\n\nشرح کوتاه:\nبررسی اینکه آیا پیام روی یک پیام دیگر ریپلای شده یا خیر.\n\nمثال:\n\n@bot\n.\non_update\n(\nfilters\n.\nreplied\n)\nasync\ndef\nis_replieds\n(\nc\n,\nu\n):\n..." }, { "instruction": "is_edited", "input": "", "output": "پارامتر | نوع | توضیحات\n— | — | بدون پارامتر\n\nشرح کوتاه:\nفیلتر پیام‌های ویرایش‌شده (\nis_edited == True\nیا نوع\nUpdatedMessage\n).\n\nمثال:\n\n@bot\n.\non_update\n(\nfilters\n.\nis_edited\n)\nasync\ndef\nedited\n(\nc\n,\nu\n):\n..." }, { "instruction": "sender_type", "input": "", "output": "پارامتر | نوع | توضیحات |\ntypes | `str | List[str]` | نوع/انواع فرستنده (مثلاً \"User\", \"Bot\")\n\nشرح کوتاه:\nفیلتر بر اساس\nsender_type\nپیام.\n\nمثال:\n\n@bot\n.\non_update\n(\nfilters\n.\nsender_type\n(\n\"User\"\n))\nasync\ndef\nfrom_user\n(\nc\n,\nu\n):\n...\n@bot\n.\non_update\n(\nfilters\n.\nsender_type\n([\n\"Bot\"\n,\n\"Channel\"\n]))\nasync\ndef\nbot_or_channel\n(\nc\n,\nu\n):\n..." }, { "instruction": "has_aux_data", "input": "", "output": "پارامتر | نوع | توضیحات\n— | — | بدون پارامتر\n\nشرح کوتاه:\nپاس می‌شود اگر پیام\naux_data\nداشته باشد (مفید برای دکمه‌ها/payloadها).\n\nمثال:\n\n@bot\n.\non_update\n(\nfilters\n.\nhas_aux_data\n)\nasync\ndef\naux\n(\nc\n,\nu\n):\n..." }, { "instruction": "file", "input": "", "output": "پارامتر | نوع | توضیحات\n— | — | بدون پارامتر\n\nشرح کوتاه:\nپیام‌هایی که پیوست فایل دارند (\nmessage.file\n).\n\nمثال:\n\n@bot\n.\non_update\n(\nfilters\n.\nfile\n)\nasync\ndef\nnew_file\n(\nc\n,\nu\n):\n..." }, { "instruction": "location", "input": "", "output": "پارامتر | نوع | توضیحات\n— | — | بدون پارامتر\n\nشرح کوتاه:\nپیام‌هایی که لوکیشن دارند (\nmessage.location\nیا\nlive_location\n).\n\nمثال:\n\n@bot\n.\non_update\n(\nfilters\n.\nlocation\n)\nasync\ndef\nloc\n(\nc\n,\nu\n):\n..." }, { "instruction": "sticker", "input": "", "output": "پارامتر | نوع | توضیحات\n— | — | بدون پارامتر\n\nشرح کوتاه:\nپیام‌هایی که استیکر دارند (\nmessage.sticker\n).\n\nمثال:\n\n@bot\n.\non_update\n(\nfilters\n.\nsticker\n)\nasync\ndef\nstk\n(\nc\n,\nu\n):\n..." }, { "instruction": "contact_message", "input": "", "output": "پارامتر | نوع | توضیحات\n— | — | بدون پارامتر\n\nشرح کوتاه:\nپیام‌هایی که شامل کانتکت هستند (\nmessage.contact_message\n).\n\nمثال:\n\n@bot\n.\non_update\n(\nfilters\n.\ncontact_message\n)\nasync\ndef\ncontact\n(\nc\n,\nu\n):\n..." }, { "instruction": "poll", "input": "", "output": "پارامتر | نوع | توضیحات\n— | — | بدون پارامتر\n\nشرح کوتاه:\nپیام‌هایی که نظرسنجی (poll) دارند (\nmessage.poll\n).\n\nمثال:\n\n@bot\n.\non_update\n(\nfilters\n.\npoll\n)\nasync\ndef\npoll_msg\n(\nc\n,\nu\n):\n..." }, { "instruction": "live_location", "input": "", "output": "پارامتر | نوع | توضیحات\n— | — | بدون پارامتر\n\nشرح کوتاه:\nپیام‌هایی که موقعیت زنده (\nlive_location\n) دارند.\n\nمثال:\n\n@bot\n.\non_update\n(\nfilters\n.\nlive_location\n)\nasync\ndef\nlive_loc\n(\nc\n,\nu\n):\n..." }, { "instruction": "ترکیب فیلترها (Multi filters)", "input": "", "output": "چند فیلتر را می‌توان کنار هم قرار داد؛ همه باید پاس شوند (منطق AND):\n\n@bot\n.\non_update\n(\nfilters\n.\nprivate\n,\nfilters\n.\ncommands\n(\n'start'\n))\nasync\ndef\nwelcome\n(\nc\n,\nu\n):\nawait\nu\n.\nreply\n(\n\"Welcome to private start!\"\n)" }, { "instruction": "استفاده پیشرفته:", "input": "", "output": "ترکیب فیلترهای OR و AND.\n\n@bot\n.\non_update\n(\nfilters\n.\ncommands\n(\n'hello'\n)\n&\n(\nfilters\n.\nprivate\n|\nfilters\n.\ngroup\n))\nasync\ndef\nhello_world\n(\nc\n,\nu\n):\nawait\nu\n.\nreply\n(\n\"Hello, World!\"\n)\n\nفیلتر\nstates\n\n\nفیلتر\nstates\nیک کلاس برای مدیریت\nوضعیت مکالمه (conversation state)\nدر ربات است.\nاین فیلتر بررسی می‌کند که آیا به‌روزرسانی (\nupdate\n) مربوط به\nیک state مشخص\nاست یا نه، بدون نیاز به کتابخانه یا مدیریت‌کننده خارجی." }, { "instruction": "1. تعیین وضعیت بعد از دستور /start", "input": "", "output": "@bot\n.\non_message\n(\ntext\n(\n\"/start\"\n))\nasync\ndef\nstart_handler\n(\nclient\n,\nmessage\n):\nawait\nmessage\n.\nreply\n(\n\"سلام! لطفاً نام خود را وارد کنید.\"\n)\nstates\n.\nset\n(\nmessage\n.\nuser_id\n,\n\"waiting_for_name\"\n)" }, { "instruction": "2. پردازش ورودی بر اساس وضعیت", "input": "", "output": "@bot\n.\non_message\n(\nstates\n(\n\"waiting_for_name\"\n))\nasync\ndef\nname_handler\n(\nclient\n,\nmessage\n):\nawait\nmessage\n.\nreply\n(\nf\n\"خوشبختم\n{\nmessage\n.\ntext\n}\n! سن خود را وارد کنید.\"\n)\nstates\n.\nset\n(\nmessage\n.\nuser_id\n,\n\"waiting_for_age\"\n)" }, { "instruction": "3. انتقال بین وضعیت‌ها", "input": "", "output": "@bot\n.\non_message\n(\nstates\n(\n\"waiting_for_age\"\n))\nasync\ndef\nage_handler\n(\nclient\n,\nmessage\n):\nawait\nmessage\n.\nreply\n(\nf\n\"عالی! شما\n{\nmessage\n.\ntext\n}\nساله هستید.\"\n)\nstates\n.\nclear\n(\nmessage\n.\nuser_id\n)\n# پایان جریان مکالمه" }, { "instruction": "4. بررسی وضعیت فعلی کاربر", "input": "", "output": "user_state\n=\nstates\n.\nget\n(\nmessage\n.\nuser_id\n)\nif\nuser_state\n==\n\"waiting_for_age\"\n:\nawait\nmessage\n.\nreply\n(\n\"شما هنوز در حالت وارد کردن سن هستید.\"\n)" }, { "instruction": "🧩 نکات کلیدی", "input": "", "output": "از\nرشته‌های کوتاه و گویا\nبرای وضعیت‌ها استفاده کنید (\n\"waiting_for_email\"\n,\n\"awaiting_confirmation\"\n).\nهمیشه بعد از پایان جریان مکالمه، وضعیت را با\nclear\nپاک کنید تا حافظه اضافه مصرف نشود.\nبرای مدیریت جریان‌های پیچیده، می‌توانید وضعیت‌ها را گروه‌بندی کنید (\n\"reg:name\"\n,\n\"reg:age\"\n,\n\"reg:done\"\n)." }, { "instruction": "نکات پیاده‌سازی و بهترین تمرین‌ها", "input": "", "output": "متد\ncheck(update)\nدر هر فیلتر\nآسینک\nباشد تا بتواند منابع IO (مثلاً دیتابیس یا شبکه) را نیز چک کند.\nبرای فیلترهای Regex، استفاده از کامپایل کردن الگو (\nre.compile\n) در سازندهٔ فیلتر باعث افزایش کارایی می‌شود.\nهنگام بررسی متن، همیشه\nNone\nبودن فیلدها را چک کنید تا از\nAttributeError\nجلوگیری شود.\nاگر نیاز به فیلتر stateful دارید (مثلاً محدودیت نرخ برای کاربر)، پیاده‌سازی را به گونه‌ای انجام دهید که thread-safe یا compatible با async باشد (مثلاً استفاده از async locks یا external store مثل Redis).\nبرای تست، فیلترها را به‌صورت جداگانه unit-test کنید با نمونه‌های\nUpdate\n/\nInlineMessage\nمصنوعی." }, { "instruction": "FAQ", "input": "", "output": "۱) آیا فیلترها می‌توانند async I/O انجام دهند؟\nبله —\ncheck\nآسینک است و می‌تواند درخواست‌های دیتابیسی یا شبکه‌ای داشته باشد.\n\n۲) ترتیب بررسی فیلترها چگونه است؟\nفیلترها به ترتیب قرارگیری در دکوراتور بررسی می‌شوند؛ اولین فیلتر که\nFalse\nبرگرداند از اجرای هندلر جلوگیری می‌کند.\n\n۳) آیا OR ترکیب فیلترها پشتیبانی می‌شود؟\nدر نسخهٔ پایه ترکیب به صورت AND است. اگر لازم است، می‌توانید یک helper بنویسید که OR را پیاده‌سازی کند یا فیلتر جدیدی بسازید." }, { "instruction": "File", "input": "", "output": "فیلد | نوع | توضیحات\nfile_id | Optional[str] | شناسهٔ یکتأ فایل که سرور بازمی‌گرداند\nfile_name | Optional[str] | نام فایل\nsize | Optional[str] | اندازهٔ فایل (معمولاً بر حسب بایت یا رشته‌ای که API بازمی‌گرداند)" }, { "instruction": "Chat", "input": "", "output": "فیلد | نوع | توضیحات\nchat_id | Optional[str] | شناسهٔ چت\nchat_type | Optional[ChatTypeEnum] | نوع چت\nuser_id | Optional[str] | شناسهٔ کاربر\nfirst_name | Optional[str] | نام کاربر\nlast_name | Optional[str] | نام خانوادگی کاربر\ntitle | Optional[str] | عنوان (برای گروه/کانال)\nusername | Optional[str] | نام کاربری" }, { "instruction": "ForwardedFrom", "input": "", "output": "فیلد | نوع | توضیحات\ntype_from | Optional[ForwardedFromEnum] | نوع منبع فوروارد\nmessage_id | Optional[str] | شناسهٔ پیام مبدا\nfrom_chat_id | Optional[str] | شناسهٔ چت مبدا\nfrom_sender_id | Optional[str] | شناسهٔ فرستندهٔ مبدا" }, { "instruction": "PaymentStatus", "input": "", "output": "فیلد | نوع | توضیحات\npayment_id | Optional[str] | شناسهٔ تراکنش/پرداخت\nstatus | Optional[PaymentStatusEnum] | وضعیت پرداخت (enum)" }, { "instruction": "MessageTextUpdate", "input": "", "output": "فیلد | نوع | توضیحات\nmessage_id | Optional[str] | شناسهٔ پیام ویرایش‌شده\ntext | Optional[str] | متن جدید پیام" }, { "instruction": "Bot", "input": "", "output": "فیلد | نوع | توضیحات\nbot_id | Optional[str] | شناسهٔ ربات\nbot_title | Optional[str] | عنوان/نام ربات\navatar | Optional[File] | آواتار ربات (فایل)\ndescription | Optional[str] | توضیحات ربات\nusername | Optional[str] | نام کاربری ربات\nstart_message | Optional[str] | پیام شروع (start)\nshare_url | Optional[str] | URL اشتراک‌گذاری ربات" }, { "instruction": "BotCommand", "input": "", "output": "فیلد | نوع | توضیحات\ncommand | Optional[str] | نام فرمان\ndescription | Optional[str] | توضیح فرمان" }, { "instruction": "Sticker", "input": "", "output": "فیلد | نوع | توضیحات\nsticker_id | Optional[str] | شناسهٔ استیکر\nfile | Optional[File] | فایل مربوط به استیکر\nemoji_character | Optional[str] | ایموجی مرتبط با استیکر" }, { "instruction": "ContactMessage", "input": "", "output": "فیلد | نوع | توضیحات\nphone_number | Optional[str] | شماره تلفن\nfirst_name | Optional[str] | نام\nlast_name | Optional[str] | نام خانوادگی" }, { "instruction": "PollStatus", "input": "", "output": "فیلد | نوع | توضیحات\nstate | Optional[PollStatusEnum] | وضعیت نظرسنجی (باز/بسته و ...)\nselection_index | Optional[int] | ایندکس گزینهٔ انتخاب‌شده\npercent_vote_options | Optional[List[int]] | درصد آرا هر گزینه (لیست)\ntotal_vote | Optional[int] | مجموع آرا\nshow_total_votes | Optional[bool] | آیا مجموع آرا نمایش داده شود؟" }, { "instruction": "Poll", "input": "", "output": "فیلد | نوع | توضیحات\nquestion | Optional[str] | سوال نظرسنجی\noptions | Optional[List[str]] | گزینه‌ها\npoll_status | Optional[PollStatus] | وضعیت فعلی نظرسنجی" }, { "instruction": "Location", "input": "", "output": "فیلد | نوع | توضیحات\nlongitude | Optional[str] | طول جغرافیایی (رشته/عدد مطابق API)\nlatitude | Optional[str] | عرض جغرافیایی (رشته/عدد مطابق API)" }, { "instruction": "LiveLocation", "input": "", "output": "فیلد | نوع | توضیحات\nstart_time | Optional[str] | زمان شروع (timestamp / رشته مطابق API)\nlive_period | Optional[int] | طول دورهٔ لایو به ثانیه\ncurrent_location | Optional[Location] | موقعیت فعلی (Location)\nuser_id | Optional[str] | شناسهٔ کاربر ارسال‌کننده\nstatus | Optional[LiveLocationStatusEnum] | وضعیت لایو (enum)\nlast_update_time | Optional[str] | زمان آخرین آپدیت" }, { "instruction": "ButtonSelectionItem", "input": "", "output": "فیلد | نوع | توضیحات\ntext | Optional[str] | متن آیتم انتخاب\nimage_url | Optional[str] | آدرس تصویر آیتم\ntype | Optional[ButtonSelectionTypeEnum] | نوع آیتم (enum)" }, { "instruction": "ButtonSelection", "input": "", "output": "فیلد | نوع | توضیحات\nselection_id | Optional[str] | شناسهٔ مجموعهٔ انتخاب\nsearch_type | Optional[str] | نوع جستجو/فیلتر (رشتهٔ API)\nget_type | Optional[str] | نوع واکشی آیتم‌ها\nitems | Optional[List[ButtonSelectionItem]] | لیست آیتم‌ها\nis_multi_selection | Optional[bool] | آیا چندانتخابی است؟\ncolumns_count | Optional[str] | تعداد ستون‌ها (رشته مطابق API)\ntitle | Optional[str] | عنوان مجموعهٔ انتخاب" }, { "instruction": "ButtonCalendar", "input": "", "output": "فیلد | نوع | توضیحات\ndefault_value | Optional[str] | مقدار پیش‌فرض (مثلاً تاریخ)\ntype | Optional[ButtonCalendarTypeEnum] | نوع تقویم/نمایش (enum)\nmin_year | Optional[str] | کمینهٔ سال قابل انتخاب\nmax_year | Optional[str] | بیشینهٔ سال قابل انتخاب\ntitle | Optional[str] | عنوان تقویم" }, { "instruction": "ButtonNumberPicker", "input": "", "output": "فیلد | نوع | توضیحات\nmin_value | Optional[str] | حداقل مقدار (رشته مطابق API)\nmax_value | Optional[str] | حداکثر مقدار\ndefault_value | Optional[str] | مقدار پیش‌فرض\ntitle | Optional[str] | عنوان پیکر عددی" }, { "instruction": "ButtonStringPicker", "input": "", "output": "فیلد | نوع | توضیحات\nitems | Optional[List[str]] | لیست رشته‌ای گزینه‌ها\ndefault_value | Optional[str] | مقدار پیش‌فرض\ntitle | Optional[str] | عنوان انتخاب‌گر رشته‌ای" }, { "instruction": "ButtonTextbox", "input": "", "output": "فیلد | نوع | توضیحات\ntype_line | Optional[ButtonTextboxTypeLineEnum] | نوع خط/ورودی (enum)\ntype_keypad | Optional[ButtonTextboxTypeKeypadEnum] | نوع کیپد (enum)\nplace_holder | Optional[str] | متن جایگزین (placeholder)\ntitle | Optional[str] | عنوان فیلد متنی\ndefault_value | Optional[str] | مقدار پیش‌فرض" }, { "instruction": "ButtonLocation", "input": "", "output": "فیلد | نوع | توضیحات\ndefault_pointer_location | Optional[Location] | محل اشاره‌گر پیش‌فرض\ndefault_map_location | Optional[Location] | مکان نقشه پیش‌فرض\ntype | Optional[ButtonLocationTypeEnum] | نوع ورودی مکان (enum)\ntitle | Optional[str] | عنوان\nlocation_image_url | Optional[str] | تصویر/نقشه مرتبط (URL)" }, { "instruction": "AuxData", "input": "", "output": "فیلد | نوع | توضیحات\nstart_id | Optional[str] | شناسهٔ شروع (کمکی)\nbutton_id | Optional[str] | شناسهٔ دکمهٔ مرتبط" }, { "instruction": "JoinChannelData", "input": "", "output": "فیلد | نوع | توضیحات\nusername | Optional[str] | نام کاربری کانال/گروه (در __post_init__ با حذف @ نرمال‌سازی می‌شود)\nask_join | Optional[bool] | آیا از کاربر درخواست ملحق شدن شود؟ (پیش‌فرض False)" }, { "instruction": "OpenChatData", "input": "", "output": "فیلد | نوع | توضیحات\nobject_guid | Optional[str] | شناسهٔ شیٔ (GUID)\nobject_type | Optional[ChatTypeEnum] | نوع شی (ChatTypeEnum)" }, { "instruction": "ButtonLink", "input": "", "output": "فیلد | نوع | توضیحات\ntype | Optional[str] | نوع لینک (رشتهٔ API)\nlink_url | Optional[str] | آدرس لینک — در __post_init__ برخی لینک‌های rubika.ir به deep-link نرمال‌سازی می‌شوند\njoinchannel_data | Optional[JoinChannelData] | داده‌های join-channel مرتبط\nopen_chat_data | Optional[OpenChatData] | داده‌های open-chat مرتبط" }, { "instruction": "Button", "input": "", "output": "فیلد | نوع | توضیحات\nid | Optional[str] | شناسهٔ دکمه\ntype | Optional[ButtonTypeEnum] | نوع دکمه (enum)\nbutton_text | Optional[str] | متن دکمه\nbutton_selection | Optional[ButtonSelection] | دادهٔ انتخاب (در صورت وجود)\nbutton_calendar | Optional[ButtonCalendar] | تقویم تعبیه‌شده\nbutton_number_picker | Optional[ButtonNumberPicker] | پیکر عددی\nbutton_string_picker | Optional[ButtonStringPicker] | پیکر رشته‌ای\nbutton_location | Optional[ButtonLocation] | ورودی مکان\nbutton_textbox | Optional[ButtonTextbox] | ورودی متنی\nbutton_link | Optional[ButtonLink] | لینک/عملیات مرتبط" }, { "instruction": "KeypadRow", "input": "", "output": "فیلد | نوع | توضیحات\nbuttons | Optional[List[Button]] | لیست دکمه‌ها در یک ردیف" }, { "instruction": "Keypad", "input": "", "output": "فیلد | نوع | توضیحات\nrows | Optional[List[KeypadRow]] | ردیف‌های کیپد\nresize_keyboard | Optional[bool] | آیا کیبورد قابل تغییر سایز است؟\non_time_keyboard | Optional[bool] | آیا کیبورد موقت/زمانی است؟" }, { "instruction": "MessageKeypadUpdate", "input": "", "output": "فیلد | نوع | توضیحات\nmessage_id | Optional[str] | شناسهٔ پیام مورد به‌روزرسانی\ninline_keypad | Optional[Keypad] | کیپد جدید اینلاین" }, { "instruction": "MessageId", "input": "", "output": "فیلد | نوع | توضیحات\nmessage_id | Optional[str] | شناسهٔ پیام قدیمی\nnew_message_id | Optional[str] | شناسهٔ پیام جدید (در صورت replace)\nfile_id | Optional[str] | شناسهٔ فایل مرتبط\nchat_id | Optional[str] | شناسهٔ چت پیام\nclient | Optional[\"rubpy.BotClient\"] | ارجاع به کلاینت برای انجام عملیات\n\nمتدها (async)\n\ndelete()\n— حذف پیام (فراخوانی\nclient.delete_message(chat_id, message_id or new_message_id)\n)\nedit_text(new_text: str)\n— ویرایش متن پیام (فراخوانی\nclient.edit_message_text(chat_id, message_id or new_message_id, new_text)\n)\n\nتوجه: برای کارکرد متدها،\nclient\nباید ست شده باشد." }, { "instruction": "Message", "input": "", "output": "فیلد | نوع | توضیحات\nmessage_id | Optional[MessageId] | شناسهٔ پیام (MessageId)\ntext | Optional[str] | متن پیام\ntime | Optional[int] | timestamp پیام\nis_edited | Optional[bool] | آیا پیام ویرایش شده؟\nsender_type | Optional[MessageSenderEnum] | نوع فرستنده (enum)\nsender_id | Optional[str] | شناسهٔ فرستنده\naux_data | Optional[AuxData] | داده‌های کمکی مرتبط\nfile | Optional[File] | فایل پیوستی (در صورت وجود)\nreply_to_message_id | Optional[str] | شناسهٔ پیام که این پیام به آن پاسخ داده شده\nforwarded_from | Optional[ForwardedFrom] | اطلاعات فوروارد\nforwarded_no_link | Optional[str] | نسخهٔ فوروارد بدون لینک (رشتهٔ API)\nlocation | Optional[Location] | اطلاعات مکان (در صورت وجود)\nsticker | Optional[Sticker] | استیکر (در صورت وجود)\ncontact_message | Optional[ContactMessage] | کانتکت (در صورت وجود)\npoll | Optional[Poll] | نظرسنجی (در صورت وجود)\nlive_location | Optional[LiveLocation] | موقعیت زنده (در صورت وجود)" }, { "instruction": "Update", "input": "", "output": "فیلد | نوع | توضیحات\ntype | Optional[UpdateTypeEnum] | نوع آپدیت (پیام جدید، ویرایش، حذف و ...)\nchat_id | Optional[str] | شناسهٔ چت مرتبط با آپدیت\nremoved_message_id | Optional[str] | شناسهٔ پیام حذف‌شده (در صورت وجود)\nnew_message | Optional[Message] | پیام جدید (در رویداد پیام جدید)\nupdated_message | Optional[Message] | پیام به‌روزرسانی‌شده (در ویرایش)\nupdated_payment | Optional[PaymentStatus] | به‌روزرسانی وضعیت پرداخت (در رویداد پرداخت)\nclient | Optional[\"rubpy.BotClient\"] | ارجاع به کلاینت برای انجام عملیات\n\nمتدهای کاربردی (همه async)\n\nreply(text, chat_keypad=None, inline_keypad=None, disable_notification=False, chat_keypad_type=ChatKeypadTypeEnum.NONE, chat_id=None) -> MessageId\nارسال متن (فراخوانی\nclient.send_message\n) — به‌صورت خودکار\nreply_to_message_id\nرا از\nself.new_message.message_id\nمی‌گیرد (در صورت وجود).\nreply_file(...), reply_photo(...), reply_video(...), reply_voice(...), reply_music(...), reply_gif(...)\nشورت‌کات‌های ارسال فایل با نوع مشخص (فراخوانی\nclient.send_file\nبا پارامتر\ntype\n).\ndelete(chat_id=None, message_id=None)\n— حذف پیام (فراخوانی\nclient.delete_message\n).\ndownload(file_id=None, save_as=None, progress=None, chunk_size=65536, as_bytes=False) -> Union[str, bytes, None]\nدانلود فایل با امکان ذخیره یا بازگرداندن بایت‌ها (فراخوانی\nclient.download_file\n).\n\nهمهٔ متدها ابتدا بررسی می‌کنند که\nself.client\nست شده باشد و در غیر این صورت\nValueError\nپرتاب می‌شود." }, { "instruction": "InlineMessage", "input": "", "output": "فیلد | نوع | توضیحات\nsender_id | Optional[str] | شناسهٔ فرستندهٔ اینلاین\ntext | Optional[str] | متن\nfile | Optional[File] | فایل پیوست (در صورت وجود)\nlocation | Optional[Location] | مکان (در صورت وجود)\naux_data | Optional[AuxData] | دادهٔ کمکی\nmessage_id | Optional[str] | شناسهٔ پیام اینلاین\nchat_id | Optional[str] | شناسهٔ چت/کاربری که پیام را دریافت می‌کند\nclient | Optional[\"rubpy.BotClient\"] | ارجاع به کلاینت\n\nمتدهای مشابه\nUpdate\n(async)\nreply\n,\nreply_file\n,\nreply_photo\n,\nreply_voice\n,\nreply_music\n,\nreply_gif\n,\nreply_video\n,\ndelete\n— همان کارکرد\nUpdate\nرا دارند ولی روی\nself.chat_id\n/\nself.message_id\nاجرا می‌شوند." }, { "instruction": "ChatTypeEnum", "input": "", "output": "عضو | مقدار\nUSER | \"User\"\nBOT | \"Bot\"\nGROUP | \"Group\"\nCHANNEL | \"Channel\"\n\nتوضیح:\nنمایانگر نوع چت — کاربر عادی، ربات، گروه یا کانال." }, { "instruction": "ForwardedFromEnum", "input": "", "output": "عضو | مقدار\nUSER | \"User\"\nCHANNEL | \"Channel\"\nBOT | \"Bot\"\n\nتوضیح:\nمشخص‌کنندهٔ منبع یک پیام فورواردشده." }, { "instruction": "PaymentStatusEnum", "input": "", "output": "عضو | مقدار\nPaid | \"Paid\"\nNotPaid | \"NotPaid\"\n\nتوضیح:\nوضعیت پرداخت (پرداخت شده یا نشده)." }, { "instruction": "PollStatusEnum", "input": "", "output": "عضو | مقدار\nOPEN | \"Open\"\nCLOSED | \"Closed\"\n\nتوضیح:\nوضعیت نظرسنجی." }, { "instruction": "LiveLocationStatusEnum", "input": "", "output": "عضو | مقدار\nSTOPPED | \"Stopped\"\nLIVE | \"Live\"\n\nتوضیح:\nوضعیت موقعیت زنده (قطع/فعال)." }, { "instruction": "ButtonSelectionTypeEnum", "input": "", "output": "عضو | مقدار\nTextOnly | \"TextOnly\"\nTextImgThu | \"TextImgThu\"\nTextImgBig | \"TextImgBig\"\n\nتوضیح:\nنحوهٔ نمایش آیتم‌های انتخاب (فقط متن، تصویر کوچک+متن، تصویر بزرگ+متن)." }, { "instruction": "ButtonSelectionSearchEnum", "input": "", "output": "عضو | مقدار\nNONE | \"None\"\nLocal | \"Local\"\nApi | \"Api\"\n\nتوضیح:\nمنشأ جستجو برای آیتم‌های انتخاب (بدون جستجو، محلی، یا از API)." }, { "instruction": "ButtonSelectionGetEnum", "input": "", "output": "عضو | مقدار\nLocal | \"Local\"\nApi | \"Api\"\n\nتوضیح:\nروش واکشی آیتم‌ها (محلی یا از API)." }, { "instruction": "ButtonCalendarTypeEnum", "input": "", "output": "عضو | مقدار\nDatePersian | \"DatePersian\"\nDateGregorian | \"DateGregorian\"\n\nتوضیح:\nنوع تقویم مورد استفاده در ButtonCalendar." }, { "instruction": "ButtonTextboxTypeKeypadEnum", "input": "", "output": "عضو | مقدار\nSTRING | \"String\"\nNUMBER | \"Number\"\n\nتوضیح:\nنوع کیپد برای ورودی متنی: رشته یا عدد." }, { "instruction": "ButtonTextboxTypeLineEnum", "input": "", "output": "عضو | مقدار\nSingleLine | \"SingleLine\"\nMultiLine | \"MultiLine\"\n\nتوضیح:\nتک‌خطی یا چندخطی بودن ورودی متنی." }, { "instruction": "ButtonLocationTypeEnum", "input": "", "output": "عضو | مقدار\nPICKER | \"Picker\"\nVIEW | \"View\"\n\nتوضیح:\nحالت نمایش/تعامل نقشه (انتخاب نقطه یا مشاهده)." }, { "instruction": "ButtonTypeEnum", "input": "", "output": "عضو | مقدار\nSIMPLE | \"Simple\"\nSELECTION | \"Selection\"\nCALENDAR | \"Calendar\"\nNumberPicker | \"NumberPicker\"\nStringPicker | \"StringPicker\"\nLOCATION | \"Location\"\nPAYMENT | \"Payment\"\nCameraImage | \"CameraImage\"\nCameraVideo | \"CameraVideo\"\nGalleryImage | \"GalleryImage\"\nGalleryVideo | \"GalleryVideo\"\nFILE | \"File\"\nAUDIO | \"Audio\"\nRecordAudio | \"RecordAudio\"\nMyPhoneNumber | \"MyPhoneNumber\"\nMyLocation | \"MyLocation\"\nTextbox | \"Textbox\"\nLINK | \"Link\"\nAskMyPhoneNumber | \"AskMyPhoneNumber\"\nAskLocation | \"AskLocation\"\nBARCODE | \"Barcode\"\n\nتوضیح:\nانواع مختلف دکمه‌ها که در کیپدها پشتیبانی می‌شود." }, { "instruction": "ButtonLinkTypeEnum", "input": "", "output": "عضو | مقدار\nURL | \"url\"\nJoinChannel | \"joinchannel\"\n\nتوضیح:\nنوع لینک‌های قابل استفاده در دکمه‌ها." }, { "instruction": "MessageSenderEnum", "input": "", "output": "عضو | مقدار\nUSER | \"User\"\nBOT | \"Bot\"\n\nتوضیح:\nنوع فرستندهٔ پیام." }, { "instruction": "UpdateTypeEnum", "input": "", "output": "عضو | مقدار\nUpdatedMessage | \"UpdatedMessage\"\nNewMessage | \"NewMessage\"\nRemovedMessage | \"RemovedMessage\"\nStartedBot | \"StartedBot\"\nStoppedBot | \"StoppedBot\"\nUpdatedPayment | \"UpdatedPayment\"\n\nتوضیح:\nانواع رویدادهای آپدیت که API می‌تواند ارسال کند." }, { "instruction": "ChatKeypadTypeEnum", "input": "", "output": "عضو | مقدار\nNONE | \"None\"\nNEW | \"New\"\nREMOVE | \"Remove\"\n\nتوضیح:\nنوع عملیات بر روی کیپد چت (هیچ، جدید، حذف)." }, { "instruction": "UpdateEndpointTypeEnum", "input": "", "output": "عضو | مقدار\nReceiveUpdate | \"ReceiveUpdate\"\nReceiveInlineMessage | \"ReceiveInlineMessage\"\nReceiveQuery | \"ReceiveQuery\"\nGetSelectionItem | \"GetSelectionItem\"\nSearchSelectionItems | \"SearchSelectionItems\"\n\nتوضیح:\nانواع endpointهایی که بات می‌تواند برای webhook ثبت کند." }, { "instruction": "نمونۀ استفاده", "input": "", "output": "from\nrubpy.bot.enums\nimport\nChatTypeEnum\n,\nUpdateTypeEnum\n# مقایسه با مقدار دریافتی از API (رشته‌ای)\nif\nchat\n.\nchat_type\n==\nChatTypeEnum\n.\nUSER\n:\nprint\n(\n\"This is a user chat\"\n)\n# گرفتن مقدار متنی برای ارسال به API\npayload\n=\n{\n\"chat_keypad_type\"\n:\nChatKeypadTypeEnum\n.\nNEW\n}\n# استفاده در بررسی نوع آپدیت\nif\nupdate\n.\ntype\n==\nUpdateTypeEnum\n.\nNewMessage\n:\n# handle new message\npass" }, { "instruction": "سلام دنیا", "input": "", "output": "فایل:\nhello_world.py\n\nfrom\nrubpy\nimport\nBotClient\n# Create a new Client instance\napp\n=\nBotClient\n(\n\"bot-token\"\n)\nasync\ndef\nmain\n():\n# Start client\nawait\napp\n.\nstart\n()\n# Send a message, Markdown is enabled by default\nawait\napp\n.\nsend_message\n(\n\"chat_id\"\n,\n\"Hi there! I'm using **Rubpy**\"\n)\n# Close client\nawait\napp\n.\nstop\n()\nimport\nasyncio\nasyncio\n.\nrun\n(\nmain\n())" }, { "instruction": "دکمه های لینک دار", "input": "", "output": "فایل:\nbutton_link.py\n\n\"\"\"\nThis source code is just a sample for rubpy.BotClient\nYou can edit the source code whenever you want.\n\"\"\"\nfrom\nrubpy\nimport\nBotClient\nfrom\nrubpy.bot\nimport\nfilters\nfrom\nrubpy.bot.models\nimport\n(\nButtonLink\n,\nJoinChannelData\n,\nUpdate\n,\nKeypad\n,\nKeypadRow\n,\nButton\n,\n)\nfrom\nrubpy.bot.enums\nimport\nButtonLinkTypeEnum\n,\nButtonTypeEnum\nbot\n=\nBotClient\n(\ntoken\n=\n\"your-bot-token\"\n)\n@bot\n.\non_update\n(\nfilters\n.\ncommands\n(\n\"start\"\n))\nasync\ndef\nhandle_start\n(\nbot\n,\nupdate\n:\nUpdate\n):\nkeypad\n=\nKeypad\n(\nrows\n=\n[\nKeypadRow\n(\nbuttons\n=\n[\nButton\n(\nid\n=\n\"1\"\n,\ntype\n=\nButtonTypeEnum\n.\nLINK\n,\nbutton_text\n=\n\"عضویت اجباری\"\n,\nbutton_link\n=\nButtonLink\n(\ntype\n=\nButtonLinkTypeEnum\n.\nJoinChannel\n,\njoinchannel_data\n=\nJoinChannelData\n(\nusername\n=\n\"rubikapy\"\n,\nask_join\n=\nTrue\n),\n# اگر ask_join برابر False باشد کاربر مستقیما بدون پرسش عضو کانال میشود.\n),\n)\n]\n),\nKeypadRow\n(\nbuttons\n=\n[\nButton\n(\nid\n=\n\"2\"\n,\ntype\n=\nButtonTypeEnum\n.\nLINK\n,\nbutton_text\n=\n\"باز کردن لینک\"\n,\nbutton_link\n=\nButtonLink\n(\ntype\n=\nButtonLinkTypeEnum\n.\nURL\n,\nlink_url\n=\n\"https://shayan-heidari.ir/\"\n,\n),\n),\n]\n),\n],\nresize_keyboard\n=\nTrue\n,\non_time_keyboard\n=\nFalse\n,\n)\nawait\nupdate\n.\nreply\n(\n\"سلام! خوش اومدی. از دکمه‌های زیر برای کار با ربات استفاده کن:\"\n,\ninline_keypad\n=\nkeypad\n,\n)\nbot\n.\nrun\n()" }, { "instruction": "بازتاب پیام", "input": "", "output": "فایل:\necho_bot.py\n\nfrom\nrubpy\nimport\nBotClient\nfrom\nrubpy.bot\nimport\nfilters\nfrom\nrubpy.bot.models\nimport\nUpdate\napp\n=\nBotClient\n(\n\"bot-token\"\n)\n@app\n.\non_update\n(\nfilters\n.\ntext\n,\nfilters\n.\nprivate\n)\nasync\ndef\necho\n(\nclient\n,\nupdate\n:\nUpdate\n):\nawait\nupdate\n.\nreply\n(\nupdate\n.\nnew_message\n.\ntext\n)\napp\n.\nrun\n()\n# Automatically start()" }, { "instruction": "بات دریافت شناسه", "input": "", "output": "فایل:\nmy_chat_id.py\n\nfrom\nrubpy.bot\nimport\nBotClient\n,\nfilters\nfrom\nrubpy.bot.models\nimport\nUpdate\nbot\n=\nBotClient\n(\n'your-bot-token'\n)\n@bot\n.\non_update\n(\nfilters\n.\ncommands\n(\n'start'\n))\nasync\ndef\nhandle_start\n(\nc\n:\nBotClient\n,\nupdate\n:\nUpdate\n):\nif\nupdate\n.\nnew_message\n:\ntext\n=\n(\n\"🆔 شناسه کاربری شما:\n\\n\n{user_id}\n\\n\\n\n\"\n\"💬 شناسه چت شما:\n\\n\n{chat_id}\n\\n\\n\n\"\n)\n.\nformat\n(\nuser_id\n=\nupdate\n.\nnew_message\n.\nsender_id\n,\nchat_id\n=\nupdate\n.\nchat_id\n)\nawait\nupdate\n.\nreply\n(\ntext\n)\nbot\n.\nrun\n()" }, { "instruction": "استفاده از states", "input": "", "output": "فایل:\nstate_filter.py\n\nfrom\nrubpy.bot\nimport\nBotClient\n,\nfilters\nfrom\nrubpy.bot.models\nimport\nUpdate\napp\n=\nBotClient\n(\n\"bot-token\"\n)\n# 1) یک نمونهٔ فیلتر بساز (می‌تونی پارامترها رو تغییر بدی)\nstate_filter\n=\nfilters\n.\nstates\n(\n\"awaiting_email\"\n,\nmatch_mode\n=\n\"exact\"\n,\nscope\n=\n\"user\"\n,\nauto_clear\n=\nTrue\n)\n@app\n.\non_update\n(\nfilters\n.\ncommands\n(\n\"start\"\n))\nasync\ndef\nstart\n(\nc\n,\nupdate\n:\nUpdate\n):\n# ست کردن state (با TTL 5 دقیقه)\nawait\nstate_filter\n.\nset_state_for\n(\nupdate\n,\n\"awaiting_email\"\n,\nexpire\n=\n300\n)\nawait\nupdate\n.\nreply\n(\n\"لطفاً ایمیل خود را ارسال کنید.\"\n)\n# 2) دستی پاک کردن (مثال)\n@app\n.\non_update\n(\nfilters\n.\ncommands\n(\n\"cancel\"\n))\nasync\ndef\ncancel\n(\nc\n,\nupdate\n:\nUpdate\n):\nawait\nstate_filter\n.\nclear_state_for\n(\nupdate\n)\nawait\nupdate\n.\nreply\n(\n\"جریان لغو شد.\"\n)\n# 3) handler ای که با state کار می‌کنه (فقط با فیلتر)\n@app\n.\non_update\n(\nstate_filter\n)\nasync\ndef\ngot_email\n(\nc\n,\nupdate\n:\nUpdate\n):\ntext\n=\nupdate\n.\nfind_key\n(\n\"text\"\n)\n# process, validate email...\nawait\nupdate\n.\nreply\n(\nf\n\"ایمیل دریافت شد:\n{\ntext\n}\n\"\n)\napp\n.\nrun\n()" }, { "instruction": "یک مثال از میان افزار", "input": "", "output": "فایل:\nmiddleware_example.py" }, { "instruction": "ترتیب اجرای Middleware ها", "input": "", "output": "هر آپدیت جدیدی که بیاد، این مسیر رو طی می‌کنه:\n\nlogger\n→ همیشه لاگ می‌گیره.\nauth_checker\n→ اگه کاربر غیرمجاز باشه، مسیر قطع می‌شه.\nrate_limiter\n→ اگه اسپم باشه، قطع می‌شه.\nدر نهایت می‌ره به\nmain_handler\n.\n\nfrom\nrubpy.bot\nimport\nBotClient\n,\nfilters\nfrom\nrubpy.bot.models\nimport\nUpdate\n,\nInlineMessage\nfrom\ncollections\nimport\ndefaultdict\nimport\ntime\nuser_timestamps\n=\ndefaultdict\n(\nfloat\n)\nbot\n=\nBotClient\n(\n\"your-bot-token\"\n)\n# 🔹 Middleware 1: Logger\n@bot\n.\nmiddleware\n()\nasync\ndef\nlogger\n(\nbot\n,\nupdate\n,\ncall_next\n):\n\"\"\"\nLogs every update before it reaches the handlers.\n\"\"\"\nupdate_type\n=\n\"InlineMessage\"\nif\nisinstance\n(\nupdate\n,\nInlineMessage\n)\nelse\nupdate\n.\ntype\nuser_id\n=\ngetattr\n(\nupdate\n,\n\"chat_id\"\n,\nNone\n)\nprint\n(\nf\n\"📥 [Logger] type=\n{\nupdate_type\n}\n, user=\n{\nuser_id\n}\n\"\n)\nawait\ncall_next\n()\n# ادامه بده به middleware بعدی یا handler\n# 🔹 Middleware 2: Auth Checker\n@bot\n.\nmiddleware\n()\nasync\ndef\nauth_checker\n(\nbot\n,\nupdate\n,\ncall_next\n):\n\"\"\"\nBlocks users that are not in allowed list.\n\"\"\"\nallowed_users\n=\n{\n\"b0IYdTF0EWT0d3c486d5205d051e86c5\"\n}\n# فقط این کاربرا مجازن\nuser_id\n=\ngetattr\n(\nupdate\n,\n\"chat_id\"\n,\nNone\n)\nif\nuser_id\nnot\nin\nallowed_users\n:\nprint\n(\nf\n\"🚫 [Auth] کاربر\n{\nuser_id\n}\nاجازه دسترسی نداره\"\n)\nreturn\n# نذار به هندلر برسه\nawait\ncall_next\n()\n# 🔹 Middleware 3: Rate Limiter\n@bot\n.\nmiddleware\n()\nasync\ndef\nrate_limiter\n(\nbot\n,\nupdate\n,\ncall_next\n):\n\"\"\"\nPrevents users from spamming (1 message per 3 seconds).\n\"\"\"\nuser_id\n=\ngetattr\n(\nupdate\n,\n\"chat_id\"\n,\nNone\n)\nnow\n=\ntime\n.\ntime\n()\nif\nuser_id\nand\nnow\n-\nuser_timestamps\n[\nuser_id\n]\n<\n3\n:\nprint\n(\nf\n\"⚠️ [RateLimit] کاربر\n{\nuser_id\n}\nداره اسپم می‌کنه\"\n)\nreturn\nuser_timestamps\n[\nuser_id\n]\n=\nnow\nawait\ncall_next\n()\n# 🔹 Handler\n@bot\n.\non_update\n(\nfilters\n.\ntext\n)\nasync\ndef\nmain_handler\n(\nbot\n,\nupdate\n:\nUpdate\n):\nprint\n(\nf\n\"✅ Handler: پیام دریافت شد →\n{\nupdate\n.\nchat_id\n}\n\"\n)\nawait\nupdate\n.\nreply\n(\n\"پیام شما دریافت شد ✅\"\n)\nbot\n.\nrun\n()" }, { "instruction": "نکته‌ها", "input": "", "output": "اگه\nهیچکدوم\nreturn\nنکنن، همه اجرا می‌شن و در نهایت می‌ره به هندلر.\nمی‌تونی middleware ها رو برای\nتست A/B، cache، ترجمه متن، حتی اضافه کردن context به آپدیت\nاستفاده کنی.\nترتیب ثبت شدن (\n@bot.middleware()\n) مهمه؛ همون ترتیبی که نوشتی، اجرا می‌شن." }, { "instruction": "چطور یک نمونه BotClient بسازیم؟", "input": "", "output": "این کلاس شامل پارامترهایی برای تنظیم برخی تنظیمات است.\nclient\n=\nBotClient\n(\ntoken\n=\n\"YOUR_BOT_TOKEN\"\n,\nrate_limit\n=\n0.5\n,\n# تأخیر بین درخواست‌ها (ثانیه)\nuse_webhook\n=\nFalse\n# True برای وبهوک\n)" }, { "instruction": "پارامترهای سازنده BotClient چیست؟", "input": "", "output": "پارامتر | نوع | پیش‌فرض | توضیحات\ntoken | str | — | توکن صادرشده توسط روبیکا.\nrate_limit | float | 0.5 | حداقل فاصله بین درخواست‌ها برای جلوگیری از محدودیت.\nuse_webhook | bool | False | تعیین حالت اجرا (وب‌هوک یا پولینگ).\ntimeout | float | 10.0 | تایم‌اوت کلی هر درخواست HTTP.\nconnector | aiohttp.TCPConnector | None | اشتراک‌گذاری کانکشن با اپلیکیشن‌های دیگر.\nmax_retries | int | 3 | تعداد تلاش مجدد برای خطاهای قابل بازیابی.\nbackoff_factor | float | 0.5 | ضریب تصاعدی برای تأخیر بین تلاش‌های مجدد.\nretry_statuses | Tuple[int,...] | (408,425,429,500,502,503,504) | کدهای HTTP که باعث تلاش مجدد می‌شوند.\nlong_poll_timeout | float | 30.0 | افزودن تایم‌اوت به درخواست (getUpdates) برای پولینگ طولانی.\nparse_mode | ParseMode \\| str | ParseMode.MARKDOWN | حالت پیش‌فرض قالب‌بندی متن.\nfallback_urls | Sequence[str] | (\"https://botapi.rubika.ir/v3/{}/\",) | URLهای جایگزین در صورت قطعی آدرس اصلی.\nignore_timeout | bool | False | ادامهٔ تلاش در خطاهای Timeout.\nplugins | Sequence[str] | None | فهرست پلاگین‌های فعال شوندهٔ خودکار.\nauto_enable_plugins | bool | False | فعال‌سازی خودکار پلاگین‌ها هنگام start.\nplugin_entry_point_group | str | \"rubpy.plugins\" | گروه entry point برای کشف پلاگین‌ها.\nplugin_manager_class | Type[PluginManager] | PluginManager | کلاس مدیریت پلاگین.\n\nنکته:\nاز کانتکست‌منیجرهای\nasync with BotClient(...)\nو\nwith BotClient(...)\nنیز می‌توان برای مدیریت خودکار\nstart/stop\nاستفاده کرد." }, { "instruction": "چطور بات را با BotClient شروع کنیم؟", "input": "", "output": "متد:\nstart\n\nپارامتر | نوع | توضیحات\n— | — | شروع و آماده سازی BotClient برای ارتباط با API بات روبیکا\n\nشرح کوتاه:\nآماده‌سازی سشن HTTP برای ارسال درخواست‌ها.\n\nبازگشت:\nNone\n(async)" }, { "instruction": "مدیریت پلاگین‌ها در BotClient چگونه است؟", "input": "", "output": "متد | توضیحات\nenable_plugins(identifiers: Optional[Sequence[str]] = None) | پلاگین‌های مشخص‌شده یا فهرست پیش‌فرضِ سازنده را فعال می‌کند. خروجی: List[Plugin].\ndisable_plugins(identifiers: Optional[Sequence[str]] = None) | اگر شناسه ندهید تمام پلاگین‌های فعال غیرفعال می‌شوند.\nregister_plugin(plugin_cls, name=None) | پلاگین جدید را به مدیر داخلی ثبت می‌کند و نام یکتا بازمی‌گرداند.\n\nنکته:\nاین API با سیستم\nentry points\nپایتون سازگار است؛ با فعال بودن\nauto_enable_plugins\nپلاگین‌ها هنگام\nstart\nفعال می‌شوند." }, { "instruction": "چطور کیپد چت را در BotClient مدیریت کنیم؟", "input": "", "output": "edit_chat_keypad\n: برای تغییر کیبورد نمایشی چت.\nmiddleware\n+\nprocess_update\n: امکان ساخت کیبوردهای تعاملی پیچیده را فراهم می‌کند." }, { "instruction": "چطور متن و متادیتا را در پیام‌های بات فرمت کنیم؟", "input": "", "output": "_apply_text_formatting\n: براساس\nparse_mode\nمتن را به Markdown داخلی تبدیل کرده و\nmetadata\nرا (در صورت ارسال\nMetadata\nاز rubpy.bot.models) به payload اضافه می‌کند.\nحالت‌های معتبر:\nParseMode.MARKDOWN\n,\nParseMode.HTML\n, یا\nNone\n(متن خام)." }, { "instruction": "غیرفعال کردن بات", "input": "", "output": "متد:\nstop\n\nپارامتر | نوع | توضیحات\n— | — | آماده سازی برای متوقف کردن\n\nشرح کوتاه:\nمتوقف کردن client و بستن منابع.\n\nبازگشت:\nNone\n(async)" }, { "instruction": "اجرای بات", "input": "", "output": "متد:\nrun\n\nپارامتر | نوع | توضیحات\nwebhook_url | Optional[str] | اگر تعیین شود، وب‌هوک فعال می‌شود\npath | Optional[str] | مسیر وب‌هوک (پیش‌فرض /webhook)\nhost | str | میزبان برای وب‌سرور (پیش‌فرض 0.0.0.0)\nport | int | پورت وب‌سرور (پیش‌فرض 8080)\n\nشرح کوتاه:\nمتد اجرایی اصلی:\n\nاگر\nwebhook_url\nارائه شده باشد: یک سرور\naiohttp.web\nبرای دریافت وب‌هوک‌ها راه‌اندازی و endpoint‌ها به API ثبت می‌شوند.\nدر غیر این صورت: وارد حلقهٔ پولینگ (\nupdater\n) شده و به‌صورت دوره‌ای\ngetUpdates\nمی‌خواند و\nprocess_update\nاجرا می‌شود.\n\nبازگشت:\nNone\n(async)\n\nنکات:\nrun\nخودش\nstart()\nرا فراخوانی می‌کند؛ در حالت وب‌هوک باید HTTPS و احیاناً مکانیزم اعتبارسنجی اضافه در نظر گرفته شود." }, { "instruction": "کانتکست‌منیجر", "input": "", "output": "__aenter__\n/\n__aexit__\n: اجرای خودکار\nstart/stop\nدر محیط‌های async.\n__enter__\n/\n__exit__\n: نسخهٔ همگام برای اسکریپت‌های ساده." }, { "instruction": "مدیریت سشن و محدودیت سرعت", "input": "", "output": "_ensure_session\n: ایجاد\naiohttp.ClientSession\nبا هدر کاربری روبیکا و تنظیمات محدودیت اتصال.\n_rate_limit_delay\n: قبل از هر درخواست، اختلاف زمان آخرین درخواست را بررسی کرده و در صورت نیاز\nawait asyncio.sleep\nانجام می‌دهد.\n_make_request\n: تمهیدات کامل برای تلاش مجدد، سوییچ خودکار بین\nBASE_URL\nو\nFALLBACK_URLS\nو تبدیل خطاها به\nAPIException\n." }, { "instruction": "دریافت اطلاعات بات", "input": "", "output": "متد:\nget_me\n\nپارامتر | نوع | توضیحات\n— | — | دریافت اطلاعات بات\n\nشرح کوتاه:\nدریافت اطلاعات بات.\n\nبازگشت:\nBot\n(async)\n\nمثال:\n\nbot\n=\nawait\nclient\n.\nget_me\n()" }, { "instruction": "ارسال پیام متنی", "input": "", "output": "متد:\nsend_message\n\nپارامتر | نوع | توضیحات\nchat_id | str | شناسهٔ مقصد\ntext | str | متن پیام\nchat_keypad | Optional[Keypad] | کیپد چت\ninline_keypad | Optional[Keypad] | کیپد اینلاین\ndisable_notification | bool | غیرفعال کردن اعلان؟ (پیشفرض False)\nreply_to_message_id | Optional[str] | در جوابِ پیامِ؟\nchat_keypad_type | ChatKeypadTypeEnum | نوع کیپد چت\n\nشرح کوتاه:\nارسال پیام های متنی، به همراه پشتیبانی از Keypad و InlineKeypad.\n\nبازگشت:\nMessageId\n(async)\n\nمثال:\n\nmid\n=\nawait\nclient\n.\nsend_message\n(\n\"chat_id\"\n,\n\"سلام!\"\n,\nchat_keypad\n=\nkeypad\n,\nchat_keypad_type\n=\nChatKeypadTypeEnum\n.\nSIMPLE\n)" }, { "instruction": "ارسال استیکر", "input": "", "output": "متد:\nsend_sticker\n\nپارامتر | نوع | توضیحات\nchat_id | str | شناسه مقصد\nsticker_id | str | شناسهٔ استیکر\nسایر پارامترها | — | مشابه send_message\n\nشرح کوتاه:\nارسال استیکر به چت.\n\nبازگشت:\nMessageId\n(async)" }, { "instruction": "ارسال فایل", "input": "", "output": "متد:\nsend_file\n\nپارامتر | نوع | توضیحات\nchat_id | str | شناسه مقصد\nfile | Optional[Union[str, Path]] | مسیر فایل در حافظه برای آپلود (اختیاری)\nfile_id | Optional[str] | شناسهٔ فایل اگر از قبل آپلود شده\ntext | Optional[str] | به عنوان کپشن فایل\nfile_name | Optional[str] | نام فایل هنگام آپلود\ntype | Literal[\"File\",\"Image\",\"Voice\",\"Music\",\"Gif\",\"Video\"] | نوع فایل\nسایر پارامترها | — | مشابه send_message\n\nشرح کوتاه:\nاگر مسیر فایل به پارامتر\nfile\nداده شود، ابتدا فایل آپلود شده و سپس ارسال می‌شود، در غیر این صورت، اگر\nfile_id\nبه پارامتر مربوطه داده شود، فایل مستقیما، بدون نیاز به آپلود مجدد ارسال می‌شود.\n\nبازگشت:\nMessageId\n(async) —\nfile_id\nنیز در نتیجه قرار می‌گیرد.\n\nمثال:\n\nmid\n=\nawait\nclient\n.\nsend_file\n(\n\"chat_id\"\n,\nfile\n=\n\"/tmp/photo.jpg\"\n,\ntype\n=\n\"Image\"\n,\ntext\n=\n\"عکس\"\n)" }, { "instruction": "درخواست ارسال فایل", "input": "", "output": "متد:\nrequest_send_file\n\nپارامتر | نوع | توضیحات\ntype | Literal[...] | نوع فایل مجاز\n\nشرح کوتاه:\nارسال درخواست آپلود فایل به سرور روبیکا و دریافت\nupload_url\nدر صورت مجاز بودن\ntype\nبرای آپلود فایل در سرور روبیکا.\n\nبازگشت:\nstr\n—\nupload_url\n\nخطا:\nاگر\ntype\nنامعتبر باشد\nValueError\nخواهد داد." }, { "instruction": "بارگذاری فایل", "input": "", "output": "متد:\nupload_file\n\nپارامتر | نوع | توضیحات\nurl | str | آدرس آپلود دریافت‌شده\nfile_name | str | نام فایل\nfile_path | str | مسیر محلی فایل\n\nشرح کوتاه:\nآپلود فایل در سرور روبیکا با استفاده از آدرسی که توسط متد\nrequest_send_file\nدریافت کرده‌ایم.\n\nبازگشت:\nstr\n—\nfile_id" }, { "instruction": "دریافت فایل", "input": "", "output": "متد:\nget_file\n\nپارامتر | نوع | توضیحات\nfile_id | str | شناسهٔ فایل\n\nشرح کوتاه:\nدریافت آدرس دانلود فایل (\ndownload_url\n) با استفاده از\nfile_id\n\nبازگشت:\nstr\n—\ndownload_url" }, { "instruction": "بارگیری فایل", "input": "", "output": "متد:\ndownload_file\n\nپارامتر | نوع | توضیحات\nfile_id | str | شناسهٔ فایل\nsave_as | Optional[str] | مسیر ذخیره (اگر as_bytes=False)\nprogress | Optional[Callable[[int,int],None]] | کال‌بک پیشرفت (downloaded, total)\nchunk_size | int | اندازهٔ chunk (بایت)\nas_bytes | bool | اگر True، محتوای بایتی برگردانده شود\n\nشرح کوتاه:\nدانلود فایل از سرور روبیکا با استفاده از آدرس دانلود فایل. اگر\nas_bytes\nبرابر\nTrue\nباشد، محتوای کامل فایل را به صورت کامل برمی‌گرداند، در غیر این صورت فایل را در حافظه ذخیره می‌کند و مسیر را بازمی‌گرداند.\n\nبازگشت:\nUnion[str, bytes, None]\n(async)\n\nخطاها:\nاگر\nget_file\nشکست بخورد\nValueError\nپرتاب می‌شود؛ اگر دانلود ناموفق باشد\nException\nپرتاب می‌شود." }, { "instruction": "ارسال نظرسنجی", "input": "", "output": "متد:\nsend_poll\n\nپارامتر | نوع | توضیحات\nchat_id | str | شناسه مقصد\nquestion | str | متن سوال\noptions | List[str] | گزینه‌ها\n\nشرح کوتاه:\nارسال نظرسنجی.\n\nبازگشت:\nMessageId\n(async)" }, { "instruction": "ارسال موقعیت مکانی", "input": "", "output": "متد:\nsend_location\n\nپارامتر | نوع | توضیحات\nchat_id | str | شناسه مقصد\nlatitude | Union[str,float] | عرض جغرافیایی\nlongitude | Union[str,float] | طول جغرافیایی\nسایر پارامترها | — | مشابه send_message\n\nشرح کوتاه:\nارسال موقعیت مکانی.\n\nبازگشت:\nMessageId\n(async)" }, { "instruction": "ارسال مخاطب", "input": "", "output": "متد:\nsend_contact\n\nپارامتر | نوع | توضیحات\nchat_id | str | شناسه مقصد\nfirst_name | str | نام مخاطب\nlast_name | str | نام خانوادگی\nphone_number | str | شماره تلفن\nسایر پارامترها | — | مشابه send_message\n\nشرح کوتاه:\nارسال اطلاعات تماس.\n\nبازگشت:\nMessageId\n(async)" }, { "instruction": "دریافت آپدیت ها", "input": "", "output": "متد:\nget_updates\n\nپارامتر | نوع | توضیحات\nlimit | int | تعداد آپدیت‌ها برای درخواست (پیش‌فرض 100)\noffset_id | str | آفست (اختیاری)\n\nشرح کوتاه:\nفراخوانی سادهٔ\ngetUpdates\nو تولید لیستی از اشیاء\nUpdate\n/\nInlineMessage\n(نسخهٔ نمونه حداقلی پیاده‌سازی شده).\n\nبازگشت:\nList[Union[Update, InlineMessage]]\n(async)" }, { "instruction": "حلقهٔ پولینگ پیشرفته", "input": "", "output": "متد:\nupdater\n\nپارامتر | نوع | توضیحات\nlimit | int | حداکثر تعداد آپدیت در هر درخواست.\noffset_id | str | آیدی ادامهٔ آپدیت‌ها؛ در صورت عدم مقدار از next_offset_id داخلی استفاده می‌شود.\npoll_timeout | float | افزودن تایم‌اوت به درخواست (getUpdates) برای پولینگ طولانی.\n\nشرح کوتاه:\nwrapper هوشمند برای\ngetUpdates\nکه موارد قدیمی را حذف کرده، آپدیت‌های حذف‌شده را نادیده می‌گیرد و\nself.next_offset_id\nرا نگه می‌دارد.\n\nبازگشت:\nList[Union[Update, InlineMessage]]\n(async) — هر آپدیت با\nclient\nتزریق‌شده بازمی‌گردد تا بتوان متدهای پاسخ‌دهی مثل\nupdate.reply\nرا صدا زد." }, { "instruction": "پردازش آپدیت", "input": "", "output": "متدها:\nprocess_update\n,\n_dispatch_update\n,\n_filters_pass\n\nprocess_update\n: زنجیرهٔ middlewareها را اجرا و سپس\n_dispatch_update\nرا صدا می‌زند.\n_dispatch_update\n: deduplication بر اساس\nmessage_id\n، اجرای نخستین هندلر که تمام فیلترها را پاس کند و پشتیبانی از هندلرهای sync/async.\n_filters_pass\n: نمونه‌سازی خودکار فیلترهایی که کلاس پاس داده شده‌اند و اجرای\nawait filter.check(update)\n." }, { "instruction": "دریافت وب‌هوک", "input": "", "output": "متد:\nhandle_webhook\n\nتنها درخواست‌های\nPOST\nرا می‌پذیرد و JSON را به\nUpdate\nیا\nInlineMessage\nتبدیل می‌کند.\nبرای هر آپدیت\nasyncio.create_task(self.process_update(update))\nفراخوانی می‌شود تا پاسخ سریع ارسال گردد.\nپاسخ موفق:\n{\"status\": \"OK\"}\n.\n\nنکته:\nrun\nهنگام فعال بودن وب‌هوک endpointهای\nReceiveUpdate\n,\nReceiveInlineMessage\n, ... را با آدرس جدید ثبت می‌کند." }, { "instruction": "دریافت اطلاعات گفتگو", "input": "", "output": "متد:\nget_chat\n\nپارامتر | نوع | توضیحات\nchat_id | str | شناسهٔ چت\n\nشرح کوتاه:\nدریافت اطلاعات گفتگو.\n\nبازگشت:\nChat\n(async)" }, { "instruction": "دریافت مدیران چت", "input": "", "output": "متد:\nget_chat_administrators\n\nپارامتر | نوع | توضیحات\nchat_id | str | شناسهٔ گفتگو\n\nشرح کوتاه:\nدریافت لیست مدیران گروه. (در صورتی که بات در گروه مورد نظر مدیر باشد)\n\nبازگشت:\nDict[str, Any]\n— پاسخ خام API شامل فهرست مدیران.\n\nمثال:\n\nadmins\n=\nawait\nclient\n.\nget_chat_administrators\n(\n\"chat_id\"\n)" }, { "instruction": "دریافت تعداد اعضای گروه", "input": "", "output": "متد:\nget_chat_member_count\n\nپارامتر | نوع | توضیحات\nchat_id | str | شناسهٔ گفتگو\n\nشرح کوتاه:\nدریافت تعداد ممبرهای یک گروه، در صورتی که بات در گروه ادمین باشد.\n\nبازگشت:\nint\n— تعداد اعضا.\n\nمثال:\n\nmember_count\n=\nawait\nclient\n.\nget_chat_member_count\n(\n\"chat_id\"\n)" }, { "instruction": "حذف عضو از گروه", "input": "", "output": "متد:\nban_chat_member\n\nپارامتر | نوع | توضیحات\nchat_id | str | شناسهٔ گفتگو\nuser_id | str | شناسهٔ کاربر مورد نظر\n\nشرح کوتاه:\nحذف یک عضو از گروه.\n\nبازگشت:\nbool\n— آیا حذف انجام شد؟\n\nمثال:\n\nawait\nclient\n.\nban_chat_member\n(\n\"chat_id\"\n,\n\"user_id\"\n)" }, { "instruction": "حذف عضو از لیست سیاه", "input": "", "output": "متد:\nunban_chat_member\n\nپارامتر | نوع | توضیحات\nchat_id | str | شناسهٔ گفتگو\nuser_id | str | شناسهٔ کاربر مورد نظر\n\nشرح کوتاه:\nحذف یک عضو از لیست سیاه گروه.\n\nبازگشت:\nbool\n— آیا حذف انجام شد؟\n\nمثال:\n\nawait\nclient\n.\nunban_chat_member\n(\n\"chat_id\"\n,\n\"user_id\"\n)" }, { "instruction": "دریافت اطلاعات عضو", "input": "", "output": "متد:\nget_chat_member\n\nپارامتر | نوع | توضیحات\nchat_id | str | شناسهٔ گروه یا کانال\nuser_id | str | شناسهٔ کاربر مورد نظر\n\nشرح کوتاه:\nدریافت اطلاعات عضو از گروه یا کانال در صورت عضو بودن.\n\nبازگشت:\nChatMember\n— اطلاعات عضو.\n\nمثال:\n\nawait\nclient\n.\nget_chat_member\n(\n\"chat_id\"\n,\n\"user_id\"\n)" }, { "instruction": "ارتقای عضو", "input": "", "output": "متد:\npromote_chat_member\n\nپارامتر | نوع | توضیحات\nchat_id | str | شناسهٔ گروه یا کانال\nuser_id | str | شناسهٔ کاربر مورد نظر\n\nشرح کوتاه:\nارتقا از عضو به مدیر در گروه یا کانال.\n\nبازگشت:\nbool\n— آیا ارتقا انجام شد؟\n\nمثال:\n\nawait\nclient\n.\npromote_chat_member\n(\n\"chat_id\"\n,\n\"user_id\"\n)" }, { "instruction": "تنظیم دسترسی کاربران در گفتگو", "input": "", "output": "متد:\nset_chat_permissions\n\nپارامتر | نوع | توضیحات\nchat_id | str | شناسه گروه\n\nشرح کوتاه:\nتنظیم دسترسی های کاربران در گفتگو.\n\nبازگشت:\nbool\n— آیا تنظیم دسترسی انجام شد؟\n\nمثال:\n\nawait\nclient\n.\nset_chat_permissions\n(\n\"chat_id\"\n,\n...\n)" }, { "instruction": "دکوراتور هندلر آپدیت", "input": "", "output": "متد:\non_update\n\nپارامتر | نوع | توضیحات\n*filters | Filter... | مجموعه‌ای از فیلترها (کلاس یا نمونه)\n\nشرح کوتاه:\nدکوراتور on_update یک دکوراتور سطح بالا برای ثبت هندلرها به همراه فیلترها است. شما میتوانید هندلرهای\nasync\nو\nsync\nرا همزمان در کنار یکدیگر استفاده کنید.\n\nمثال:\n\n@client\n.\non_update\n()\nasync\ndef\necho\n(\nclient\n,\nupdate\n):\nif\nupdate\n.\nnew_message\nand\nupdate\n.\nnew_message\n.\ntext\n:\nawait\nupdate\n.\nreply\n(\n\"pong\"\n)" }, { "instruction": "افزودن هندلر", "input": "", "output": "متد:\nadd_handler\n\nپارامتر | نوع | توضیحات\nhandler | Callable | تابعی با امضای (bot, update)\n*filters | Filter... | فیلترهای اجرایی مشابه on_update\n\nبازگشت:\nstr\n— کلید یکتا برای حذف بعدی.\n\nمثال:\n\nasync\ndef\nhello_world\n(\nclient\n,\nupdate\n):\nif\nupdate\n.\nnew_message\nand\nupdate\n.\nnew_message\n.\ntext\n:\nawait\nupdate\n.\nreply\n(\n\"Hello, World!\"\n)\nclient\n.\nadd_handler\n(\nhello_world\n,\nfilters\n.\ncommands\n(\n\"hello\"\n))\nmy_handler\n=\nclient\n.\nadd_handler\n(\nhello_world\n)" }, { "instruction": "حذف هندلر", "input": "", "output": "متد:\nremove_handler\n\nپارامتر | نوع | توضیحات\nhandler_key | str | خروجی add_handler یا on_update.\nhandler | Callable | (اختیاری) حذف فقط یک تابع خاص زیر همان کلید.\n\nبازگشت:\nbool\n— آیا هندلری حذف شد؟\n\nمثال:\n\nmy_handler\n=\nclient\n.\nadd_handler\n(\nhello_world\n)\nclient\n.\nremove_handler\n(\nmy_handler\n)" }, { "instruction": "به محض شروع", "input": "", "output": "متد:\non_start\n\nمثال:\n\n@app\n.\non_start\n()\nasync\ndef\ngreet\n(\nbot\n):\nprint\n(\n\"Bot started...\"\n)\nprint\n(\nawait\nbot\n.\nget_me\n())" }, { "instruction": "به محض خاموش شدن", "input": "", "output": "متد:\non_shutdown\n\nمثال:\n\n@app\n.\non_shutdown\n()\nasync\ndef\nbye\n(\nbot\n):\nprint\n(\n\"👋 Bot is shutting down!\"\n)" }, { "instruction": "میان‌افزار (Middleware)", "input": "", "output": "متد:\nmiddleware\n\nپارامتر | نوع | توضیحات\n— | — | این متد دکوراتور است؛ تابعی را می‌گیرد که قبل از رسیدن هر آپدیت به هندلرها اجرا می‌شود.\n\nشرح کوتاه:\nمیان‌افزارها لایه‌هایی هستند که روی جریان آپدیت‌ها قرار می‌گیرند. هر آپدیت قبل از رسیدن به هندلرها از زنجیرهٔ middlewareها عبور می‌کند. هر middleware سه آرگومان دریافت می‌کند:\n\nasync\ndef\nmiddleware\n(\nbot\n,\nupdate\n,\ncall_next\n):\n...\nawait\ncall_next\n()\n# ادامه مسیر به middleware بعدی یا هندلر اصلی\n\nbot\n: نمونه‌ی BotClient\nupdate\n: شیء Update یا InlineMessage\ncall_next\n: تابعی برای ارسال کنترل به middleware بعدی یا در نهایت هندلر\n\nاگر یک middleware\nawait call_next()\nرا صدا نزند، زنجیره متوقف می‌شود و هندلرها اجرا نمی‌شوند (برای مسدود کردن یا فیلتر کردن مفید است).\n\nبازگشت:\nNone\n(async)" }, { "instruction": "مثال ۱ — ارسال پیام ساده", "input": "", "output": "client\n=\nBotClient\n(\n\"MY_TOKEN\"\n)\nawait\nclient\n.\nstart\n()\nmid\n=\nawait\nclient\n.\nsend_message\n(\n\"chat_id\"\n,\n\"سلام، ربات آزمایشی!\"\n)\nawait\nclient\n.\nstop\n()" }, { "instruction": "مثال ۲ — آپلود و ارسال عکس", "input": "", "output": "mid\n=\nawait\nclient\n.\nsend_file\n(\n\"chat_id\"\n,\nfile\n=\n\"/tmp/photo.jpg\"\n,\ntype\n=\n\"Image\"\n,\ntext\n=\n\"عکس تست\"\n)" }, { "instruction": "مثال ۳ — ثبت هندلر و اجرای پولینگ", "input": "", "output": "@client\n.\non_update\n()\nasync\ndef\necho\n(\nclient\n,\nupdate\n):\nif\nupdate\n.\nnew_message\nand\nupdate\n.\nnew_message\n.\ntext\n:\nawait\nupdate\n.\nreply\n(\n\"دریافت شد: \"\n+\nupdate\n.\nnew_message\n.\ntext\n)\nawait\nclient\n.\nrun\n()\n# اجرای پولینگ (یا use webhook اگر webhook_url داده باشد)" }, { "instruction": "مثال ۴ — اجرا با وب‌هوک", "input": "", "output": "# فرض: سرویس شما در https://example.com است\nawait\nclient\n.\nrun\n(\nwebhook_url\n=\n\"https://example.com\"\n,\npath\n=\n\"/rubika/webhook\"\n,\nhost\n=\n\"0.0.0.0\"\n,\nport\n=\n8080\n)" }, { "instruction": "مثال ۵ — استفاده از پلاگین و middleware", "input": "", "output": "client\n=\nBotClient\n(\n\"TOKEN\"\n,\nauto_enable_plugins\n=\nTrue\n,\nplugins\n=\n[\n\"echo\"\n])\n@client\n.\nmiddleware\n()\nasync\ndef\nlogger\n(\nbot\n,\nupdate\n,\ncall_next\n):\nprint\n(\n\"Update arrived\"\n,\nupdate\n.\ntype\n)\nawait\ncall_next\n()\nawait\nclient\n.\nrun\n()" }, { "instruction": "استفادهٔ کلی", "input": "", "output": "from\nrubpy\nimport\nBotClient\nfrom\nrubpy.bot\nimport\nfilters\nbot\n=\nBotClient\n(\n\"your_bot_token\"\n)\n@bot\n.\non_update\n(\nfilters\n.\ntext\n(\n\"hello\"\n))\nasync\ndef\nhandle_hello\n(\nc\n,\nupdate\n):\nawait\nc\n.\nsend_message\n(\nupdate\n.\nchat_id\n,\n\"Hello!\"\n)" }, { "instruction": "طراحی کلی فیلترها", "input": "", "output": "همهٔ فیلترها\nآسینک\nهستند و متد\ncheck(update)\nرا پیاده‌سازی می‌کنند.\nیک فیلتر هنگام استفاده می‌تواند به‌صورت کلاس (نمونه‌سازی داخلی) یا نمونهٔ آماده به دکوراتور پاس داده شود.\nچند فیلتر را می‌توان به‌صورت positional به\n@on_update(...)\nپاس داد تا همگی با هم بررسی شوند (AND منطقی)." }, { "instruction": "text", "input": "", "output": "پارامتر | نوع | توضیحات\npattern | Optional[str] | متن یا الگوی regex (اگر None یعنی هر متنی)\nregex | bool | آیا pattern به‌صورت regex تفسیر شود؟ (پیش‌فرض False)\nignore_case | bool | نادیده گرفتن بزرگ/کوچک بودن حروف در مقایسه (پیش‌فرض True)\n\nشرح کوتاه:\nفیلتر بر اساس متن پیام؛ از تطبیق دقیق یا regex پشتیبانی می‌کند.\n\nبازگشت:\nنمونه‌ی فیلتر (قابل استفاده در\n@on_update\n)\n\nمثال‌ها:\n\n@bot\n.\non_update\n(\nfilters\n.\ntext\n)\n# هر متنی\nasync\ndef\nany_text\n(\nc\n,\nu\n):\n...\n@bot\n.\non_update\n(\nfilters\n.\ntext\n(\n\"hello\"\n))\n# تطبیق دقیق\nasync\ndef\nexact\n(\nc\n,\nu\n):\n...\n@bot\n.\non_update\n(\nfilters\n.\ntext\n(\nr\n\"^/start\"\n,\nregex\n=\nTrue\n))\n# regex\nasync\ndef\nstart_cmd\n(\nc\n,\nu\n):\n...\n\nنکته:\nاگر\npattern\nخالی باشد و\nregex=False\n، فیلتر فقط چک می‌کند که پیام متنی وجود دارد." }, { "instruction": "commands", "input": "", "output": "پارامتر | نوع | توضیحات |\ncommands | `str | List[str]` | نامِ فرمان(ها) بدون /\n\nشرح کوتاه:\nپیام‌هایی که با دستور مشخص شروع می‌شوند (مثلاً\n/start\n).\n\nمثال:\n\n@bot\n.\non_update\n(\nfilters\n.\ncommands\n(\n\"start\"\n))\nasync\ndef\nstart\n(\nc\n,\nu\n):\n...\n@bot\n.\non_update\n(\nfilters\n.\ncommands\n([\n\"help\"\n,\n\"about\"\n]))\nasync\ndef\nhelp_or_about\n(\nc\n,\nu\n):\n...\n\nنکته:\nاین فیلتر معمولاً متن پیام را به صورت tokenized بررسی می‌کند تا فرمان در ابتدای متن باشد." }, { "instruction": "update_type", "input": "", "output": "پارامتر | نوع | توضیحات |\ntypes | `str | List[str]` | یک یا چند مقدار از UpdateTypeEnum یا معادل رشته‌ای آن\n\nشرح کوتاه:\nفیلتر براساس نوع آپدیت (مثلاً\nNewMessage\n,\nUpdatedMessage\n,\nInlineMessage\n).\n\nمثال:\n\n@bot\n.\non_update\n(\nfilters\n.\nupdate_type\n(\n\"NewMessage\"\n))\nasync\ndef\nnewmsg\n(\nc\n,\nu\n):\n...\n@bot\n.\non_update\n(\nfilters\n.\nupdate_type\n([\n\"NewMessage\"\n,\n\"InlineMessage\"\n]))\nasync\ndef\nmulti\n(\nc\n,\nu\n):\n..." }, { "instruction": "private", "input": "", "output": "پارامتر | نوع | توضیحات\n— | — | بدون پارامتر\n\nشرح کوتاه:\nپاس کردن تنها زمانی که آپدیت از یک چت خصوصی (user) باشد.\n\nمثال:\n\n@bot\n.\non_update\n(\nfilters\n.\nprivate\n)\nasync\ndef\npriv\n(\nc\n,\nu\n):\n..." }, { "instruction": "group", "input": "", "output": "پارامتر | نوع | توضیحات\n— | — | بدون پارامتر\n\nشرح کوتاه:\nپاس کردن تنها زمانی که پیام از گروه باشد.\n\nمثال:\n\n@bot\n.\non_update\n(\nfilters\n.\ngroup\n)\nasync\ndef\ngrp\n(\nc\n,\nu\n):\n..." }, { "instruction": "channel", "input": "", "output": "پارامتر | نوع | توضیحات\n— | — | بدون پارامتر\n\nشرح کوتاه:\nپاس کردن تنها زمانی که پیام از کانال باشد.\n\nمثال:\n\n@bot\n.\non_update\n(\nfilters\n.\nchannel\n)\nasync\ndef\nchl\n(\nc\n,\nu\n):\n..." }, { "instruction": "bot", "input": "", "output": "پارامتر | نوع | توضیحات\n— | — | بدون پارامتر\n\nشرح کوتاه:\nپیام‌هایی که فرستنده‌شان از نوع\nBot\nاست.\n\nمثال:\n\n@bot\n.\non_update\n(\nfilters\n.\nbot\n)\nasync\ndef\nfrom_bot\n(\nc\n,\nu\n):\n..." }, { "instruction": "chat", "input": "", "output": "پارامتر | نوع | توضیحات |\nchat_ids | `str | List[str]` | یک شناسه یا لیست شناسه‌های چت که اجازه دارد\n\nشرح کوتاه:\nمحدود کردن اجرای هندلر به یک یا چند\nchat_id\nمشخص.\n\nمثال:\n\n@bot\n.\non_update\n(\nfilters\n.\nchat\n(\n\"b0_test_chat\"\n))\nasync\ndef\ntest\n(\nc\n,\nu\n):\n...\n@bot\n.\non_update\n(\nfilters\n.\nchat\n([\n\"b0_admin\"\n,\n\"b0_mod\"\n]))\nasync\ndef\nadmin_mod\n(\nc\n,\nu\n):\n..." }, { "instruction": "button", "input": "", "output": "پارامتر | نوع | توضیحات\npattern | str | متن یا الگوی شناسه دکمه\nregex | bool | آیا pattern به‌صورت regex باشد؟ (پیش‌فرض False)\n\nشرح کوتاه:\nفیلتر کلیک روی دکمه‌ها (callback / button id) — تطبیق دقیق یا regex.\n\nمثال:\n\n@bot\n.\non_update\n(\nfilters\n.\nbutton\n(\n\"btn_123\"\n))\nasync\ndef\nb123\n(\nc\n,\nu\n):\n...\n@bot\n.\non_update\n(\nfilters\n.\nbutton\n(\nr\n\"btn_\\d+\"\n,\nregex\n=\nTrue\n))\nasync\ndef\nnumbered\n(\nc\n,\nu\n):\n..." }, { "instruction": "forward", "input": "", "output": "پارامتر | نوع | توضیحات\n— | — | بدون پارامتر\n\nشرح کوتاه:\nپاس می‌شود اگر پیام از جایی فوروارد شده باشد (\nforwarded_from\nوجود داشته باشد).\n\nمثال:\n\n@bot\n.\non_update\n(\nfilters\n.\nforward\n)\nasync\ndef\nfwd\n(\nc\n,\nu\n):\n..." }, { "instruction": "replied", "input": "", "output": "پارامتر | نوع | توضیحات\n— | — | بدون پارامتر\n\nشرح کوتاه:\nبررسی اینکه آیا پیام روی یک پیام دیگر ریپلای شده یا خیر.\n\nمثال:\n\n@bot\n.\non_update\n(\nfilters\n.\nreplied\n)\nasync\ndef\nis_replieds\n(\nc\n,\nu\n):\n..." }, { "instruction": "is_edited", "input": "", "output": "پارامتر | نوع | توضیحات\n— | — | بدون پارامتر\n\nشرح کوتاه:\nفیلتر پیام‌های ویرایش‌شده (\nis_edited == True\nیا نوع\nUpdatedMessage\n).\n\nمثال:\n\n@bot\n.\non_update\n(\nfilters\n.\nis_edited\n)\nasync\ndef\nedited\n(\nc\n,\nu\n):\n..." }, { "instruction": "sender_type", "input": "", "output": "پارامتر | نوع | توضیحات |\ntypes | `str | List[str]` | نوع/انواع فرستنده (مثلاً \"User\", \"Bot\")\n\nشرح کوتاه:\nفیلتر بر اساس\nsender_type\nپیام.\n\nمثال:\n\n@bot\n.\non_update\n(\nfilters\n.\nsender_type\n(\n\"User\"\n))\nasync\ndef\nfrom_user\n(\nc\n,\nu\n):\n...\n@bot\n.\non_update\n(\nfilters\n.\nsender_type\n([\n\"Bot\"\n,\n\"Channel\"\n]))\nasync\ndef\nbot_or_channel\n(\nc\n,\nu\n):\n..." }, { "instruction": "has_aux_data", "input": "", "output": "پارامتر | نوع | توضیحات\n— | — | بدون پارامتر\n\nشرح کوتاه:\nپاس می‌شود اگر پیام\naux_data\nداشته باشد (مفید برای دکمه‌ها/payloadها).\n\nمثال:\n\n@bot\n.\non_update\n(\nfilters\n.\nhas_aux_data\n)\nasync\ndef\naux\n(\nc\n,\nu\n):\n..." }, { "instruction": "file", "input": "", "output": "پارامتر | نوع | توضیحات\n— | — | بدون پارامتر\n\nشرح کوتاه:\nپیام‌هایی که پیوست فایل دارند (\nmessage.file\n).\n\nمثال:\n\n@bot\n.\non_update\n(\nfilters\n.\nfile\n)\nasync\ndef\nnew_file\n(\nc\n,\nu\n):\n..." }, { "instruction": "location", "input": "", "output": "پارامتر | نوع | توضیحات\n— | — | بدون پارامتر\n\nشرح کوتاه:\nپیام‌هایی که لوکیشن دارند (\nmessage.location\nیا\nlive_location\n).\n\nمثال:\n\n@bot\n.\non_update\n(\nfilters\n.\nlocation\n)\nasync\ndef\nloc\n(\nc\n,\nu\n):\n..." }, { "instruction": "sticker", "input": "", "output": "پارامتر | نوع | توضیحات\n— | — | بدون پارامتر\n\nشرح کوتاه:\nپیام‌هایی که استیکر دارند (\nmessage.sticker\n).\n\nمثال:\n\n@bot\n.\non_update\n(\nfilters\n.\nsticker\n)\nasync\ndef\nstk\n(\nc\n,\nu\n):\n..." }, { "instruction": "contact_message", "input": "", "output": "پارامتر | نوع | توضیحات\n— | — | بدون پارامتر\n\nشرح کوتاه:\nپیام‌هایی که شامل کانتکت هستند (\nmessage.contact_message\n).\n\nمثال:\n\n@bot\n.\non_update\n(\nfilters\n.\ncontact_message\n)\nasync\ndef\ncontact\n(\nc\n,\nu\n):\n..." }, { "instruction": "poll", "input": "", "output": "پارامتر | نوع | توضیحات\n— | — | بدون پارامتر\n\nشرح کوتاه:\nپیام‌هایی که نظرسنجی (poll) دارند (\nmessage.poll\n).\n\nمثال:\n\n@bot\n.\non_update\n(\nfilters\n.\npoll\n)\nasync\ndef\npoll_msg\n(\nc\n,\nu\n):\n..." }, { "instruction": "live_location", "input": "", "output": "پارامتر | نوع | توضیحات\n— | — | بدون پارامتر\n\nشرح کوتاه:\nپیام‌هایی که موقعیت زنده (\nlive_location\n) دارند.\n\nمثال:\n\n@bot\n.\non_update\n(\nfilters\n.\nlive_location\n)\nasync\ndef\nlive_loc\n(\nc\n,\nu\n):\n..." }, { "instruction": "ترکیب فیلترها (Multi filters)", "input": "", "output": "چند فیلتر را می‌توان کنار هم قرار داد؛ همه باید پاس شوند (منطق AND):\n\n@bot\n.\non_update\n(\nfilters\n.\nprivate\n,\nfilters\n.\ncommands\n(\n'start'\n))\nasync\ndef\nwelcome\n(\nc\n,\nu\n):\nawait\nu\n.\nreply\n(\n\"Welcome to private start!\"\n)" }, { "instruction": "استفاده پیشرفته:", "input": "", "output": "ترکیب فیلترهای OR و AND.\n\n@bot\n.\non_update\n(\nfilters\n.\ncommands\n(\n'hello'\n)\n&\n(\nfilters\n.\nprivate\n|\nfilters\n.\ngroup\n))\nasync\ndef\nhello_world\n(\nc\n,\nu\n):\nawait\nu\n.\nreply\n(\n\"Hello, World!\"\n)\n\nفیلتر\nstates\n\nفیلتر\nstates\nیک کلاس برای مدیریت\nوضعیت مکالمه (conversation state)\nدر ربات است.\nاین فیلتر بررسی می‌کند که آیا به‌روزرسانی (\nupdate\n) مربوط به\nیک state مشخص\nاست یا نه، بدون نیاز به کتابخانه یا مدیریت‌کننده خارجی." }, { "instruction": "1. تعیین وضعیت بعد از دستور /start", "input": "", "output": "@bot\n.\non_message\n(\ntext\n(\n\"/start\"\n))\nasync\ndef\nstart_handler\n(\nclient\n,\nmessage\n):\nawait\nmessage\n.\nreply\n(\n\"سلام! لطفاً نام خود را وارد کنید.\"\n)\nstates\n.\nset\n(\nmessage\n.\nuser_id\n,\n\"waiting_for_name\"\n)" }, { "instruction": "2. پردازش ورودی بر اساس وضعیت", "input": "", "output": "@bot\n.\non_message\n(\nstates\n(\n\"waiting_for_name\"\n))\nasync\ndef\nname_handler\n(\nclient\n,\nmessage\n):\nawait\nmessage\n.\nreply\n(\nf\n\"خوشبختم\n{\nmessage\n.\ntext\n}\n! سن خود را وارد کنید.\"\n)\nstates\n.\nset\n(\nmessage\n.\nuser_id\n,\n\"waiting_for_age\"\n)" }, { "instruction": "3. انتقال بین وضعیت‌ها", "input": "", "output": "@bot\n.\non_message\n(\nstates\n(\n\"waiting_for_age\"\n))\nasync\ndef\nage_handler\n(\nclient\n,\nmessage\n):\nawait\nmessage\n.\nreply\n(\nf\n\"عالی! شما\n{\nmessage\n.\ntext\n}\nساله هستید.\"\n)\nstates\n.\nclear\n(\nmessage\n.\nuser_id\n)\n# پایان جریان مکالمه" }, { "instruction": "4. بررسی وضعیت فعلی کاربر", "input": "", "output": "user_state\n=\nstates\n.\nget\n(\nmessage\n.\nuser_id\n)\nif\nuser_state\n==\n\"waiting_for_age\"\n:\nawait\nmessage\n.\nreply\n(\n\"شما هنوز در حالت وارد کردن سن هستید.\"\n)" }, { "instruction": "🧩 نکات کلیدی", "input": "", "output": "از\nرشته‌های کوتاه و گویا\nبرای وضعیت‌ها استفاده کنید (\n\"waiting_for_email\"\n,\n\"awaiting_confirmation\"\n).\nهمیشه بعد از پایان جریان مکالمه، وضعیت را با\nclear\nپاک کنید تا حافظه اضافه مصرف نشود.\nبرای مدیریت جریان‌های پیچیده، می‌توانید وضعیت‌ها را گروه‌بندی کنید (\n\"reg:name\"\n,\n\"reg:age\"\n,\n\"reg:done\"\n)." }, { "instruction": "نکات پیاده‌سازی و بهترین تمرین‌ها", "input": "", "output": "متد\ncheck(update)\nدر هر فیلتر\nآسینک\nباشد تا بتواند منابع IO (مثلاً دیتابیس یا شبکه) را نیز چک کند.\nبرای فیلترهای Regex، استفاده از کامپایل کردن الگو (\nre.compile\n) در سازندهٔ فیلتر باعث افزایش کارایی می‌شود.\nهنگام بررسی متن، همیشه\nNone\nبودن فیلدها را چک کنید تا از\nAttributeError\nجلوگیری شود.\nاگر نیاز به فیلتر stateful دارید (مثلاً محدودیت نرخ برای کاربر)، پیاده‌سازی را به گونه‌ای انجام دهید که thread-safe یا compatible با async باشد (مثلاً استفاده از async locks یا external store مثل Redis).\nبرای تست، فیلترها را به‌صورت جداگانه unit-test کنید با نمونه‌های\nUpdate\n/\nInlineMessage\nمصنوعی." }, { "instruction": "FAQ", "input": "", "output": "۱) آیا فیلترها می‌توانند async I/O انجام دهند؟\nبله —\ncheck\nآسینک است و می‌تواند درخواست‌های دیتابیسی یا شبکه‌ای داشته باشد.\n\n۲) ترتیب بررسی فیلترها چگونه است؟\nفیلترها به ترتیب قرارگیری در دکوراتور بررسی می‌شوند؛ اولین فیلتر که\nFalse\nبرگرداند از اجرای هندلر جلوگیری می‌کند.\n\n۳) آیا OR ترکیب فیلترها پشتیبانی می‌شود؟\nدر نسخهٔ پایه ترکیب به صورت AND است. اگر لازم است، می‌توانید یک helper بنویسید که OR را پیاده‌سازی کند یا فیلتر جدیدی بسازید." }, { "instruction": "File", "input": "", "output": "فیلد | نوع | توضیحات\nfile_id | Optional[str] | شناسهٔ یکتأ فایل که سرور بازمی‌گرداند\nfile_name | Optional[str] | نام فایل\nsize | Optional[str] | اندازهٔ فایل (معمولاً بر حسب بایت یا رشته‌ای که API بازمی‌گرداند)" }, { "instruction": "Chat", "input": "", "output": "فیلد | نوع | توضیحات\nchat_id | Optional[str] | شناسهٔ چت\nchat_type | Optional[ChatTypeEnum] | نوع چت\nuser_id | Optional[str] | شناسهٔ کاربر\nfirst_name | Optional[str] | نام کاربر\nlast_name | Optional[str] | نام خانوادگی کاربر\ntitle | Optional[str] | عنوان (برای گروه/کانال)\nusername | Optional[str] | نام کاربری" }, { "instruction": "ForwardedFrom", "input": "", "output": "فیلد | نوع | توضیحات\ntype_from | Optional[ForwardedFromEnum] | نوع منبع فوروارد\nmessage_id | Optional[str] | شناسهٔ پیام مبدا\nfrom_chat_id | Optional[str] | شناسهٔ چت مبدا\nfrom_sender_id | Optional[str] | شناسهٔ فرستندهٔ مبدا" }, { "instruction": "PaymentStatus", "input": "", "output": "فیلد | نوع | توضیحات\npayment_id | Optional[str] | شناسهٔ تراکنش/پرداخت\nstatus | Optional[PaymentStatusEnum] | وضعیت پرداخت (enum)" }, { "instruction": "MessageTextUpdate", "input": "", "output": "فیلد | نوع | توضیحات\nmessage_id | Optional[str] | شناسهٔ پیام ویرایش‌شده\ntext | Optional[str] | متن جدید پیام" }, { "instruction": "Bot", "input": "", "output": "فیلد | نوع | توضیحات\nbot_id | Optional[str] | شناسهٔ ربات\nbot_title | Optional[str] | عنوان/نام ربات\navatar | Optional[File] | آواتار ربات (فایل)\ndescription | Optional[str] | توضیحات ربات\nusername | Optional[str] | نام کاربری ربات\nstart_message | Optional[str] | پیام شروع (start)\nshare_url | Optional[str] | URL اشتراک‌گذاری ربات" }, { "instruction": "BotCommand", "input": "", "output": "فیلد | نوع | توضیحات\ncommand | Optional[str] | نام فرمان\ndescription | Optional[str] | توضیح فرمان" }, { "instruction": "Sticker", "input": "", "output": "فیلد | نوع | توضیحات\nsticker_id | Optional[str] | شناسهٔ استیکر\nfile | Optional[File] | فایل مربوط به استیکر\nemoji_character | Optional[str] | ایموجی مرتبط با استیکر" }, { "instruction": "ContactMessage", "input": "", "output": "فیلد | نوع | توضیحات\nphone_number | Optional[str] | شماره تلفن\nfirst_name | Optional[str] | نام\nlast_name | Optional[str] | نام خانوادگی" }, { "instruction": "PollStatus", "input": "", "output": "فیلد | نوع | توضیحات\nstate | Optional[PollStatusEnum] | وضعیت نظرسنجی (باز/بسته و ...)\nselection_index | Optional[int] | ایندکس گزینهٔ انتخاب‌شده\npercent_vote_options | Optional[List[int]] | درصد آرا هر گزینه (لیست)\ntotal_vote | Optional[int] | مجموع آرا\nshow_total_votes | Optional[bool] | آیا مجموع آرا نمایش داده شود؟" }, { "instruction": "Poll", "input": "", "output": "فیلد | نوع | توضیحات\nquestion | Optional[str] | سوال نظرسنجی\noptions | Optional[List[str]] | گزینه‌ها\npoll_status | Optional[PollStatus] | وضعیت فعلی نظرسنجی" }, { "instruction": "Location", "input": "", "output": "فیلد | نوع | توضیحات\nlongitude | Optional[str] | طول جغرافیایی (رشته/عدد مطابق API)\nlatitude | Optional[str] | عرض جغرافیایی (رشته/عدد مطابق API)" }, { "instruction": "LiveLocation", "input": "", "output": "فیلد | نوع | توضیحات\nstart_time | Optional[str] | زمان شروع (timestamp / رشته مطابق API)\nlive_period | Optional[int] | طول دورهٔ لایو به ثانیه\ncurrent_location | Optional[Location] | موقعیت فعلی (Location)\nuser_id | Optional[str] | شناسهٔ کاربر ارسال‌کننده\nstatus | Optional[LiveLocationStatusEnum] | وضعیت لایو (enum)\nlast_update_time | Optional[str] | زمان آخرین آپدیت" }, { "instruction": "ButtonSelectionItem", "input": "", "output": "فیلد | نوع | توضیحات\ntext | Optional[str] | متن آیتم انتخاب\nimage_url | Optional[str] | آدرس تصویر آیتم\ntype | Optional[ButtonSelectionTypeEnum] | نوع آیتم (enum)" }, { "instruction": "ButtonSelection", "input": "", "output": "فیلد | نوع | توضیحات\nselection_id | Optional[str] | شناسهٔ مجموعهٔ انتخاب\nsearch_type | Optional[str] | نوع جستجو/فیلتر (رشتهٔ API)\nget_type | Optional[str] | نوع واکشی آیتم‌ها\nitems | Optional[List[ButtonSelectionItem]] | لیست آیتم‌ها\nis_multi_selection | Optional[bool] | آیا چندانتخابی است؟\ncolumns_count | Optional[str] | تعداد ستون‌ها (رشته مطابق API)\ntitle | Optional[str] | عنوان مجموعهٔ انتخاب" }, { "instruction": "ButtonCalendar", "input": "", "output": "فیلد | نوع | توضیحات\ndefault_value | Optional[str] | مقدار پیش‌فرض (مثلاً تاریخ)\ntype | Optional[ButtonCalendarTypeEnum] | نوع تقویم/نمایش (enum)\nmin_year | Optional[str] | کمینهٔ سال قابل انتخاب\nmax_year | Optional[str] | بیشینهٔ سال قابل انتخاب\ntitle | Optional[str] | عنوان تقویم" }, { "instruction": "ButtonNumberPicker", "input": "", "output": "فیلد | نوع | توضیحات\nmin_value | Optional[str] | حداقل مقدار (رشته مطابق API)\nmax_value | Optional[str] | حداکثر مقدار\ndefault_value | Optional[str] | مقدار پیش‌فرض\ntitle | Optional[str] | عنوان پیکر عددی" }, { "instruction": "ButtonStringPicker", "input": "", "output": "فیلد | نوع | توضیحات\nitems | Optional[List[str]] | لیست رشته‌ای گزینه‌ها\ndefault_value | Optional[str] | مقدار پیش‌فرض\ntitle | Optional[str] | عنوان انتخاب‌گر رشته‌ای" }, { "instruction": "ButtonTextbox", "input": "", "output": "فیلد | نوع | توضیحات\ntype_line | Optional[ButtonTextboxTypeLineEnum] | نوع خط/ورودی (enum)\ntype_keypad | Optional[ButtonTextboxTypeKeypadEnum] | نوع کیپد (enum)\nplace_holder | Optional[str] | متن جایگزین (placeholder)\ntitle | Optional[str] | عنوان فیلد متنی\ndefault_value | Optional[str] | مقدار پیش‌فرض" }, { "instruction": "ButtonLocation", "input": "", "output": "فیلد | نوع | توضیحات\ndefault_pointer_location | Optional[Location] | محل اشاره‌گر پیش‌فرض\ndefault_map_location | Optional[Location] | مکان نقشه پیش‌فرض\ntype | Optional[ButtonLocationTypeEnum] | نوع ورودی مکان (enum)\ntitle | Optional[str] | عنوان\nlocation_image_url | Optional[str] | تصویر/نقشه مرتبط (URL)" }, { "instruction": "AuxData", "input": "", "output": "فیلد | نوع | توضیحات\nstart_id | Optional[str] | شناسهٔ شروع (کمکی)\nbutton_id | Optional[str] | شناسهٔ دکمهٔ مرتبط" }, { "instruction": "JoinChannelData", "input": "", "output": "فیلد | نوع | توضیحات\nusername | Optional[str] | نام کاربری کانال/گروه (در __post_init__ با حذف @ نرمال‌سازی می‌شود)\nask_join | Optional[bool] | آیا از کاربر درخواست ملحق شدن شود؟ (پیش‌فرض False)" }, { "instruction": "OpenChatData", "input": "", "output": "فیلد | نوع | توضیحات\nobject_guid | Optional[str] | شناسهٔ شیٔ (GUID)\nobject_type | Optional[ChatTypeEnum] | نوع شی (ChatTypeEnum)" }, { "instruction": "ButtonLink", "input": "", "output": "فیلد | نوع | توضیحات\ntype | Optional[str] | نوع لینک (رشتهٔ API)\nlink_url | Optional[str] | آدرس لینک — در __post_init__ برخی لینک‌های rubika.ir به deep-link نرمال‌سازی می‌شوند\njoinchannel_data | Optional[JoinChannelData] | داده‌های join-channel مرتبط\nopen_chat_data | Optional[OpenChatData] | داده‌های open-chat مرتبط" }, { "instruction": "Button", "input": "", "output": "فیلد | نوع | توضیحات\nid | Optional[str] | شناسهٔ دکمه\ntype | Optional[ButtonTypeEnum] | نوع دکمه (enum)\nbutton_text | Optional[str] | متن دکمه\nbutton_selection | Optional[ButtonSelection] | دادهٔ انتخاب (در صورت وجود)\nbutton_calendar | Optional[ButtonCalendar] | تقویم تعبیه‌شده\nbutton_number_picker | Optional[ButtonNumberPicker] | پیکر عددی\nbutton_string_picker | Optional[ButtonStringPicker] | پیکر رشته‌ای\nbutton_location | Optional[ButtonLocation] | ورودی مکان\nbutton_textbox | Optional[ButtonTextbox] | ورودی متنی\nbutton_link | Optional[ButtonLink] | لینک/عملیات مرتبط" }, { "instruction": "KeypadRow", "input": "", "output": "فیلد | نوع | توضیحات\nbuttons | Optional[List[Button]] | لیست دکمه‌ها در یک ردیف" }, { "instruction": "Keypad", "input": "", "output": "فیلد | نوع | توضیحات\nrows | Optional[List[KeypadRow]] | ردیف‌های کیپد\nresize_keyboard | Optional[bool] | آیا کیبورد قابل تغییر سایز است؟\non_time_keyboard | Optional[bool] | آیا کیبورد موقت/زمانی است؟" }, { "instruction": "MessageKeypadUpdate", "input": "", "output": "فیلد | نوع | توضیحات\nmessage_id | Optional[str] | شناسهٔ پیام مورد به‌روزرسانی\ninline_keypad | Optional[Keypad] | کیپد جدید اینلاین" }, { "instruction": "MessageId", "input": "", "output": "فیلد | نوع | توضیحات\nmessage_id | Optional[str] | شناسهٔ پیام قدیمی\nnew_message_id | Optional[str] | شناسهٔ پیام جدید (در صورت replace)\nfile_id | Optional[str] | شناسهٔ فایل مرتبط\nchat_id | Optional[str] | شناسهٔ چت پیام\nclient | Optional[\"rubpy.BotClient\"] | ارجاع به کلاینت برای انجام عملیات\n\nمتدها (async)\n\ndelete()\n— حذف پیام (فراخوانی\nclient.delete_message(chat_id, message_id or new_message_id)\n)\nedit_text(new_text: str)\n— ویرایش متن پیام (فراخوانی\nclient.edit_message_text(chat_id, message_id or new_message_id, new_text)\n)\n\nتوجه: برای کارکرد متدها،\nclient\nباید ست شده باشد." }, { "instruction": "Message", "input": "", "output": "فیلد | نوع | توضیحات\nmessage_id | Optional[MessageId] | شناسهٔ پیام (MessageId)\ntext | Optional[str] | متن پیام\ntime | Optional[int] | timestamp پیام\nis_edited | Optional[bool] | آیا پیام ویرایش شده؟\nsender_type | Optional[MessageSenderEnum] | نوع فرستنده (enum)\nsender_id | Optional[str] | شناسهٔ فرستنده\naux_data | Optional[AuxData] | داده‌های کمکی مرتبط\nfile | Optional[File] | فایل پیوستی (در صورت وجود)\nreply_to_message_id | Optional[str] | شناسهٔ پیام که این پیام به آن پاسخ داده شده\nforwarded_from | Optional[ForwardedFrom] | اطلاعات فوروارد\nforwarded_no_link | Optional[str] | نسخهٔ فوروارد بدون لینک (رشتهٔ API)\nlocation | Optional[Location] | اطلاعات مکان (در صورت وجود)\nsticker | Optional[Sticker] | استیکر (در صورت وجود)\ncontact_message | Optional[ContactMessage] | کانتکت (در صورت وجود)\npoll | Optional[Poll] | نظرسنجی (در صورت وجود)\nlive_location | Optional[LiveLocation] | موقعیت زنده (در صورت وجود)" }, { "instruction": "Update", "input": "", "output": "فیلد | نوع | توضیحات\ntype | Optional[UpdateTypeEnum] | نوع آپدیت (پیام جدید، ویرایش، حذف و ...)\nchat_id | Optional[str] | شناسهٔ چت مرتبط با آپدیت\nremoved_message_id | Optional[str] | شناسهٔ پیام حذف‌شده (در صورت وجود)\nnew_message | Optional[Message] | پیام جدید (در رویداد پیام جدید)\nupdated_message | Optional[Message] | پیام به‌روزرسانی‌شده (در ویرایش)\nupdated_payment | Optional[PaymentStatus] | به‌روزرسانی وضعیت پرداخت (در رویداد پرداخت)\nclient | Optional[\"rubpy.BotClient\"] | ارجاع به کلاینت برای انجام عملیات\n\nمتدهای کاربردی (همه async)\n\nreply(text, chat_keypad=None, inline_keypad=None, disable_notification=False, chat_keypad_type=ChatKeypadTypeEnum.NONE, chat_id=None) - MessageId\nارسال متن (فراخوانی\nclient.send_message\n) — به‌صورت خودکار\nreply_to_message_id\nرا از\nself.new_message.message_id\nمی‌گیرد (در صورت وجود).\nreply_file(...), reply_photo(...), reply_video(...), reply_voice(...), reply_music(...), reply_gif(...)\nشورت‌کات‌های ارسال فایل با نوع مشخص (فراخوانی\nclient.send_file\nبا پارامتر\ntype\n).\ndelete(chat_id=None, message_id=None)\n— حذف پیام (فراخوانی\nclient.delete_message\n).\ndownload(file_id=None, save_as=None, progress=None, chunk_size=65536, as_bytes=False) - Union[str, bytes, None]\nدانلود فایل با امکان ذخیره یا بازگرداندن بایت‌ها (فراخوانی\nclient.download_file\n).\n\nهمهٔ متدها ابتدا بررسی می‌کنند که\nself.client\nست شده باشد و در غیر این صورت\nValueError\nپرتاب می‌شود." }, { "instruction": "InlineMessage", "input": "", "output": "فیلد | نوع | توضیحات\nsender_id | Optional[str] | شناسهٔ فرستندهٔ اینلاین\ntext | Optional[str] | متن\nfile | Optional[File] | فایل پیوست (در صورت وجود)\nlocation | Optional[Location] | مکان (در صورت وجود)\naux_data | Optional[AuxData] | دادهٔ کمکی\nmessage_id | Optional[str] | شناسهٔ پیام اینلاین\nchat_id | Optional[str] | شناسهٔ چت/کاربری که پیام را دریافت می‌کند\nclient | Optional[\"rubpy.BotClient\"] | ارجاع به کلاینت\n\nمتدهای مشابه\nUpdate\n(async)\nreply\n,\nreply_file\n,\nreply_photo\n,\nreply_voice\n,\nreply_music\n,\nreply_gif\n,\nreply_video\n,\ndelete\n— همان کارکرد\nUpdate\nرا دارند ولی روی\nself.chat_id\n/\nself.message_id\nاجرا می‌شوند." }, { "instruction": "ChatTypeEnum", "input": "", "output": "عضو | مقدار\nUSER | \"User\"\nBOT | \"Bot\"\nGROUP | \"Group\"\nCHANNEL | \"Channel\"\n\nتوضیح:\nنمایانگر نوع چت — کاربر عادی، ربات، گروه یا کانال." }, { "instruction": "ForwardedFromEnum", "input": "", "output": "عضو | مقدار\nUSER | \"User\"\nCHANNEL | \"Channel\"\nBOT | \"Bot\"\n\nتوضیح:\nمشخص‌کنندهٔ منبع یک پیام فورواردشده." }, { "instruction": "PaymentStatusEnum", "input": "", "output": "عضو | مقدار\nPaid | \"Paid\"\nNotPaid | \"NotPaid\"\n\nتوضیح:\nوضعیت پرداخت (پرداخت شده یا نشده)." }, { "instruction": "PollStatusEnum", "input": "", "output": "عضو | مقدار\nOPEN | \"Open\"\nCLOSED | \"Closed\"\n\nتوضیح:\nوضعیت نظرسنجی." }, { "instruction": "LiveLocationStatusEnum", "input": "", "output": "عضو | مقدار\nSTOPPED | \"Stopped\"\nLIVE | \"Live\"\n\nتوضیح:\nوضعیت موقعیت زنده (قطع/فعال)." }, { "instruction": "ButtonSelectionTypeEnum", "input": "", "output": "عضو | مقدار\nTextOnly | \"TextOnly\"\nTextImgThu | \"TextImgThu\"\nTextImgBig | \"TextImgBig\"\n\nتوضیح:\nنحوهٔ نمایش آیتم‌های انتخاب (فقط متن، تصویر کوچک+متن، تصویر بزرگ+متن)." }, { "instruction": "ButtonSelectionSearchEnum", "input": "", "output": "عضو | مقدار\nNONE | \"None\"\nLocal | \"Local\"\nApi | \"Api\"\n\nتوضیح:\nمنشأ جستجو برای آیتم‌های انتخاب (بدون جستجو، محلی، یا از API)." }, { "instruction": "ButtonSelectionGetEnum", "input": "", "output": "عضو | مقدار\nLocal | \"Local\"\nApi | \"Api\"\n\nتوضیح:\nروش واکشی آیتم‌ها (محلی یا از API)." }, { "instruction": "ButtonCalendarTypeEnum", "input": "", "output": "عضو | مقدار\nDatePersian | \"DatePersian\"\nDateGregorian | \"DateGregorian\"\n\nتوضیح:\nنوع تقویم مورد استفاده در ButtonCalendar." }, { "instruction": "ButtonTextboxTypeKeypadEnum", "input": "", "output": "عضو | مقدار\nSTRING | \"String\"\nNUMBER | \"Number\"\n\nتوضیح:\nنوع کیپد برای ورودی متنی: رشته یا عدد." }, { "instruction": "ButtonTextboxTypeLineEnum", "input": "", "output": "عضو | مقدار\nSingleLine | \"SingleLine\"\nMultiLine | \"MultiLine\"\n\nتوضیح:\nتک‌خطی یا چندخطی بودن ورودی متنی." }, { "instruction": "ButtonLocationTypeEnum", "input": "", "output": "عضو | مقدار\nPICKER | \"Picker\"\nVIEW | \"View\"\n\nتوضیح:\nحالت نمایش/تعامل نقشه (انتخاب نقطه یا مشاهده)." }, { "instruction": "ButtonTypeEnum", "input": "", "output": "عضو | مقدار\nSIMPLE | \"Simple\"\nSELECTION | \"Selection\"\nCALENDAR | \"Calendar\"\nNumberPicker | \"NumberPicker\"\nStringPicker | \"StringPicker\"\nLOCATION | \"Location\"\nPAYMENT | \"Payment\"\nCameraImage | \"CameraImage\"\nCameraVideo | \"CameraVideo\"\nGalleryImage | \"GalleryImage\"\nGalleryVideo | \"GalleryVideo\"\nFILE | \"File\"\nAUDIO | \"Audio\"\nRecordAudio | \"RecordAudio\"\nMyPhoneNumber | \"MyPhoneNumber\"\nMyLocation | \"MyLocation\"\nTextbox | \"Textbox\"\nLINK | \"Link\"\nAskMyPhoneNumber | \"AskMyPhoneNumber\"\nAskLocation | \"AskLocation\"\nBARCODE | \"Barcode\"\n\nتوضیح:\nانواع مختلف دکمه‌ها که در کیپدها پشتیبانی می‌شود." }, { "instruction": "ButtonLinkTypeEnum", "input": "", "output": "عضو | مقدار\nURL | \"url\"\nJoinChannel | \"joinchannel\"\n\nتوضیح:\nنوع لینک‌های قابل استفاده در دکمه‌ها." }, { "instruction": "MessageSenderEnum", "input": "", "output": "عضو | مقدار\nUSER | \"User\"\nBOT | \"Bot\"\n\nتوضیح:\nنوع فرستندهٔ پیام." }, { "instruction": "UpdateTypeEnum", "input": "", "output": "عضو | مقدار\nUpdatedMessage | \"UpdatedMessage\"\nNewMessage | \"NewMessage\"\nRemovedMessage | \"RemovedMessage\"\nStartedBot | \"StartedBot\"\nStoppedBot | \"StoppedBot\"\nUpdatedPayment | \"UpdatedPayment\"\n\nتوضیح:\nانواع رویدادهای آپدیت که API می‌تواند ارسال کند." }, { "instruction": "ChatKeypadTypeEnum", "input": "", "output": "عضو | مقدار\nNONE | \"None\"\nNEW | \"New\"\nREMOVE | \"Remove\"\n\nتوضیح:\nنوع عملیات بر روی کیپد چت (هیچ، جدید، حذف)." }, { "instruction": "UpdateEndpointTypeEnum", "input": "", "output": "عضو | مقدار\nReceiveUpdate | \"ReceiveUpdate\"\nReceiveInlineMessage | \"ReceiveInlineMessage\"\nReceiveQuery | \"ReceiveQuery\"\nGetSelectionItem | \"GetSelectionItem\"\nSearchSelectionItems | \"SearchSelectionItems\"\n\nتوضیح:\nانواع endpointهایی که بات می‌تواند برای webhook ثبت کند." }, { "instruction": "نمونۀ استفاده", "input": "", "output": "from\nrubpy.bot.enums\nimport\nChatTypeEnum\n,\nUpdateTypeEnum\n# مقایسه با مقدار دریافتی از API (رشته‌ای)\nif\nchat\n.\nchat_type\n==\nChatTypeEnum\n.\nUSER\n:\nprint\n(\n\"This is a user chat\"\n)\n# گرفتن مقدار متنی برای ارسال به API\npayload\n=\n{\n\"chat_keypad_type\"\n:\nChatKeypadTypeEnum\n.\nNEW\n}\n# استفاده در بررسی نوع آپدیت\nif\nupdate\n.\ntype\n==\nUpdateTypeEnum\n.\nNewMessage\n:\n# handle new message\npass" }, { "instruction": "سلام دنیا", "input": "", "output": "فایل:\nhello_world.py\n\nfrom\nrubpy\nimport\nBotClient\n# Create a new Client instance\napp\n=\nBotClient\n(\n\"bot-token\"\n)\nasync\ndef\nmain\n():\n# Start client\nawait\napp\n.\nstart\n()\n# Send a message, Markdown is enabled by default\nawait\napp\n.\nsend_message\n(\n\"chat_id\"\n,\n\"Hi there! I'm using **Rubpy**\"\n)\n# Close client\nawait\napp\n.\nstop\n()\nimport\nasyncio\nasyncio\n.\nrun\n(\nmain\n())" }, { "instruction": "دکمه های لینک دار", "input": "", "output": "فایل:\nbutton_link.py\n\n\"\"\"\nThis source code is just a sample for rubpy.BotClient\nYou can edit the source code whenever you want.\n\"\"\"\nfrom\nrubpy\nimport\nBotClient\nfrom\nrubpy.bot\nimport\nfilters\nfrom\nrubpy.bot.models\nimport\n(\nButtonLink\n,\nJoinChannelData\n,\nUpdate\n,\nKeypad\n,\nKeypadRow\n,\nButton\n,\n)\nfrom\nrubpy.bot.enums\nimport\nButtonLinkTypeEnum\n,\nButtonTypeEnum\nbot\n=\nBotClient\n(\ntoken\n=\n\"your-bot-token\"\n)\n@bot\n.\non_update\n(\nfilters\n.\ncommands\n(\n\"start\"\n))\nasync\ndef\nhandle_start\n(\nbot\n,\nupdate\n:\nUpdate\n):\nkeypad\n=\nKeypad\n(\nrows\n=\n[\nKeypadRow\n(\nbuttons\n=\n[\nButton\n(\nid\n=\n\"1\"\n,\ntype\n=\nButtonTypeEnum\n.\nLINK\n,\nbutton_text\n=\n\"عضویت اجباری\"\n,\nbutton_link\n=\nButtonLink\n(\ntype\n=\nButtonLinkTypeEnum\n.\nJoinChannel\n,\njoinchannel_data\n=\nJoinChannelData\n(\nusername\n=\n\"rubikapy\"\n,\nask_join\n=\nTrue\n),\n# اگر ask_join برابر False باشد کاربر مستقیما بدون پرسش عضو کانال میشود.\n),\n)\n]\n),\nKeypadRow\n(\nbuttons\n=\n[\nButton\n(\nid\n=\n\"2\"\n,\ntype\n=\nButtonTypeEnum\n.\nLINK\n,\nbutton_text\n=\n\"باز کردن لینک\"\n,\nbutton_link\n=\nButtonLink\n(\ntype\n=\nButtonLinkTypeEnum\n.\nURL\n,\nlink_url\n=\n\"https://shayan-heidari.ir/\"\n,\n),\n),\n]\n),\n],\nresize_keyboard\n=\nTrue\n,\non_time_keyboard\n=\nFalse\n,\n)\nawait\nupdate\n.\nreply\n(\n\"سلام! خوش اومدی. از دکمه‌های زیر برای کار با ربات استفاده کن:\"\n,\ninline_keypad\n=\nkeypad\n,\n)\nbot\n.\nrun\n()" }, { "instruction": "بازتاب پیام", "input": "", "output": "فایل:\necho_bot.py\n\nfrom\nrubpy\nimport\nBotClient\nfrom\nrubpy.bot\nimport\nfilters\nfrom\nrubpy.bot.models\nimport\nUpdate\napp\n=\nBotClient\n(\n\"bot-token\"\n)\n@app\n.\non_update\n(\nfilters\n.\ntext\n,\nfilters\n.\nprivate\n)\nasync\ndef\necho\n(\nclient\n,\nupdate\n:\nUpdate\n):\nawait\nupdate\n.\nreply\n(\nupdate\n.\nnew_message\n.\ntext\n)\napp\n.\nrun\n()\n# Automatically start()" }, { "instruction": "بات دریافت شناسه", "input": "", "output": "فایل:\nmy_chat_id.py\n\nfrom\nrubpy.bot\nimport\nBotClient\n,\nfilters\nfrom\nrubpy.bot.models\nimport\nUpdate\nbot\n=\nBotClient\n(\n'your-bot-token'\n)\n@bot\n.\non_update\n(\nfilters\n.\ncommands\n(\n'start'\n))\nasync\ndef\nhandle_start\n(\nc\n:\nBotClient\n,\nupdate\n:\nUpdate\n):\nif\nupdate\n.\nnew_message\n:\ntext\n=\n(\n\"🆔 شناسه کاربری شما:\n\\n\n{user_id}\n\\n\\n\n\"\n\"💬 شناسه چت شما:\n\\n\n{chat_id}\n\\n\\n\n\"\n)\n.\nformat\n(\nuser_id\n=\nupdate\n.\nnew_message\n.\nsender_id\n,\nchat_id\n=\nupdate\n.\nchat_id\n)\nawait\nupdate\n.\nreply\n(\ntext\n)\nbot\n.\nrun\n()" }, { "instruction": "استفاده از states", "input": "", "output": "فایل:\nstate_filter.py\n\nfrom\nrubpy.bot\nimport\nBotClient\n,\nfilters\nfrom\nrubpy.bot.models\nimport\nUpdate\napp\n=\nBotClient\n(\n\"bot-token\"\n)\n# 1) یک نمونهٔ فیلتر بساز (می‌تونی پارامترها رو تغییر بدی)\nstate_filter\n=\nfilters\n.\nstates\n(\n\"awaiting_email\"\n,\nmatch_mode\n=\n\"exact\"\n,\nscope\n=\n\"user\"\n,\nauto_clear\n=\nTrue\n)\n@app\n.\non_update\n(\nfilters\n.\ncommands\n(\n\"start\"\n))\nasync\ndef\nstart\n(\nc\n,\nupdate\n:\nUpdate\n):\n# ست کردن state (با TTL 5 دقیقه)\nawait\nstate_filter\n.\nset_state_for\n(\nupdate\n,\n\"awaiting_email\"\n,\nexpire\n=\n300\n)\nawait\nupdate\n.\nreply\n(\n\"لطفاً ایمیل خود را ارسال کنید.\"\n)\n# 2) دستی پاک کردن (مثال)\n@app\n.\non_update\n(\nfilters\n.\ncommands\n(\n\"cancel\"\n))\nasync\ndef\ncancel\n(\nc\n,\nupdate\n:\nUpdate\n):\nawait\nstate_filter\n.\nclear_state_for\n(\nupdate\n)\nawait\nupdate\n.\nreply\n(\n\"جریان لغو شد.\"\n)\n# 3) handler ای که با state کار می‌کنه (فقط با فیلتر)\n@app\n.\non_update\n(\nstate_filter\n)\nasync\ndef\ngot_email\n(\nc\n,\nupdate\n:\nUpdate\n):\ntext\n=\nupdate\n.\nfind_key\n(\n\"text\"\n)\n# process, validate email...\nawait\nupdate\n.\nreply\n(\nf\n\"ایمیل دریافت شد:\n{\ntext\n}\n\"\n)\napp\n.\nrun\n()" }, { "instruction": "یک مثال از میان افزار", "input": "", "output": "فایل:\nmiddleware_example.py" }, { "instruction": "ترتیب اجرای Middleware ها", "input": "", "output": "هر آپدیت جدیدی که بیاد، این مسیر رو طی می‌کنه:\n\nlogger\n→ همیشه لاگ می‌گیره.\nauth_checker\n→ اگه کاربر غیرمجاز باشه، مسیر قطع می‌شه.\nrate_limiter\n→ اگه اسپم باشه، قطع می‌شه.\nدر نهایت می‌ره به\nmain_handler\n.\n\nfrom\nrubpy.bot\nimport\nBotClient\n,\nfilters\nfrom\nrubpy.bot.models\nimport\nUpdate\n,\nInlineMessage\nfrom\ncollections\nimport\ndefaultdict\nimport\ntime\nuser_timestamps\n=\ndefaultdict\n(\nfloat\n)\nbot\n=\nBotClient\n(\n\"your-bot-token\"\n)\n# 🔹 Middleware 1: Logger\n@bot\n.\nmiddleware\n()\nasync\ndef\nlogger\n(\nbot\n,\nupdate\n,\ncall_next\n):\n\"\"\"\nLogs every update before it reaches the handlers.\n\"\"\"\nupdate_type\n=\n\"InlineMessage\"\nif\nisinstance\n(\nupdate\n,\nInlineMessage\n)\nelse\nupdate\n.\ntype\nuser_id\n=\ngetattr\n(\nupdate\n,\n\"chat_id\"\n,\nNone\n)\nprint\n(\nf\n\"📥 [Logger] type=\n{\nupdate_type\n}\n, user=\n{\nuser_id\n}\n\"\n)\nawait\ncall_next\n()\n# ادامه بده به middleware بعدی یا handler\n# 🔹 Middleware 2: Auth Checker\n@bot\n.\nmiddleware\n()\nasync\ndef\nauth_checker\n(\nbot\n,\nupdate\n,\ncall_next\n):\n\"\"\"\nBlocks users that are not in allowed list.\n\"\"\"\nallowed_users\n=\n{\n\"b0IYdTF0EWT0d3c486d5205d051e86c5\"\n}\n# فقط این کاربرا مجازن\nuser_id\n=\ngetattr\n(\nupdate\n,\n\"chat_id\"\n,\nNone\n)\nif\nuser_id\nnot\nin\nallowed_users\n:\nprint\n(\nf\n\"🚫 [Auth] کاربر\n{\nuser_id\n}\nاجازه دسترسی نداره\"\n)\nreturn\n# نذار به هندلر برسه\nawait\ncall_next\n()\n# 🔹 Middleware 3: Rate Limiter\n@bot\n.\nmiddleware\n()\nasync\ndef\nrate_limiter\n(\nbot\n,\nupdate\n,\ncall_next\n):\n\"\"\"\nPrevents users from spamming (1 message per 3 seconds).\n\"\"\"\nuser_id\n=\ngetattr\n(\nupdate\n,\n\"chat_id\"\n,\nNone\n)\nnow\n=\ntime\n.\ntime\n()\nif\nuser_id\nand\nnow\n-\nuser_timestamps\n[\nuser_id\n]\n<\n3\n:\nprint\n(\nf\n\"⚠️ [RateLimit] کاربر\n{\nuser_id\n}\nداره اسپم می‌کنه\"\n)\nreturn\nuser_timestamps\n[\nuser_id\n]\n=\nnow\nawait\ncall_next\n()\n# 🔹 Handler\n@bot\n.\non_update\n(\nfilters\n.\ntext\n)\nasync\ndef\nmain_handler\n(\nbot\n,\nupdate\n:\nUpdate\n):\nprint\n(\nf\n\"✅ Handler: پیام دریافت شد →\n{\nupdate\n.\nchat_id\n}\n\"\n)\nawait\nupdate\n.\nreply\n(\n\"پیام شما دریافت شد ✅\"\n)\nbot\n.\nrun\n()" }, { "instruction": "نکته‌ها", "input": "", "output": "اگه\nهیچکدوم\nreturn\nنکنن، همه اجرا می‌شن و در نهایت می‌ره به هندلر.\nمی‌تونی middleware ها رو برای\nتست A/B، cache، ترجمه متن، حتی اضافه کردن context به آپدیت\nاستفاده کنی.\nترتیب ثبت شدن (\n@bot.middleware()\n) مهمه؛ همون ترتیبی که نوشتی، اجرا می‌شن." }, { "instruction": "کلاس Client در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Main client for interacting with the Rubika API." }, { "instruction": "متد __init__ در فایل rubpy/client.py چه کاری انجام می‌دهد؟", "input": "", "output": "Initialize the Rubika client.\n\nParameters:\n- name: Session name or file path (str) or a StringSession instance.\n- auth: Authentication key (optional).\n- private_key: RSA private key (optional, str or bytes).\n- phone_number: Phone number (optional).\n- user_agent: User-Agent string (optional, defaults to Chrome).\n- timeout: Request timeout in seconds (default: 20).\n- lang_code: Language code (default: 'fa').\n- parse_mode: Message parsing mode ('html', 'markdown', 'mk', or None).\n- proxy: Proxy address (example: 'http://127.0.0.1:80').\n- logger: Logger instance for logging (optional).\n- display_welcome: Show welcome message (default: False).\n- platform: Client platform ('PWA' or 'Android').\n- max_retries: Maximum number of retries for requests (default: 5).\n- sequential_handlers: If True, run registered handlers sequentially and stop after the first match (default: False).\n\nRaises:\n- ValueError: If any input is invalid.\n- TypeError: If the 'name' parameter is not str or StringSession." }, { "instruction": "متد __enter__ در فایل rubpy/client.py چه کاری انجام می‌دهد؟", "input": "", "output": "Support for context manager to start the client." }, { "instruction": "متد __exit__ در فایل rubpy/client.py چه کاری انجام می‌دهد؟", "input": "", "output": "Support for context manager to disconnect the client." }, { "instruction": "متد __aenter__ در فایل rubpy/client.py چه کاری انجام می‌دهد؟", "input": "", "output": "Support for async context manager to start the client." }, { "instruction": "متد __aexit__ در فایل rubpy/client.py چه کاری انجام می‌دهد؟", "input": "", "output": "Support for async context manager to disconnect the client." }, { "instruction": "متد create_model در فایل rubpy/filters.py چه کاری انجام می‌دهد؟", "input": "", "output": "ایجاد دینامیک یک مدل بر اساس نام و کلاس پایه.\n\nپارامترها:\n- name: نام مدل.\n- base: کلاس پایه برای مدل.\n- authorize: لیست نام‌های مدل‌های مجاز.\n- exception: آیا در صورت غیرمجاز بودن مدل خطا پرتاب شود.\n- kwargs: آرگومان‌های اضافی برای تنظیم کلاس.\n\nخروجی:\nکلاس مدل ایجادشده یا None در صورت غیرمجاز بودن.\n\nخطاها:\n- AttributeError: اگر مدل غیرمجاز باشد و exception=True." }, { "instruction": "کلاس Operator در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "کلاس برای تعریف عملگرهای استفاده‌شده در فیلترهای مدل‌ها." }, { "instruction": "کلاس BaseModel در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "کلاس پایه برای مدل‌های سفارشی.\n\nپارامترها:\n- func: تابع فیلتر (اختیاری).\n- filters: لیست یا تک فیلتر برای اعمال.\n- kwargs: آرگومان‌های اضافی." }, { "instruction": "کلاس commands در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "فیلتر برای دستورات در پیام‌های متنی.\n\nپارامترها:\n- commands: دستور یا لیست دستورات (رشته یا لیست رشته‌ها).\n- prefixes: پیشوند یا لیست پیشوندها (پیش‌فرض '/').\n- case_sensitive: حساسیت به حروف بزرگ و کوچک (پیش‌فرض False)." }, { "instruction": "کلاس regex در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "فیلتر برای تطبیق متن با عبارات منظم.\n\nپارامترها:\n- pattern: الگوی عبارت منظم." }, { "instruction": "کلاس object_guids در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "فیلتر بر اساس GUIDهای شیء.\n\nپارامترها:\n- args: GUID یا لیست/تاپل GUIDها." }, { "instruction": "کلاس author_guids در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "فیلتر بر اساس GUIDهای نویسنده.\n\nپارامترها:\n- args: GUID یا لیست/تاپل GUIDها." }, { "instruction": "کلاس Models در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "کلاس برای مدیریت و ایجاد مدل‌های خاص." }, { "instruction": "متد insert در فایل rubpy/filters.py چه کاری انجام می‌دهد؟", "input": "", "output": "اضافه کردن فیلتر به لیست فیلترها." }, { "instruction": "متد build در فایل rubpy/filters.py چه کاری انجام می‌دهد؟", "input": "", "output": "ساخت و اجرای فیلترها روی آپدیت.\n\nپارامترها:\n- update: شیء آپدیت برای بررسی.\n\nخروجی:\nTrue اگر فیلترها با موفقیت اعمال شوند، در غیر این صورت False." }, { "instruction": "متد __call__ در فایل rubpy/filters.py چه کاری انجام می‌دهد؟", "input": "", "output": "اجرای مدل روی آپدیت." }, { "instruction": "متد __call__ در فایل rubpy/filters.py چه کاری انجام می‌دهد؟", "input": "", "output": "بررسی دستورات در متن آپدیت." }, { "instruction": "متد __call__ در فایل rubpy/filters.py چه کاری انجام می‌دهد؟", "input": "", "output": "تطبیق متن آپدیت با الگوی عبارت منظم." }, { "instruction": "متد __call__ در فایل rubpy/filters.py چه کاری انجام می‌دهد؟", "input": "", "output": "بررسی وجود GUID شیء در آپدیت." }, { "instruction": "متد __call__ در فایل rubpy/filters.py چه کاری انجام می‌دهد؟", "input": "", "output": "بررسی وجود GUID نویسنده در آپدیت." }, { "instruction": "متد __eq__ در فایل rubpy/filters.py چه کاری انجام می‌دهد؟", "input": "", "output": "بررسی برابری با کلاس پایه مدل‌ها." }, { "instruction": "متد __dir__ در فایل rubpy/filters.py چه کاری انجام می‌دهد؟", "input": "", "output": "دریافت لیست مدل‌های مجاز." }, { "instruction": "متد __call__ در فایل rubpy/filters.py چه کاری انجام می‌دهد؟", "input": "", "output": "فراخوانی مدل بر اساس نام." }, { "instruction": "متد __getattr__ در فایل rubpy/filters.py چه کاری انجام می‌دهد؟", "input": "", "output": "دریافت مدل دینامیک بر اساس نام." }, { "instruction": "متد create_handler در فایل rubpy/handlers.py چه کاری انجام می‌دهد؟", "input": "", "output": "ایجاد دینامیک یک handler بر اساس نام و کلاس پایه.\n\nپارامترها:\n- name: نام handler.\n- base: کلاس پایه برای handler.\n- authorized_handlers: لیست نام‌های handlerهای مجاز.\n- exception: آیا در صورت غیرمجاز بودن handler خطا پرتاب شود.\n- kwargs: آرگومان‌های اضافی برای تنظیم کلاس.\n\nخروجی:\nکلاس handler ایجادشده یا None در صورت غیرمجاز بودن.\n\nخطاها:\n- AttributeError: اگر handler غیرمجاز باشد و exception=True." }, { "instruction": "کلاس BaseHandlers در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "کلاس پایه برای handlerهای سفارشی.\n\nپارامترها:\n- models: لیست مدل‌های فیلتر.\n- any_handler: آیا هر handler باید اجرا شود.\n- kwargs: آرگومان‌های اضافی." }, { "instruction": "کلاس Handlers در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "کلاس برای مدیریت و ایجاد handlerهای خاص." }, { "instruction": "متد is_async در فایل rubpy/handlers.py چه کاری انجام می‌دهد؟", "input": "", "output": "بررسی اینکه آیا تابع داده‌شده ناهمگام (async) است.\n\nپارامترها:\n- value: تابع برای بررسی.\n\nخروجی:\nTrue اگر تابع ناهمگام باشد، در غیر این صورت False." }, { "instruction": "متد __call__ در فایل rubpy/handlers.py چه کاری انجام می‌دهد؟", "input": "", "output": "اجرای handler روی آپدیت داده‌شده.\n\nپارامترها:\n- update: دیکشنری آپدیت.\n- args: آرگومان‌های اضافی موقعیتی.\n- kwargs: آرگومان‌های اضافی کلیدی.\n\nخروجی:\nTrue اگر handler باید اجرا شود، در غیر این صورت False." }, { "instruction": "متد __eq__ در فایل rubpy/handlers.py چه کاری انجام می‌دهد؟", "input": "", "output": "بررسی برابری با کلاس پایه handlerها.\n\nپارامترها:\n- value: مقداری برای بررسی.\n\nخروجی:\nTrue اگر برابر با BaseHandlers باشد، در غیر این صورت False." }, { "instruction": "متد __dir__ در فایل rubpy/handlers.py چه کاری انجام می‌دهد؟", "input": "", "output": "دریافت لیست handlerهای مجاز.\n\nخروجی:\nلیست مرتب‌شده handlerهای مجاز." }, { "instruction": "متد __call__ در فایل rubpy/handlers.py چه کاری انجام می‌دهد؟", "input": "", "output": "فراخوانی handler بر اساس نام.\n\nپارامترها:\n- name: نام handler.\n- args: آرگومان‌های اضافی موقعیتی.\n- kwargs: آرگومان‌های اضافی کلیدی.\n\nخروجی:\nکلاس handler ایجادشده." }, { "instruction": "متد __getattr__ در فایل rubpy/handlers.py چه کاری انجام می‌دهد؟", "input": "", "output": "دریافت handler ایجادشده دینامیک بر اساس نام.\n\nپارامترها:\n- name: نام handler.\n\nخروجی:\nکلاس handler ایجادشده." }, { "instruction": "متد capitalize در فایل rubpy/network.py چه کاری انجام می‌دهد؟", "input": "", "output": "تبدیل رشته snake_case به CamelCase.\n\nپارامترها:\n- text: رشته با فرمت snake_case.\n\nخروجی:\nرشته با فرمت CamelCase." }, { "instruction": "متد __init__ در فایل rubpy/network.py چه کاری انجام می‌دهد؟", "input": "", "output": "Network class initializition.\n\nParameters:\n- client: Instance of rubpy.Client." }, { "instruction": "متد close در فایل rubpy/network.py چه کاری انجام می‌دهد؟", "input": "", "output": "Close the aiphttp.ClientSession" }, { "instruction": "متد get_dcs در فایل rubpy/network.py چه کاری انجام می‌دهد؟", "input": "", "output": "Retrieves API and WebSocket URLs with retry and exponential backoff.\n\nThis method fetches the data center configuration from Rubika's endpoint,\nsets the API and WebSocket URLs on the client instance, and handles network\nor server errors with retry logic.\n\nArgs:\n max_retries (int, optional): Maximum number of retry attempts. Defaults to 3.\n backoff (float, optional): Base delay in seconds for exponential backoff. Defaults to 1.0.\n\nReturns:\n bool: True if the data center configuration was successfully retrieved.\n\nRaises:\n NetworkError: If all retry attempts fail to fetch the data centers." }, { "instruction": "متد request در فایل rubpy/network.py چه کاری انجام می‌دهد؟", "input": "", "output": "Sends an HTTP POST request with retry logic and exponential backoff.\n\nThis method attempts to send a POST request to the specified URL using the\nprovided JSON data. If the request fails due to network issues or server errors,\nit retries up to `max_retries` times with a growing delay.\n\nArgs:\n url (str): The target API endpoint.\n data (dict): The JSON-serializable payload to send.\n max_retries (int, optional): Maximum number of retry attempts. Defaults to 3.\n backoff (float, optional): Base delay in seconds for exponential backoff. Defaults to 1.0.\n\nReturns:\n dict: The parsed JSON response from the server.\n\nRaises:\n NetworkError: If the request fails after all retry attempts." }, { "instruction": "متد send در فایل rubpy/network.py چه کاری انجام می‌دهد؟", "input": "", "output": "Send request to Rubika's API\n\nParameters:\n- kwargs: Request parameters\n\nReturns:\n- JSON-decoded response." }, { "instruction": "متد handle_update در فایل rubpy/network.py چه کاری انجام می‌دهد؟", "input": "", "output": "Dispatches incoming updates to the registered handlers.\n\nThis method iterates over all registered client handlers and invokes the one\nwhose name matches the incoming update type. Handlers can be coroutine functions\nor regular functions (executed in a background thread). If a handler raises\n`StopHandler`, it halts further processing of that update.\n\nArgs:\n name (str): The name/type of the incoming update (e.g. \"message\", \"chat\").\n update (dict): The update payload received from the server.\n\nReturns:\n None\n\nLogs:\n - Errors during handler execution, including traceback." }, { "instruction": "متد get_updates در فایل rubpy/network.py چه کاری انجام می‌دهد؟", "input": "", "output": "Continuously listens for updates from Rubika's WebSocket API,\nmaintaining connection with automatic reconnection logic.\n\nThis coroutine establishes a persistent WebSocket connection to Rubika,\nperforms handshake authentication, and listens for incoming messages.\nIf the connection drops or times out, it waits briefly and reconnects.\nIt also launches a background task to keep the socket alive.\n\nReturns:\n None\n\nLogs:\n - Warning on connection failures or errors during communication." }, { "instruction": "متد keep_socket در فایل rubpy/network.py چه کاری انجام می‌دهد؟", "input": "", "output": "Maintains the WebSocket connection by periodically sending pings\nand checking for chat updates.\n\nThis coroutine runs indefinitely, sending an empty JSON object\nto the server every 10 seconds to keep the connection alive. If the\nWebSocket is closed or an exception occurs, it logs a warning and retries.\n\nReturns:\n None\n\nLogs:\n - Warning if the connection check or ping fails." }, { "instruction": "متد handle_text_message در فایل rubpy/network.py چه کاری انجام می‌دهد؟", "input": "", "output": "Handles incoming text messages received via WebSocket.\n\nThis method decrypts the incoming `data_enc` field using the client's key,\nextracts updates, and dispatches them asynchronously to the appropriate handler(s).\n\nArgs:\n msg_data (dict): Parsed JSON dictionary received from the WebSocket.\n\nReturns:\n None\n\nLogs:\n - Debug message if `data_enc` is missing.\n - Error message if decryption or handling fails." }, { "instruction": "متد upload_file در فایل rubpy/network.py چه کاری انجام می‌دهد؟", "input": "", "output": "Uploads a file to Rubika with chunked transfer and retry logic.\n\nSupports both file path and raw bytes input. Uploads in chunks and\nprovides progress updates via optional callback. If the server requests\nreinitialization (e.g. due to expired upload credentials), it automatically\nresets and resumes the process.\n\nArgs:\n file (str or bytes): File path or bytes to upload.\n mime (str, optional): MIME type of the file. Defaults to file extension.\n file_name (str, optional): Name of the file to assign. Required for bytes input.\n chunk (int, optional): Chunk size in bytes. Defaults to 1MB.\n callback (callable, optional): Function or coroutine for progress reporting.\n Called with (total_size, uploaded_bytes).\n max_retries (int, optional): Max retry attempts per chunk. Defaults to 3.\n backoff (float, optional): Initial delay (in seconds) for exponential retry backoff. Defaults to 1.0.\n\nReturns:\n Update: An object containing metadata about the uploaded file (dc_id, file_id, size, mime, etc.).\n\nRaises:\n ValueError: If file path is invalid or file_name is missing for bytes input.\n TypeError: If the file argument is neither str nor bytes.\n Exception: If the upload fails after retries." }, { "instruction": "متد download در فایل rubpy/network.py چه کاری انجام می‌دهد؟", "input": "", "output": "Download a file from Rubika using its file ID and access hash.\n\nThis function supports downloading files either to memory (as bytes)\nor saving directly to disk. It also supports parallel downloading using\nasyncio.gather and provides retry logic with exponential backoff.\n\nArgs:\n dc_id (int): Data center ID.\n file_id (int): Unique identifier of the file.\n access_hash (str): Access hash associated with the file.\n size (int): Total size of the file in bytes.\n chunk (int, optional): Size of each download chunk in bytes. Defaults to 131072 (128 KB).\n callback (callable, optional): A function or coroutine called with (total_size, downloaded_size)\n to report progress.\n gather (bool, optional): If True, downloads chunks in parallel using asyncio.gather. Defaults to False.\n save_as (str, optional): If specified, path to save the downloaded file. If None, returns file content.\n max_retries (int, optional): Maximum number of retry attempts for each chunk. Defaults to 3.\n backoff (float, optional): Base delay (in seconds) for exponential backoff. Defaults to 1.0.\n\nReturns:\n bytes or str: The downloaded file content as bytes (if `save_as` is None),\n or the path to the saved file (if `save_as` is specified).\n\nRaises:\n None explicitly, but logs warnings and errors internally on failed retries or callback exceptions." }, { "instruction": "متد async_to_sync در فایل rubpy/sync.py چه کاری انجام می‌دهد؟", "input": "", "output": "Wrap an asynchronous function or asynchronous generator method\nto make it synchronous.\n\nParameters:\n- obj: Object containing the method.\n- name: Name of the method to wrap.\n\nReturns:\nWrapped synchronous function or generator." }, { "instruction": "متد wrap_methods در فایل rubpy/sync.py چه کاری انجام می‌دهد؟", "input": "", "output": "Wrap asynchronous methods in a class to make them synchronous.\n\nParameters:\n- source: Class containing asynchronous methods." }, { "instruction": "متد wrap_types_methods در فایل rubpy/sync.py چه کاری انجام می‌دهد؟", "input": "", "output": "Wrap asynchronous methods in types' classes to make them synchronous." }, { "instruction": "متد wrap_models_methods در فایل rubpy/sync.py چه کاری انجام می‌دهد؟", "input": "", "output": "Wrap asynchronous methods in models' classes to make them synchronous." }, { "instruction": "متد is_rubika_link در فایل rubpy/utils.py چه کاری انجام می‌دهد؟", "input": "", "output": "Check if the given string contains a Rubika link.\n\n:param string: Input string to check.\n:return: True if the string contains a Rubika link, False otherwise." }, { "instruction": "متد is_group_link در فایل rubpy/utils.py چه کاری انجام می‌دهد؟", "input": "", "output": "Check if the given string contains a Rubika group link.\n\n:param string: Input string to check.\n:return: True if the string contains a Rubika group link, False otherwise." }, { "instruction": "متد is_channel_link در فایل rubpy/utils.py چه کاری انجام می‌دهد؟", "input": "", "output": "Check if the given string contains a Rubika channel link.\n\n:param string: Input string to check.\n:return: True if the string contains a Rubika channel link, False otherwise." }, { "instruction": "متد is_username در فایل rubpy/utils.py چه کاری انجام می‌دهد؟", "input": "", "output": "Check if the given string contains a Rubika username.\n\n:param string: Input string to check.\n:return: True if the string contains a Rubika username, False otherwise." }, { "instruction": "متد get_rubika_links در فایل rubpy/utils.py چه کاری انجام می‌دهد؟", "input": "", "output": "Extract Rubika links from the given string.\n\n:param string: Input string to extract links from.\n:return: List of Rubika links found in the string." }, { "instruction": "متد get_group_links در فایل rubpy/utils.py چه کاری انجام می‌دهد؟", "input": "", "output": "Extract Rubika group links from the given string.\n\n:param string: Input string to extract group links from.\n:return: List of Rubika group links found in the string." }, { "instruction": "متد get_channel_links در فایل rubpy/utils.py چه کاری انجام می‌دهد؟", "input": "", "output": "Extract Rubika channel links from the given string.\n\n:param string: Input string to extract channel links from.\n:return: List of Rubika channel links found in the string." }, { "instruction": "متد get_usernames در فایل rubpy/utils.py چه کاری انجام می‌دهد؟", "input": "", "output": "Extract Rubika usernames from the given string.\n\n:param string: Input string to extract usernames from.\n:return: List of Rubika usernames found in the string." }, { "instruction": "متد Bold در فایل rubpy/utils.py چه کاری انجام می‌دهد؟", "input": "", "output": "Make the text bold.\n\n:param text: Input text to be formatted.\n:return: Bold formatted text." }, { "instruction": "متد Italic در فایل rubpy/utils.py چه کاری انجام می‌دهد؟", "input": "", "output": "Make the text italic.\n\n:param text: Input text to be formatted.\n:return: Italic formatted text." }, { "instruction": "متد Underline در فایل rubpy/utils.py چه کاری انجام می‌دهد؟", "input": "", "output": "Underline the text.\n\n:param text: Input text to be formatted.\n:return: Underlined text." }, { "instruction": "متد Strike در فایل rubpy/utils.py چه کاری انجام می‌دهد؟", "input": "", "output": "Add strike-through to the text.\n\n:param text: Input text to be formatted.\n:return: Text with strike-through." }, { "instruction": "متد Spoiler در فایل rubpy/utils.py چه کاری انجام می‌دهد؟", "input": "", "output": "Format the text as a spoiler.\n\n:param text: Input text to be formatted.\n:return: Spoiler formatted text." }, { "instruction": "متد Code در فایل rubpy/utils.py چه کاری انجام می‌دهد؟", "input": "", "output": "Format the text as code.\n\n:param text: Input text to be formatted.\n:return: Code formatted text." }, { "instruction": "متد Mention در فایل rubpy/utils.py چه کاری انجام می‌دهد؟", "input": "", "output": "Mention a user with a specific object GUID.\n\n:param text: Text to be mentioned.\n:param object_guid: GUID of the mentioned object.\n:return: Mention formatted text." }, { "instruction": "متد Hyperlink در فایل rubpy/utils.py چه کاری انجام می‌دهد؟", "input": "", "output": "Create a hyperlink with the provided text and link.\n\n:param text: Text for the hyperlink.\n:param link: URL for the hyperlink.\n:return: Hyperlink formatted text." }, { "instruction": "کلاس AntiSpam در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Advanced Anti-Spam System for Bots (Groups & Private)\n\nFeatures:\n- Per chat_id spam protection (group & private)\n- Max messages per time window\n- Auto block duration\n- Auto clear expired blocks\n- Max message length check\n\nExample:\n--------\nantispam = AntiSpam()\n\n# Check spam in group\nif await antispam.is_spammer(chat_id=123, user_id=456, message=\"hello\"):\n print(\"User is spamming in group!\")\n\n# Check spam in private chat\nif await antispam.is_spammer(chat_id=456, message=\"hi\"):\n print(\"User is spamming in private!\")" }, { "instruction": "متد _make_key در فایل rubpy/utils.py چه کاری انجام می‌دهد؟", "input": "", "output": "Generate unique key for spam tracking" }, { "instruction": "متد is_spammer در فایل rubpy/utils.py چه کاری انجام می‌دهد؟", "input": "", "output": "Check if user is spammer" }, { "instruction": "متد _auto_clear در فایل rubpy/utils.py چه کاری انجام می‌دهد؟", "input": "", "output": "Auto clear expired blocks to free memory" }, { "instruction": "متد has_time_passed در فایل rubpy/bot/bot.py چه کاری انجام می‌دهد؟", "input": "", "output": "Check if a certain amount of time has passed since the last time.\n\nArgs:\n last_time: The last time in seconds.\n seconds: The amount of time to check for.\n\nReturns:\n bool: True if the time has passed, False otherwise." }, { "instruction": "کلاس BotClient در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Asynchronous client for managing Rubika bot interactions.\n\nAttributes:\n token: Bot authentication token provided by Rubika.\n base_url: The base URL for API requests.\n handlers: A dictionary of registered handlers.\n start_handlers: A list of registered startup handlers.\n shutdown_handlers: A list of registered shutdown handlers.\n middlewares: A list of registered middleware functions.\n session: The active aiohttp session.\n running: A flag indicating whether the client is running.\n next_offset_id: The next offset ID for API requests.\n processed_messages: A deque of processed messages.\n rate_limit: The minimum delay in seconds between API requests.\n last_request_time: The last time an API request was made.\n first_get_updates: A flag indicating whether this is the first get updates request.\n use_webhook: A flag indicating whether the client should operate in webhook mode.\n timeout: The overall timeout for API requests.\n connector: An optional shared aiohttp connector instance.\n max_retries: The maximum number of retries for retryable responses.\n backoff_factor: The base delay in seconds for exponential backoff.\n retry_statuses: A set of HTTP status codes that should trigger retries." }, { "instruction": "متد __init__ در فایل rubpy/bot/bot.py چه کاری انجام می‌دهد؟", "input": "", "output": "Initialize a new :class:`BotClient` instance.\n\nArgs:\n token: Bot authentication token provided by Rubika.\n rate_limit: Minimum delay in seconds between API requests.\n use_webhook: Whether the client should operate in webhook mode.\n timeout: Overall timeout for API requests.\n connector: Optional shared aiohttp connector instance.\n max_retries: Maximum number of retries for retryable responses.\n backoff_factor: Base delay (in seconds) for exponential backoff.\n retry_statuses: HTTP status codes that should trigger retries.\n fallback_urls: Additional base URL templates to try if the primary URL fails.\n ignore_timeout: Whether to keep retrying indefinitely on Bot API Timeout errors.\n persist_offset: Persist \"next_offset_id\" to disk during long polling when True." }, { "instruction": "متد _apply_text_formatting در فایل rubpy/bot/bot.py چه کاری انجام می‌دهد؟", "input": "", "output": "Apply text formatting (parse_mode) and metadata to the payload.\n\nArgs:\n payload: The request payload dictionary to update.\n text: The text content to format.\n parse_mode: The parse mode to use (Markdown, HTML, or None).\n metadata: Optional metadata to include in the payload.\n \nReturns:\n The resolved parse mode that was applied." }, { "instruction": "متد _apply_text_parse_mode در فایل rubpy/bot/bot.py چه کاری انجام می‌دهد؟", "input": "", "output": "Deprecated: Use _apply_text_formatting instead." }, { "instruction": "متد on_start در فایل rubpy/bot/bot.py چه کاری انجام می‌دهد؟", "input": "", "output": "Decorator to register startup handlers.\n\nExample:\n @bot.on_start()\n async def hello(bot):\n print(\"Bot started!\")" }, { "instruction": "متد __aenter__ در فایل rubpy/bot/bot.py چه کاری انجام می‌دهد؟", "input": "", "output": "Asynchronous context manager entry point." }, { "instruction": "متد __aexit__ در فایل rubpy/bot/bot.py چه کاری انجام می‌دهد؟", "input": "", "output": "Ensure the client stops when leaving an async context." }, { "instruction": "متد __enter__ در فایل rubpy/bot/bot.py چه کاری انجام می‌دهد؟", "input": "", "output": "Synchronous context manager entry point." }, { "instruction": "متد __exit__ در فایل rubpy/bot/bot.py چه کاری انجام می‌دهد؟", "input": "", "output": "Ensure the client stops when leaving a sync context." }, { "instruction": "متد _rate_limit_delay در فایل rubpy/bot/bot.py چه کاری انجام می‌دهد؟", "input": "", "output": "Enforce the rate limit by waiting for a certain amount of time.\n\nThis method checks the time elapsed since the last request and waits\nfor the remaining time if necessary." }, { "instruction": "متد start در فایل rubpy/bot/bot.py چه کاری انجام می‌دهد؟", "input": "", "output": "Start the client session and execute registered startup hooks." }, { "instruction": "متد stop در فایل rubpy/bot/bot.py چه کاری انجام می‌دهد؟", "input": "", "output": "Stop the client and run shutdown hooks." }, { "instruction": "متد on_shutdown در فایل rubpy/bot/bot.py چه کاری انجام می‌دهد؟", "input": "", "output": "Decorator to register shutdown handlers.\n\nExample:\n @bot.on_shutdown()\n async def bye(bot):\n print(\"Bot stopped!\")" }, { "instruction": "متد middleware در فایل rubpy/bot/bot.py چه کاری انجام می‌دهد؟", "input": "", "output": "Decorator to register a middleware function.\n\nMiddleware receives (bot, update, next_middleware).\nIt must call `await next_middleware()` to continue chain.\n\nExample:\n @bot.middleware()\n async def logger(bot, update, call_next):\n print(\"🔹 Update received:\", update)\n await call_next()" }, { "instruction": "متد enable_plugins در فایل rubpy/bot/bot.py چه کاری انجام می‌دهد؟", "input": "", "output": "Enable the given plugins or the configured defaults." }, { "instruction": "متد disable_plugins در فایل rubpy/bot/bot.py چه کاری انجام می‌دهد؟", "input": "", "output": "Disable provided plugins or all enabled plugins when omitted." }, { "instruction": "متد register_plugin در فایل rubpy/bot/bot.py چه کاری انجام می‌دهد؟", "input": "", "output": "Register a plugin class with the internal manager." }, { "instruction": "متد _make_request در فایل rubpy/bot/bot.py چه کاری انجام می‌دهد؟", "input": "", "output": "Perform an API request with retry and response validation." }, { "instruction": "متد _ensure_session در فایل rubpy/bot/bot.py چه کاری انجام می‌دهد؟", "input": "", "output": "Ensure there is an open aiohttp session available for use." }, { "instruction": "متد _close_session در فایل rubpy/bot/bot.py چه کاری انجام می‌دهد؟", "input": "", "output": "Close the active aiohttp session if it exists." }, { "instruction": "متد _offset_storage_path در فایل rubpy/bot/bot.py چه کاری انجام می‌دهد؟", "input": "", "output": "Build and memoize the file path for persisting offset IDs." }, { "instruction": "متد _load_persisted_offset در فایل rubpy/bot/bot.py چه کاری انجام می‌دهد؟", "input": "", "output": "Load the last persisted offset ID from disk, if available." }, { "instruction": "متد _persist_offset_id در فایل rubpy/bot/bot.py چه کاری انجام می‌دهد؟", "input": "", "output": "Persist or clear the stored offset ID based on the provided value." }, { "instruction": "متد _sleep_backoff در فایل rubpy/bot/bot.py چه کاری انجام می‌دهد؟", "input": "", "output": "Wait for an exponentially increasing delay between retries." }, { "instruction": "متد get_updates در فایل rubpy/bot/bot.py چه کاری انجام می‌دهد؟", "input": "", "output": "Fetch updates from the server.\n\nArgs:\n limit (int): Maximum number of updates to fetch.\n offset_id (str): Offset for pagination.\n\nReturns:\n List[Update]: Parsed updates as Update objects." }, { "instruction": "متد add_handler در فایل rubpy/bot/bot.py چه کاری انجام می‌دهد؟", "input": "", "output": "Register a new handler with given filters.\n\nArgs:\n handler (Callable): The function to handle updates.\n *filters (Filter): One or more filters that must pass.\n\nReturns:\n str: Unique handler key (can be used to remove handler later).\n\nExample:\n key = bot.add_handler(my_handler, TextFilter(\"hello\"))" }, { "instruction": "متد remove_handler در فایل rubpy/bot/bot.py چه کاری انجام می‌دهد؟", "input": "", "output": "Remove a registered handler.\n\nArgs:\n handler_key (str): The unique key returned by add_handler/on_update.\n handler (Optional[Callable]): Specific handler function to remove.\n If None, removes all handlers under the key.\n\nReturns:\n bool: True if something was removed, False otherwise.\n\nExample:\n bot.remove_handler(key)" }, { "instruction": "متد process_update در فایل rubpy/bot/bot.py چه کاری انجام می‌دهد؟", "input": "", "output": "Run middlewares in order before dispatching the update." }, { "instruction": "متد _dispatch_update در فایل rubpy/bot/bot.py چه کاری انجام می‌دهد؟", "input": "", "output": "Invoke the first matching handler for the provided update." }, { "instruction": "متد handle_webhook در فایل rubpy/bot/bot.py چه کاری انجام می‌دهد؟", "input": "", "output": "Process incoming webhook requests and queue updates for handling." }, { "instruction": "متد run در فایل rubpy/bot/bot.py چه کاری انجام می‌دهد؟", "input": "", "output": "Run the client in either webhook or polling mode." }, { "instruction": "متد close در فایل rubpy/bot/bot.py چه کاری انجام می‌دهد؟", "input": "", "output": "Close the underlying HTTP session." }, { "instruction": "متد download_file در فایل rubpy/bot/bot.py چه کاری انجام می‌دهد؟", "input": "", "output": "Downloads a file by file_id.\n\nArgs:\n file_id (str): Unique identifier of the file.\n save_as (Optional[str]): File path to save. Ignored if as_bytes=True.\n progress (Optional[Callable[[int, int], None]]): Optional progress callback.\n chunk_size (int): Download chunk size in bytes.\n as_bytes (bool): If True, returns the content as bytes instead of saving.\n file_name (Optional[str]): File name to save. Ignored if save_as is provided.\n timeout (Optional[Union[int, float]]): Timeout for the download request.\nReturns:\n str: Path to saved file (if as_bytes=False)\n bytes: Content of the file (if as_bytes=True)" }, { "instruction": "کلاس DictLike در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "A class that allows attribute access via dictionary-like key lookup.\n\nProvides dictionary-style access (`obj[key]`) to attributes.\nAlso supports `get(key, default)` method.\n\nMethods:\n find_key(key): Recursively searches for a key in nested attributes\n and returns its value if found, else raises KeyError.\n\nExample:\n >>> class Example(DictLike):\n ... def __init__(self):\n ... self.a = 10\n ... self.b = DictLike()\n ... self.b.c = 20\n ... self.b.d = DictLike()\n ... self.b.d.e = 30\n ...\n >>> ex = Example()\n >>> ex['a']\n 10\n >>> ex.get('a')\n 10\n >>> ex.find_key('e')\n 30\n >>> ex.find_key('x')\n Traceback (most recent call last):\n ...\n KeyError: 'x'" }, { "instruction": "متد find_key در فایل rubpy/bot/dict_like.py چه کاری انجام می‌دهد؟", "input": "", "output": "Recursively searches for the given key in self and nested DictLike attributes.\n\nArgs:\n key (str): The key to search for.\n\nReturns:\n Any: The value corresponding to the key if found.\n\nRaises:\n KeyError: If the key is not found in self or nested attributes." }, { "instruction": "متد __post_init__ در فایل rubpy/bot/dict_like.py چه کاری انجام می‌دهد؟", "input": "", "output": "Automatically convert nested dictionaries to DictLike subclasses after initialization.\nThis runs automatically in dataclasses that inherit from DictLike." }, { "instruction": "کلاس APIException در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Exception for handling Rubika API errors.\n\nAttributes:\n status (str): Response status from API.\n dev_message (str): Optional developer message from API." }, { "instruction": "کلاس text در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Filter for checking message text content.\n\nThis filter can match messages based on:\n- An exact string match.\n- A regular expression pattern.\n- Or, if no value is given, it simply checks that the message has any text.\n\nArgs:\n text (str, optional): The exact text or regex pattern to match.\n regex (bool): If True, `text` is treated as a regular expression.\n\nReturns:\n bool: True if the message text matches the given criteria.\n\nExample:\n >>> from rubpy import BotClient\n >>> from rubpy.bot.filters import text\n >>>\n >>> bot = BotClient(\"your_auth_token\")\n >>>\n >>> # Match any text message\n >>> @bot.on_update(text)\n ... async def any_text(c, update):\n ... await c.send_message(update.chat_id, \"You sent some text!\")\n >>>\n >>> # Match exact text\n >>> @bot.on_update(text(\"hello\"))\n ... async def exact_match(c, update):\n ... await c.send_message(update.chat_id, \"You said hello!\")\n >>>\n >>> # Match using regex\n >>> @bot.on_update(text(r\"^/start.*\", regex=True))\n ... async def regex_match(c, update):\n ... await c.send_message(update.chat_id, \"Start command detected!\")" }, { "instruction": "کلاس commands در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Advanced filter for detecting bot commands (e.g. /start, !help, test).\n\nFeatures:\n - Supports multiple command prefixes (default: / and !).\n - Case-insensitive option.\n - Matches both exact commands and commands with arguments.\n - Supports single or multiple commands.\n\nArgs:\n commands (Union[str, List[str]]): Command or list of commands (without prefix).\n prefixes (List[str], optional): Allowed prefixes (default: [\"/\", \"!\"]).\n case_sensitive (bool, optional): Whether command matching is case-sensitive. Default False.\n allow_no_prefix (bool, optional): If True, matches commands even without prefix. Default False.\n\nExample:\n >>> @bot.on_update(commands(\"start\"))\n ... async def handle_start(c, update):\n ... await update.reply(\"Welcome to the bot!\")\n\n >>> @bot.on_update(commands([\"help\", \"about\"], prefixes=[\"/\", \".\", \"!\"]))\n ... async def handle_help(c, update):\n ... await update.reply(\"Help/About detected!\")\n\n >>> @bot.on_update(commands(\"test\", allow_no_prefix=True))\n ... async def handle_test(c, update):\n ... await update.reply(\"Matched with or without prefix\")" }, { "instruction": "کلاس update_type در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Filter for matching specific update types.\n\nThis filter checks if the update's type matches one or more given update types.\nIt supports both `Update` objects (checking their `type` attribute)\nand `InlineMessage` objects (matched by the string `\"InlineMessage\"`).\n\nArgs:\n update_types (Union[str, List[str]]): A single update type string or a list of update type strings.\n\nReturns:\n bool: True if the update's type matches one of the specified types.\n\nExample:\n >>> from rubpy import BotClient\n >>> from your_module import update_type\n >>>\n >>> bot = BotClient(\"your_auth_token\")\n >>>\n >>> # Match only message updates\n >>> @bot.on_update(update_type(\"NewMessage\"))\n ... async def handle_message_update(c, update):\n ... await c.send_message(update.chat_id, \"Received a message update.\")\n >>>\n >>> # Match multiple types including inline messages\n >>> @bot.on_update(update_type([\"NewMessage\", \"UpdatedMessage\", \"InlineMessage\"]))\n ... async def handle_multiple_types(c, update):\n ... await c.send_message(update.chat_id, \"Received one of several update types.\")" }, { "instruction": "کلاس private در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Filter for detecting messages sent in private (one-on-one) chats.\n\nThis filter checks whether the sender of the message is a regular user (i.e., not a group or bot).\nIt's typically used to ensure that a handler only runs for messages from private chats.\n\nReturns:\n bool: True if the message was sent by a user in a private chat, otherwise False.\n\nExample:\n >>> from rubpy import BotClient\n >>> from rubpy.bot.models import Update\n >>> from rubpy.bot.filters import private\n >>>\n >>> bot_client = BotClient(\"your_bot_token\")\n >>>\n >>> @bot_client.on_update(private)\n ... async def handle_private_message(c, update):\n ... await c.send_message(update.chat_id, \"You are chatting privately with the bot.\")" }, { "instruction": "کلاس group در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Filter for detecting messages sent from groups.\n\nThis filter checks whether the sender of the message is of type `'Group'`.\nIt's useful when you want a handler to be triggered only for messages\noriginating from group chats.\n\nReturns:\n bool: True if the message was sent from a group, otherwise False.\n\nExample:\n >>> from rubpy import BotClient\n >>> from rubpy.bot.models import Update\n >>> from rubpy.bot.filters import group\n >>>\n >>> bot_client = BotClient(\"your_bot_token\")\n >>>\n >>> @bot_client.on_update(group)\n ... async def handle_group_messages(c, update):\n ... await c.send_message(update.chat_id, \"This message came from a group!\")" }, { "instruction": "کلاس channel در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Filter for detecting messages sent from groups.\n\nThis filter checks whether the sender of the message is of type `'Group'`.\nIt's useful when you want a handler to be triggered only for messages\noriginating from group chats.\n\nReturns:\n bool: True if the message was sent from a group, otherwise False.\n\nExample:\n >>> from rubpy import BotClient\n >>> from rubpy.bot.models import Update\n >>> from rubpy.bot.filters import group\n >>>\n >>> bot_client = BotClient(\"your_bot_token\")\n >>>\n >>> @bot_client.on_update(group)\n ... async def handle_group_messages(c, update):\n ... await c.send_message(update.chat_id, \"This message came from a group!\")" }, { "instruction": "کلاس bot در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Filter for detecting messages sent by bots.\n\nThis filter checks whether the sender of the message is of type `'Bot'`.\nIt supports both regular updates and inline messages.\n\nReturns:\n bool: True if the message was sent by a bot, otherwise False.\n\nExample:\n >>> from rubpy import BotClient\n >>> from rubpy.bot.models import Update\n >>> from rubpy.bot.filters import bot\n >>>\n >>> bot_client = BotClient(\"your_bot_token\")\n >>>\n >>> @bot_client.on_update(bot)\n ... async def handle_bot_messages(c, update):\n ... await c.send_message(update.chat_id, \"A bot sent this message!\")" }, { "instruction": "کلاس chat در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Filter for matching specific chat IDs.\n\nThis filter allows you to restrict a handler to updates coming from one or more specified chat IDs.\nIt supports both a single chat ID (as a string) and a list of chat IDs.\n\nArgs:\n chat_id (Union[list, str]): A single chat ID or a list of chat IDs to allow.\n\nExample:\n >>> from rubpy import BotClient\n >>> from rubpy.bot.models import Update\n >>> from rubpy.bot.filters import chat\n >>>\n >>> bot = BotClient(\"your_bot_token\")\n >>>\n >>> @bot.on_update(chat(\"b0_test_chat\"))\n ... async def only_for_test_chat(c, update):\n ... await c.send_message(update.chat_id, \"Hello from test chat!\")\n >>>\n >>> @bot.on_update(chat([\"b0_admin\", \"b0_mod\"]))\n ... async def for_admins_and_mods(c, update):\n ... await c.send_message(update.chat_id, \"Hello admins and moderators!\")" }, { "instruction": "کلاس button در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Filter for button click interactions. Supports both direct string comparison and regex matching.\n\nThis filter is useful for handling button presses in a bot framework. It checks whether\nthe button's identifier (such as `button_id` or `callback_data`) matches the expected value.\n\nArgs:\n button_id (str): The value to compare directly or match using a regex pattern.\n regex (bool): If True, treats the button_id as a regular expression.\n\nExample:\n >>> from rubpy import BotClient\n >>> from rubpy.bot.models import Update\n >>> from rubpy.bot.filters import button\n >>>\n >>> bot = BotClient(\"your_bot_token\")\n >>>\n >>> @bot.on_update(button(\"btn_123\"))\n ... async def handle_btn(c, update):\n ... await c.send_message(update.chat_id, \"Button 123 clicked!\")\n >>>\n >>> @bot.on_update(button(r\"btn_\\d+\", regex=True))\n ... async def handle_regex_btn(c, update):\n ... await c.send_message(update.chat_id, \"Numbered button clicked!\")" }, { "instruction": "کلاس forward در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Filter for checking forwarded messages.\n\nReturns:\n bool: True if the message forward matches the given criteria.\n\nExample:\n >>> from rubpy import BotClient\n >>> from rubpy.bot.filters import forward\n >>>\n >>> bot = BotClient(\"your_bot_token\")\n >>>\n >>> # Match any forward message\n >>> @bot.on_update(forward)\n ... async def any_forward(c, update):\n ... await update.reply(\"You sent some forward!\")" }, { "instruction": "کلاس is_edited در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Filter for checking edited messages.\n\nReturns:\n bool: False or True\n\nExample:\n >>> from rubpy import BotClient\n >>> from rubpy.bot import filters\n >>>\n >>> bot = BotClient(\"your_bot_token\")\n >>>\n >>> # Match any is_edited message\n >>> @bot.on_update(filters.is_edited)\n ... async def any_edited(c, update):\n ... await update.delete()" }, { "instruction": "کلاس sender_type در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Filter for matching specific sender types.\n\nThis filter is used to allow or restrict handlers based on the `sender_type` field in an update.\nIt supports both a single sender type as a string, or a list of allowed sender types.\n\nArgs:\n types (Union[List[str], str]): A single sender type or a list of allowed sender types.\n Examples of sender types may include \"user\", \"bot\", \"channel\", etc.\n\nExample:\n >>> from rubpy import BotClient\n >>> from rubpy.bot.models import Update\n >>> from rubpy.bot.filters import sender_type\n >>>\n >>> bot = BotClient(\"your_bot_token\")\n >>>\n >>> @bot.on_update(sender_type(\"User\"))\n ... async def handle_user_message(c, update):\n ... await c.send_message(update.chat_id, \"Hello user!\")\n >>>\n >>> @bot.on_update(sender_type([\"Bot\", \"Channel\"]))\n ... async def handle_bots_or_channels(c, update):\n ... await c.send_message(update.chat_id, \"Hello bot or channel!\")" }, { "instruction": "کلاس has_aux_data در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Filter for checking aux_data messages.\n\nReturns:\n bool: False or True\n\nExample:\n >>> from rubpy import BotClient\n >>> from rubpy.bot import filters\n >>>\n >>> bot = BotClient(\"your_bot_token\")\n >>>\n >>> # Match any aux_data message\n >>> @bot.on_update(filters.has_aux_data)\n ... async def any_has_aux_data(c, update):\n ... await update.reply(\"has aux data\")" }, { "instruction": "کلاس file در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Filter for checking file messages.\n\nReturns:\n bool: False or True\n\nExample:\n >>> from rubpy import BotClient\n >>> from rubpy.bot import filters\n >>>\n >>> bot = BotClient(\"your_bot_token\")\n >>>\n >>> # Match any file message\n >>> @bot.on_update(filters.file)\n ... async def any_file(c, update):\n ... await update.reply(\"new file\")" }, { "instruction": "کلاس photo در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Filter for checking photo messages.\n\nReturns:\n bool: False or True\n\nExample:\n >>> from rubpy import BotClient\n >>> from rubpy.bot import filters\n >>>\n >>> bot = BotClient(\"your_bot_token\")\n >>>\n >>> # Match any photo message\n >>> @bot.on_update(filters.photo)\n ... async def any_photo(c, update):\n ... await update.reply(\"new photo\")" }, { "instruction": "کلاس video در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Filter for checking video messages.\n\nReturns:\n bool: False or True\n\nExample:\n >>> from rubpy import BotClient\n >>> from rubpy.bot import filters\n >>>\n >>> bot = BotClient(\"your_bot_token\")\n >>>\n >>> # Match any video message\n >>> @bot.on_update(filters.video)\n ... async def any_video(c, update):\n ... await update.reply(\"new video\")" }, { "instruction": "کلاس audio در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Filter for checking audio messages.\n\nReturns:\n bool: False or True\n\nExample:\n >>> from rubpy import BotClient\n >>> from rubpy.bot import filters\n >>>\n >>> bot = BotClient(\"your_bot_token\")\n >>>\n >>> # Match any audio message\n >>> @bot.on_update(filters.audio)\n ... async def any_audio(c, update):\n ... await update.reply(\"new audio\")" }, { "instruction": "کلاس voice در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Filter for checking voice messages.\n\nReturns:\n bool: False or True\n\nExample:\n >>> from rubpy import BotClient\n >>> from rubpy.bot import filters\n >>>\n >>> bot = BotClient(\"your_bot_token\")\n >>>\n >>> # Match any voice message\n >>> @bot.on_update(filters.voice)\n ... async def any_voice(c, update):\n ... await update.reply(\"new voice\")" }, { "instruction": "کلاس gif در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Filter for checking gif messages.\n\nReturns:\n bool: False or True\n\nExample:\n >>> from rubpy import BotClient\n >>> from rubpy.bot import filters\n >>>\n >>> bot = BotClient(\"your_bot_token\")\n >>>\n >>> # Match any gif message\n >>> @bot.on_update(filters.gif)\n ... async def any_gif(c, update):\n ... await update.reply(\"new gif\")" }, { "instruction": "کلاس location در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Filter for checking location messages.\n\nReturns:\n bool: False or True\n\nExample:\n >>> from rubpy import BotClient\n >>> from rubpy.bot import filters\n >>>\n >>> bot = BotClient(\"your_bot_token\")\n >>>\n >>> # Match any location message\n >>> @bot.on_update(filters.location)\n ... async def any_location(c, update):\n ... await update.reply(\"new location\")" }, { "instruction": "کلاس sticker در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Filter for checking sticker messages.\n\nReturns:\n bool: False or True\n\nExample:\n >>> from rubpy import BotClient\n >>> from rubpy.bot import filters\n >>>\n >>> bot = BotClient(\"your_bot_token\")\n >>>\n >>> # Match any sticker message\n >>> @bot.on_update(filters.sticker)\n ... async def any_sticker(c, update):\n ... await update.reply(\"new sticker\")" }, { "instruction": "کلاس contact_message در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Filter for checking contact_message messages.\n\nReturns:\n bool: False or True\n\nExample:\n >>> from rubpy import BotClient\n >>> from rubpy.bot import filters\n >>>\n >>> bot = BotClient(\"your_bot_token\")\n >>>\n >>> # Match any contact_message message\n >>> @bot.on_update(filters.contact_message)\n ... async def any_contact_message(c, update):\n ... await update.reply(\"new contact_message\")" }, { "instruction": "کلاس poll در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Filter for checking poll messages.\n\nReturns:\n bool: False or True\n\nExample:\n >>> from rubpy import BotClient\n >>> from rubpy.bot import filters\n >>>\n >>> bot = BotClient(\"your_bot_token\")\n >>>\n >>> # Match any poll message\n >>> @bot.on_update(filters.poll)\n ... async def any_poll(c, update):\n ... await update.reply(\"new poll\")" }, { "instruction": "کلاس live_location در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Filter for checking live_location messages.\n\nReturns:\n bool: False or True\n\nExample:\n >>> from rubpy import BotClient\n >>> from rubpy.bot import filters\n >>>\n >>> bot = BotClient(\"your_bot_token\")\n >>>\n >>> # Match any live_location message\n >>> @bot.on_update(filters.live_location)\n ... async def any_live_location(c, update):\n ... await update.reply(\"new live_location\")" }, { "instruction": "کلاس states در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Self-contained states filter that stores states in-memory (no external libs).\n\n- Use as a filter instance: `s = states(\"awaiting_email\"); @bot.on_update(s) ...`\n- Also exposes methods to set/get/clear state for a given update:\n await s.set_state_for(update, \"awaiting_email\", expire=300)\n await s.get_state_for(update)\n await s.clear_state_for(update)\n\nArgs:\n targets: None|str|List[str] - states to match (None => match any existing state).\n match_mode: \"exact\"|\"regex\"|\"contains\"|\"any\" (default \"exact\")\n scope: \"user\"|\"chat\"|\"both\" - where to look up the state keys in internal store\n check_keys: list of keys to check inside update payload before checking internal store\n auto_clear: bool - if True and matched => automatically clear stored state\n set_on_match: Optional[str] - if provided, set this new state on match\n expire: Optional[int] - default TTL (seconds) when using set_on_match (or when set_state_for uses expire)\n invert: bool - invert the match result" }, { "instruction": "متد set_state_for در فایل rubpy/bot/filters.py چه کاری انجام می‌دهد؟", "input": "", "output": "Set a state for the update's scope (user/chat) according to filter.scope." }, { "instruction": "متد get_state_for در فایل rubpy/bot/filters.py چه کاری انجام می‌دهد؟", "input": "", "output": "Get first available state from storage for the update (according to scope)." }, { "instruction": "متد clear_state_for در فایل rubpy/bot/filters.py چه کاری انجام می‌دهد؟", "input": "", "output": "Clear states (all keys derived from update)." }, { "instruction": "متد _keys_for_update در فایل rubpy/bot/filters.py چه کاری انجام می‌دهد؟", "input": "", "output": "Build one or two keys to try based on scope and available ids on update.\nKeys look like \"user:{sender_id}\" and/or \"chat:{chat_id}\"." }, { "instruction": "متد _extract_local_state در فایل rubpy/bot/filters.py چه کاری انجام می‌دهد؟", "input": "", "output": "Try to read state directly from update payload keys (without using internal store).\nReturns first found string value or None." }, { "instruction": "متد __post_init__ در فایل rubpy/bot/models.py چه کاری انجام می‌دهد؟", "input": "", "output": "Automatically normalize specific Rubika links to deep-link format." }, { "instruction": "متد download در فایل rubpy/bot/models.py چه کاری انجام می‌دهد؟", "input": "", "output": "Downloads a file by file_id.\n\nArgs:\n file_id (str): Unique identifier of the file.\n save_as (Optional[str]): File path to save. Ignored if as_bytes=True.\n progress (Optional[Callable[[int, int], None]]): Optional progress callback.\n chunk_size (int): Download chunk size in bytes.\n as_bytes (bool): If True, returns the content as bytes instead of saving.\n\nReturns:\n str: Path to saved file (if as_bytes=False)\n bytes: Content of the file (if as_bytes=True)" }, { "instruction": "متد decode_auth در فایل rubpy/crypto/crypto.py چه کاری انجام می‌دهد؟", "input": "", "output": "Decode an auth string by applying character substitutions.\n\nArgs:\n auth (str): The input auth string.\n\nReturns:\n str: The decoded auth string." }, { "instruction": "متد passphrase در فایل rubpy/crypto/crypto.py چه کاری انجام می‌دهد؟", "input": "", "output": "Generate a passphrase from an auth string.\n\nArgs:\n auth (str): The input auth string.\n\nReturns:\n str: The generated passphrase." }, { "instruction": "متد secret در فایل rubpy/crypto/crypto.py چه کاری انجام می‌دهد؟", "input": "", "output": "Generate a random secret of the given length.\n\nArgs:\n length (int): Length of the secret.\n\nReturns:\n str: The generated secret." }, { "instruction": "متد decrypt در فایل rubpy/crypto/crypto.py چه کاری انجام می‌دهد؟", "input": "", "output": "Decrypt data using AES encryption.\n\nArgs:\n data (str): The encrypted data.\n key (str): The encryption key.\n\nReturns:\n dict: The decrypted data as a dictionary." }, { "instruction": "متد encrypt در فایل rubpy/crypto/crypto.py چه کاری انجام می‌دهد؟", "input": "", "output": "Encrypt data using AES encryption.\n\nArgs:\n data (str or dict): The data to be encrypted.\n key (str): The encryption key.\n\nReturns:\n str: The encrypted data as a string." }, { "instruction": "متد sign در فایل rubpy/crypto/crypto.py چه کاری انجام می‌دهد؟", "input": "", "output": "Sign data using an RSA private key.\n\nArgs:\n private_key (str): The RSA private key.\n data (str): The data to be signed.\n\nReturns:\n str: The base64-encoded signature." }, { "instruction": "متد create_keys در فایل rubpy/crypto/crypto.py چه کاری انجام می‌دهد؟", "input": "", "output": "Generate RSA public and private keys.\n\nReturns:\n tuple: A tuple containing the base64-encoded public key and the private key." }, { "instruction": "متد decrypt_RSA_OAEP در فایل rubpy/crypto/crypto.py چه کاری انجام می‌دهد؟", "input": "", "output": "Decrypt data using RSA OAEP encryption.\n\nArgs:\n private_key (str): The RSA private key.\n data (str): The encrypted data.\n\nReturns:\n str: The decrypted data as a string." }, { "instruction": "کلاس ChatType در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Chat type enumeration used in :obj:`~pyrogram.types.Chat`." }, { "instruction": "کلاس MessageMediaType در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Message media type" }, { "instruction": "کلاس PollType در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Poll type enumeration" }, { "instruction": "متد builder در فایل rubpy/methods/advanced/build.py چه کاری انجام می‌دهد؟", "input": "", "output": "Build and send a request to the Rubika API.\n\nArgs:\n - name (str): The API method name.\n - tmp_session (bool, optional): Whether to use a temporary session. Defaults to False.\n - encrypt (bool, optional): Whether to encrypt the data. Defaults to True.\n - dict (bool, optional): Return the result as a dictionary. Defaults to False.\n - input (dict, optional): The input data for the API method. Defaults to None.\n\nReturns:\n - Union[rubpy.types.Update, dict]: Result of the API call." }, { "instruction": "متد add_channel در فایل rubpy/methods/channels/add_channel.py چه کاری انجام می‌دهد؟", "input": "", "output": "Create a new channel and add members if specified.\n\nParameters:\n- title (str): The title of the new channel.\n- description (str, optional): The description of the new channel.\n- member_guids (Union[str, list], optional): The unique identifier(s) of the member(s) to be added to the new channel.\n\nReturns:\nrubpy.types.Update: The result of the API call." }, { "instruction": "متد add_channel_members در فایل rubpy/methods/channels/add_channel_members.py چه کاری انجام می‌دهد؟", "input": "", "output": "Add members to a channel.\n\nParameters:\n- channel_guid (str): The unique identifier of the channel.\n- member_guids (Union[str, list]): The unique identifier(s) of the member(s) to be added.\n\nReturns:\nrubpy.types.Update: The result of the API call." }, { "instruction": "متد ban_channel_member در فایل rubpy/methods/channels/ban_channel_member.py چه کاری انجام می‌دهد؟", "input": "", "output": "Ban or unban a member in a channel.\n\nParameters:\n- channel_guid (str): The unique identifier of the channel.\n- member_guid (str): The unique identifier of the member to be banned or unbanned.\n- action (str, optional): The action to perform, can be 'Set' (ban) or 'Unset' (unban). Defaults to 'Set'.\n\nReturns:\nrubpy.types.Update: The result of the API call." }, { "instruction": "متد channel_preview_by_join_link در فایل rubpy/methods/channels/channel_preview_by_join_link.py چه کاری انجام می‌دهد؟", "input": "", "output": "Get a preview of a channel using its join link.\n\nParameters:\n- link (str): The join link or a link containing the channel's hash.\n\nReturns:\nrubpy.types.Update: The result of the API call." }, { "instruction": "متد check_channel_username در فایل rubpy/methods/channels/check_channel_username.py چه کاری انجام می‌دهد؟", "input": "", "output": "Check the availability of a username for a channel.\n\nParameters:\n- username (str): The username to check.\n\nReturns:\nrubpy.types.Update: The result of the API call." }, { "instruction": "متد create_channel_voice_chat در فایل rubpy/methods/channels/create_channel_voice_chat.py چه کاری انجام می‌دهد؟", "input": "", "output": "Create a voice chat for a channel.\n\nParameters:\n- channel_guid (str): The GUID of the channel.\n\nReturns:\nrubpy.types.Update: The result of the API call." }, { "instruction": "متد discard_channel_voice_chat در فایل rubpy/methods/channels/discard_channel_voice_chat.py چه کاری انجام می‌دهد؟", "input": "", "output": "Discard a voice chat in a channel.\n\nParameters:\n- channel_guid (str): The GUID of the channel.\n- voice_chat_id (str): The ID of the voice chat to discard.\n\nReturns:\nrubpy.types.Update: The result of the API call." }, { "instruction": "متد edit_channel_info در فایل rubpy/methods/channels/edit_channel_info.py چه کاری انجام می‌دهد؟", "input": "", "output": "Edit information of a channel.\n\nParameters:\n- channel_guid (str): The GUID of the channel.\n- title (str, optional): The new title of the channel.\n- description (str, optional): The new description of the channel.\n- channel_type (str, optional): The new type of the channel.\n- sign_messages (str, optional): Whether to sign messages in the channel.\n- chat_reaction_setting (dict, optional): The new chat reaction setting.\n- chat_history_for_new_members (str, optional): The chat history visibility for new members.\n\nReturns:\nrubpy.types.Update: The result of the API call." }, { "instruction": "متد get_banned_group_members در فایل rubpy/methods/channels/get_banned_group_members.py چه کاری انجام می‌دهد؟", "input": "", "output": "Get a list of banned members in a group.\n\nParameters:\n- group_guid (str): The GUID of the group.\n- start_id (str, optional): The ID to start retrieving banned members from.\n\nReturns:\nrubpy.types.Update: The result of the API call." }, { "instruction": "متد get_channel_admin_access_list در فایل rubpy/methods/channels/get_channel_admin_access_list.py چه کاری انجام می‌دهد؟", "input": "", "output": "Get the admin access list for a specific member in a channel.\n\nParameters:\n- channel_guid (str): The GUID of the channel.\n- member_guid (str): The GUID of the member.\n\nReturns:\nrubpy.types.Update: The result of the API call." }, { "instruction": "متد get_channel_admin_members در فایل rubpy/methods/channels/get_channel_admin_members.py چه کاری انجام می‌دهد؟", "input": "", "output": "Get the list of admin members in a channel.\n\nParameters:\n- channel_guid (str): The GUID of the channel.\n- start_id (str, optional): The ID to start fetching from. Defaults to None.\n\nReturns:\nrubpy.types.Update: The result of the API call." }, { "instruction": "متد get_channel_all_members در فایل rubpy/methods/channels/get_channel_all_members.py چه کاری انجام می‌دهد؟", "input": "", "output": "Get all members in a channel.\n\nParameters:\n- channel_guid (str): The GUID of the channel.\n- search_text (str, optional): Text to search for in members. Defaults to None.\n- start_id (str, optional): The ID to start fetching from. Defaults to None.\n\nReturns:\nrubpy.types.InChatMembers: The result of the API call." }, { "instruction": "متد get_channel_info در فایل rubpy/methods/channels/get_channel_info.py چه کاری انجام می‌دهد؟", "input": "", "output": "Get information about a channel.\n\nParameters:\n- channel_guid (str): The GUID of the channel.\n\nReturns:\nrubpy.types.Update: The result of the API call." }, { "instruction": "متد get_channel_link در فایل rubpy/methods/channels/get_channel_link.py چه کاری انجام می‌دهد؟", "input": "", "output": "Get the join link of a channel.\n\nParameters:\n- channel_guid (str): The GUID of the channel.\n\nReturns:\nrubpy.types.Update: The result of the API call." }, { "instruction": "متد join_channel_action در فایل rubpy/methods/channels/join_channel_action.py چه کاری انجام می‌دهد؟", "input": "", "output": "Perform an action on a channel, such as joining, removing, or archiving.\n\nParameters:\n- channel_guid (str): The GUID of the channel.\n- action (Literal['Join', 'Remove', 'Archive']): The action to perform on the channel.\n\nReturns:\nrubpy.types.Update: The result of the API call." }, { "instruction": "متد join_channel_by_link در فایل rubpy/methods/channels/join_channel_by_link.py چه کاری انجام می‌دهد؟", "input": "", "output": "Join a channel using its invite link.\n\nParameters:\n- link (str): The invite link or hash of the channel.\n\nReturns:\nrubpy.types.Update: The result of the API call." }, { "instruction": "متد remove_channel در فایل rubpy/methods/channels/remove_channel.py چه کاری انجام می‌دهد؟", "input": "", "output": "Remove a channel.\n\nParameters:\n- channel_guid (str): The unique identifier of the channel.\n\nReturns:\nrubpy.types.Update: The result of the API call." }, { "instruction": "متد seen_channel_messages در فایل rubpy/methods/channels/seen_channel_messages.py چه کاری انجام می‌دهد؟", "input": "", "output": "Mark channel messages as seen within a specific range.\n\nParameters:\n- channel_guid (str): The unique identifier of the channel.\n- min_id (Union[int, str]): The minimum message ID to mark as seen.\n- max_id (Union[int, str]): The maximum message ID to mark as seen.\n\nReturns:\nrubpy.types.Update: The result of the API call." }, { "instruction": "متد set_channel_link در فایل rubpy/methods/channels/set_channel_link.py چه کاری انجام می‌دهد؟", "input": "", "output": "Set a custom link for the channel.\n\nParameters:\n- channel_guid (str): The unique identifier of the channel.\n\nReturns:\nrubpy.types.Update: The result of the API call." }, { "instruction": "متد set_channel_voice_chat_setting در فایل rubpy/methods/channels/set_channel_voice_chat_setting.py چه کاری انجام می‌دهد؟", "input": "", "output": "Set the title for a voice chat in a channel.\n\nParameters:\n- channel_guid (str): The unique identifier of the channel.\n- voice_chat_id (str): The unique identifier of the voice chat.\n- title (str, optional): The new title for the voice chat.\n\nReturns:\nrubpy.types.Update: The result of the API call." }, { "instruction": "متد update_channel_username در فایل rubpy/methods/channels/update_channel_username.py چه کاری انجام می‌دهد؟", "input": "", "output": "Update the username of a channel.\n\nParameters:\n- channel_guid (str): The unique identifier of the channel.\n- username (str): The new username for the channel.\n\nReturns:\nrubpy.types.Update: The result of the API call." }, { "instruction": "متد delete_avatar در فایل rubpy/methods/chats/delete_avatar.py چه کاری انجام می‌دهد؟", "input": "", "output": "Delete an avatar.\n\nParameters:\n- object_guid (str): The unique identifier of the object (e.g., user, chat) that owns the avatar.\n- avatar_id (str): The identifier of the avatar to be deleted.\n\nReturns:\nrubpy.types.Update: The result of the API call." }, { "instruction": "متد delete_chat_history در فایل rubpy/methods/chats/delete_chat_history.py چه کاری انجام می‌دهد؟", "input": "", "output": "Delete chat history up to a certain message.\n\nParameters:\n- object_guid (str): The unique identifier of the object (e.g., user, chat) for which chat history will be deleted.\n- last_message_id (Union[str, int]): The identifier of the last message to keep in the chat history.\n\nReturns:\nrubpy.types.Update: The result of the API call." }, { "instruction": "متد get_abs_objects در فایل rubpy/methods/chats/get_abs_objects.py چه کاری انجام می‌دهد؟", "input": "", "output": "Get absolute objects based on their unique identifiers.\n\nParameters:\n- object_guids (Union[str, list]): The unique identifiers of the objects to retrieve.\n\nReturns:\nrubpy.types.Update: The result of the API call." }, { "instruction": "متد get_avatars در فایل rubpy/methods/chats/get_avatars.py چه کاری انجام می‌دهد؟", "input": "", "output": "Get avatars of a specific object.\n\nParameters:\n- object_guid (str): The unique identifier of the object to retrieve avatars for.\n\nReturns:\nrubpy.types.Update: The result of the API call." }, { "instruction": "متد get_chats در فایل rubpy/methods/chats/get_chats.py چه کاری انجام می‌دهد؟", "input": "", "output": "Get a list of chats.\n\nParameters:\n- start_id (Optional[str]): The ID to start from. If not provided, it starts from the\n beginning.\n\nReturns:\nrubpy.types.Update: The result of the API call, representing a list of chats." }, { "instruction": "متد get_chats_updates در فایل rubpy/methods/chats/get_chats_updates.py چه کاری انجام می‌دهد؟", "input": "", "output": "Get updates for chats.\n\nParameters:\n- state (Optional[Union[str, int]]): State parameter for syncing updates. If not provided,\n it uses the current time minus 150 seconds.\n\nReturns:\nrubpy.types.Update: The result of the API call." }, { "instruction": "متد get_link_from_app_url در فایل rubpy/methods/chats/get_link_from_app_url.py چه کاری انجام می‌دهد؟", "input": "", "output": "Retrieves a link from an application URL.\n\nArgs:\n app_url (str): The application URL.\n\nReturns:\n rubpy.types.Update: The link data." }, { "instruction": "متد search_chat_messages در فایل rubpy/methods/chats/search_chat_messages.py چه کاری انجام می‌دهد؟", "input": "", "output": "Searches for chat messages based on the specified criteria.\n\nArgs:\n object_guid (str): The GUID of the chat or channel.\n search_text (str): The text to search for in messages.\n type (str, optional): The type of search, can be 'Text' or 'Hashtag'. Defaults to 'Text'.\n\nReturns:\n rubpy.types.Update: The search results.\n\nRaises:\n ValueError: If the `type` argument is not valid.\n rubpy.exceptions.APIError: If the API request fails." }, { "instruction": "متد seen_chats در فایل rubpy/methods/chats/seen_chats.py چه کاری انجام می‌دهد؟", "input": "", "output": "Marks multiple chats as seen.\n\nArgs:\n seen_list (dict): A dictionary containing chat GUIDs and their last seen message IDs.\n\nReturns:\n rubpy.types.Update: The result of the operation." }, { "instruction": "متد send_chat_activity در فایل rubpy/methods/chats/send_chat_activity.py چه کاری انجام می‌دهد؟", "input": "", "output": "Sends a chat activity, such as typing, uploading, or recording.\n\nArgs:\n object_guid (str): The GUID of the chat.\n activity (str, optional): The type of activity. Defaults to 'Typing'.\n\nReturns:\n rubpy.types.Update: The result of the operation.\n\nRaises:\n ValueError: If the `activity` argument is not one of `[\"Typing\", \"Uploading\", \"Recording\"]`." }, { "instruction": "متد set_action_chat در فایل rubpy/methods/chats/set_action_chat.py چه کاری انجام می‌دهد؟", "input": "", "output": "Set the action for a chat, such as muting or unmuting.\n\nArgs:\n object_guid (str): The GUID of the chat.\n action (str, optional): The action to be set. Defaults to 'Mute'.\n\nReturns:\n rubpy.types.Update: The result of the operation.\n\nRaises:\n ValueError: If the `action` argument is not one of `[\"Mute\", \"Unmute\"]`." }, { "instruction": "متد upload_avatar در فایل rubpy/methods/chats/upload_avatar.py چه کاری انجام می‌دهد؟", "input": "", "output": "Uploads an avatar image for a specified object (user, group, or chat).\n\nArgs:\n object_guid (str): The GUID of the object for which the avatar is being uploaded.\n image (Union[Path, bytes]): The image file or bytes to be used as the avatar.\n thumbnail_file_id (Optional[str]): The file ID of the thumbnail image.\n *args, **kwargs: Additional arguments to be passed to the `upload` method.\n\nReturns:\n rubpy.types.Update: The result of the avatar upload operation.\n\nRaises:\n Any exceptions that might occur during the avatar upload process.\n\nNote:\n - If `object_guid` is 'me', 'cloud', or 'self', it will be replaced with the client's GUID.\n - If `image` is a string (path to a file), the file name is extracted from the path.\n Otherwise, a default file name ('rubpy.jpg') is used.\n - The `upload` method is used internally to handle the file upload process." }, { "instruction": "متد add_address_book در فایل rubpy/methods/contacts/add_address_book.py چه کاری انجام می‌دهد؟", "input": "", "output": "Adds a contact to the client's address book.\n\nArgs:\n phone (str): The phone number of the contact to be added.\n first_name (str): The first name of the contact.\n last_name (str, optional): The last name of the contact. Defaults to an empty string.\n\nReturns:\n rubpy.types.Update: The result of the address book addition operation.\n\nRaises:\n Any exceptions that might occur during the address book addition process.\n\nNote:\n - The `phone` parameter should be a valid phone number.\n - The `first_name` and `last_name` parameters represent the name of the contact.\n If the contact has no last name, `last_name` can be an empty string." }, { "instruction": "متد delete_contact در فایل rubpy/methods/contacts/delete_contact.py چه کاری انجام می‌دهد؟", "input": "", "output": "Deletes a contact from the client's address book.\n\nArgs:\n user_guid (str): The GUID (Globally Unique Identifier) of the contact to be deleted.\n\nReturns:\n rubpy.types.Update: The result of the contact deletion operation.\n\nRaises:\n Any exceptions that might occur during the contact deletion process.\n\nNote:\n - The `user_guid` parameter should be the GUID of the contact to be deleted." }, { "instruction": "متد get_contacts در فایل rubpy/methods/contacts/get_contacts.py چه کاری انجام می‌دهد؟", "input": "", "output": "Get a list of contacts.\n\nArgs:\n self (\"rubpy.Client\"): The rubpy client.\n start_id (Optional[Union[str, int]], optional): Start ID for pagination. Defaults to None.\n\nReturns:\n rubpy.types.Update: The result of the API call." }, { "instruction": "متد get_contacts_updates در فایل rubpy/methods/contacts/get_contacts_updates.py چه کاری انجام می‌دهد؟", "input": "", "output": "Get updates related to contacts.\n\nArgs:\n self (rubpy.Client): The rubpy client.\n state (Optional[Union[str, int]], optional):\n The state parameter to filter updates. Defaults to `round(time()) - 150`.\n\nReturns:\n rubpy.types.Update: The update related to contacts." }, { "instruction": "متد MetaHandler در فایل rubpy/methods/decorators/on_chat_updates.py چه کاری انجام می‌دهد؟", "input": "", "output": "Decorator to register a function as a handler for chat updates.\n\nArgs:\n func: The function to be registered as a handler.\n\nReturns:\n func: The original function." }, { "instruction": "متد MetaHandler در فایل rubpy/methods/decorators/on_message_updates.py چه کاری انجام می‌دهد؟", "input": "", "output": "Decorator to register a function as a handler for message updates.\n\nArgs:\n func: The function to be registered as a handler.\n\nReturns:\n func: The original function." }, { "instruction": "متد MetaHandler در فایل rubpy/methods/decorators/on_remove_notifications.py چه کاری انجام می‌دهد؟", "input": "", "output": "Decorator to register a function as a handler for remove notifications.\n\nArgs:\n func: The function to be registered as a handler.\n\nReturns:\n func: The original function." }, { "instruction": "متد MetaHandler در فایل rubpy/methods/decorators/on_show_activities.py چه کاری انجام می‌دهد؟", "input": "", "output": "Decorator to register a function as a handler for show activities.\n\nArgs:\n func: The function to be registered as a handler.\n\nReturns:\n func: The original function." }, { "instruction": "متد MetaHandler در فایل rubpy/methods/decorators/on_show_notifications.py چه کاری انجام می‌دهد؟", "input": "", "output": "Decorator to register a function as a handler for show notifications.\n\nArgs:\n func: The function to be registered as a handler.\n\nReturns:\n func: The original function." }, { "instruction": "متد action_on_join_request در فایل rubpy/methods/extras/action_on_join_request.py چه کاری انجام می‌دهد؟", "input": "", "output": "انجام عملیات بر روی درخواست عضویت (تأیید یا رد).\n\nArgs:\n object_guid (str): شناسه گروه یا کانال.\n user_guid (str): شناسه کاربری درخواست‌دهنده.\n action (Literal['Accept', 'Reject']): عملیات مورد نظر (پیش‌فرض 'Accept').\n\nReturns:\n dict: پاسخ API پس از انجام عملیات.\n\nRaises:\n ValueError: اگر action غیرمجاز باشد." }, { "instruction": "متد ban_member در فایل rubpy/methods/extras/ban_member.py چه کاری انجام می‌دهد؟", "input": "", "output": "Ban a member from a group or channel.\n\nArgs:\n object_guid (str): The GUID of the group or channel.\n member_guid (str): The GUID of the member to be banned.\n\nReturns:\n rubpy.types.Update: The update after banning the member." }, { "instruction": "متد create_join_link در فایل rubpy/methods/extras/create_join_link.py چه کاری انجام می‌دهد؟", "input": "", "output": "ساخت لینک دعوت برای گروه یا کانال.\n\nArgs:\n object_guid (str): شناسه گروه یا کانال.\n expire_time (Optional[int]): زمان انقضا لینک به ثانیه (اختیاری).\n request_needed (bool): آیا پذیرش درخواست عضویت دستی باشد یا خیر.\n title (Optional[str]): عنوان لینک (اختیاری).\n usage_limit (int): محدودیت تعداد استفاده از لینک.\n\nReturns:\n dict: پاسخ API شامل لینک ایجاد شده.\n\nRaises:\n ValueError: اگر مقدار `request_needed` بولی نباشد." }, { "instruction": "متد get_info در فایل rubpy/methods/extras/get_info.py چه کاری انجام می‌دهد؟", "input": "", "output": "Get information about a user, group, or channel.\n\nArgs:\n object_guid (str, optional): The GUID of the object (user, group, or channel).\n username (str, optional): The username of the object.\n\nReturns:\n rubpy.types.Update: The update containing information about the object." }, { "instruction": "متد get_join_links در فایل rubpy/methods/extras/get_join_links.py چه کاری انجام می‌دهد؟", "input": "", "output": "دریافت لینک‌های پیوستن به یک گروه/کانال خاص بر اساس object_guid.\n\nArgs:\n object_guid (str): شناسه گروه یا کانال\n\nReturns:\n dict: پاسخ API شامل لینک‌های پیوستن" }, { "instruction": "متد get_join_requests در فایل rubpy/methods/extras/get_join_requests.py چه کاری انجام می‌دهد؟", "input": "", "output": "دریافت درخواست‌های عضویت در گروه یا کانال مشخص‌شده.\n\nArgs:\n object_guid (str): شناسه‌ی گروه یا کانال\n\nReturns:\n dict: پاسخ API شامل درخواست‌های عضویت" }, { "instruction": "متد get_object_by_username در فایل rubpy/methods/extras/get_object_by_username.py چه کاری انجام می‌دهد؟", "input": "", "output": "Get an object (user, group, or channel) by its username.\n\nArgs:\n username (str): The username of the object.\n\nReturns:\n rubpy.types.Update: The update containing information about the object." }, { "instruction": "متد get_profile_link_items در فایل rubpy/methods/extras/get_profile_link_items.py چه کاری انجام می‌دهد؟", "input": "", "output": "Get profile link items for a given object.\n\nArgs:\n object_guid (str): The GUID of the object.\n\nReturns:\n rubpy.types.Update: The update containing information about profile link items." }, { "instruction": "متد get_related_objects در فایل rubpy/methods/extras/get_related_objects.py چه کاری انجام می‌دهد؟", "input": "", "output": "Get related objects for a given object.\n\nArgs:\n object_guid (str): The GUID of the object.\n\nReturns:\n rubpy.types.Update: The update containing information about related objects." }, { "instruction": "متد get_transcription در فایل rubpy/methods/extras/get_transcription.py چه کاری انجام می‌دهد؟", "input": "", "output": "Get transcription for a specific message.\n\nArgs:\n message_id (Union[str, int]): The ID of the message.\n transcription_id (str): The ID of the transcription.\n\nReturns:\n rubpy.types.Update: The update containing the requested transcription." }, { "instruction": "متد join_chat در فایل rubpy/methods/extras/join.py چه کاری انجام می‌دهد؟", "input": "", "output": "Join a chat using its identifier or link.\n\nArgs:\n chat (str): The identifier or link of the chat.\n\nReturns:\n rubpy.types.Update: The update containing information about the joined chat." }, { "instruction": "متد leave_chat در فایل rubpy/methods/extras/leave_chat.py چه کاری انجام می‌دهد؟", "input": "", "output": "Leave a chat (channel or group).\n\nArgs:\n object_guid (str): The identifier of the chat (channel or group).\n\nReturns:\n rubpy.types.Update: The update containing information about leaving the chat." }, { "instruction": "متد report_object در فایل rubpy/methods/extras/report_object.py چه کاری انجام می‌دهد؟", "input": "", "output": "Report an object (user, channel, group, etc.) for a specific reason.\n\nArgs:\n object_guid (str): The identifier of the object to be reported.\n report_type (rubpy.enums.ReportType): The type of report.\n description (str, optional): Additional description for the report.\n report_type_object (str, optional): The type of object being reported.\n\nReturns:\n rubpy.types.Update: The update containing information about the report." }, { "instruction": "متد search_global_objects در فایل rubpy/methods/extras/search_global_objects.py چه کاری انجام می‌دهد؟", "input": "", "output": "Search for global objects (users, channels, etc.) based on the given search text.\n\nArgs:\n search_text (str): The text to search for.\n\nReturns:\n rubpy.types.Update: The update containing search results." }, { "instruction": "متد transcribe_voice در فایل rubpy/methods/extras/transcribe_voice.py چه کاری انجام می‌دهد؟", "input": "", "output": "Transcribes voice messages.\n\nParameters:\n - object_guid (str): The GUID of the object (chat, channel, or group) containing the voice message.\n - message_id (str): The ID of the voice message.\n\nReturns:\n rubpy.types.Update: The transcription result." }, { "instruction": "متد user_is_admin در فایل rubpy/methods/extras/user_is_admin.py چه کاری انجام می‌دهد؟", "input": "", "output": "Checks if a user is an admin in a group or channel.\n\nArgs:\n object_guid (str): The GUID of the group or channel.\n user_guid (str): The GUID of the user.\n\nReturns:\n bool: True if the user is an admin, False otherwise." }, { "instruction": "متد add_to_my_gif_set در فایل rubpy/methods/gif/add_to_my_gif_set.py چه کاری انجام می‌دهد؟", "input": "", "output": "Adds a GIF message to the user's personal GIF set.\n\nArgs:\n object_guid (str): The GUID of the chat or channel.\n message_id (str): The ID of the GIF message." }, { "instruction": "متد get_my_gif_set در فایل rubpy/methods/gif/get_my_gif_set.py چه کاری انجام می‌دهد؟", "input": "", "output": "Gets the user's personal GIF set.\n\nReturns:\n rubpy.types.Update: Information about the user's GIF set." }, { "instruction": "متد remove_from_my_gif_set در فایل rubpy/methods/gif/remove_from_my_gif_set.py چه کاری انجام می‌دهد؟", "input": "", "output": "Removes a GIF from the user's personal GIF set.\n\nArgs:\n file_id (str): The file ID of the GIF to be removed." }, { "instruction": "متد add_group در فایل rubpy/methods/groups/add_group.py چه کاری انجام می‌دهد؟", "input": "", "output": "Add a new group.\n\nArgs:\n- title (str): The title of the group.\n- member_guids (Union[str, List[str]]): A single member GUID or a list of member GUIDs to be added to the group.\n- description (Optional[str]): Description of the group (optional).\n\nReturns:\n- rubpy.types.Update: The result of the API call." }, { "instruction": "متد add_group_members در فایل rubpy/methods/groups/add_group_members.py چه کاری انجام می‌دهد؟", "input": "", "output": "Adds one or more members to a group.\n\nArgs:\n group_guid (str): The GUID of the group.\n member_guids (Union[str, list]): A single member GUID or a list of member GUIDs to be added.\n\nReturns:\n rubpy.types.Update: An update object indicating the result of the operation." }, { "instruction": "متد ban_group_member در فایل rubpy/methods/groups/ban_group_member.py چه کاری انجام می‌دهد؟", "input": "", "output": "Ban or unban a member from a group.\n\nArgs:\n- group_guid (str): The GUID of the group.\n- member_guid (str): The GUID of the member to be banned or unbanned.\n- action (str): The action to perform. Should be either 'Set' (ban) or 'Unset' (unban).\n\nReturns:\n- rubpy.types.Update: The result of the API call.\n\nRaises:\n- ValueError: If the `action` argument is not 'Set' or 'Unset'." }, { "instruction": "متد create_group_voice_chat در فایل rubpy/methods/groups/create_group_voice_chat.py چه کاری انجام می‌دهد؟", "input": "", "output": "Create a voice chat in a group.\n\nArgs:\n- group_guid (str): The GUID of the group.\n\nReturns:\n- rubpy.types.Update: The result of the API call." }, { "instruction": "متد delete_no_access_group_chat در فایل rubpy/methods/groups/delete_no_access_group_chat.py چه کاری انجام می‌دهد؟", "input": "", "output": "Delete a group chat that has no access.\n\nArgs:\n- group_guid (str): The GUID of the group.\n\nReturns:\n- rubpy.types.Update: The result of the API call." }, { "instruction": "متد edit_group_info در فایل rubpy/methods/groups/edit_group_info.py چه کاری انجام می‌دهد؟", "input": "", "output": "Edit the information of a group.\n\nArgs:\n- group_guid (str): The GUID of the group.\n- title (Optional[str]): The new title for the group.\n- description (Optional[str]): The new description for the group.\n- slow_mode (Optional[str]): The new slow mode setting for the group.\n- event_messages (Optional[bool]): Enable or disable event messages for the group.\n- chat_reaction_setting (Optional[Dict[str, Union[str, int]]]): The new chat reaction setting.\n- chat_history_for_new_members (Optional[str]): The new chat history setting for new members.\n\nReturns:\n- rubpy.types.Update: The result of the API call." }, { "instruction": "متد get_banned_group_members در فایل rubpy/methods/groups/get_banned_group_members.py چه کاری انجام می‌دهد؟", "input": "", "output": "Get the list of banned members in a group.\n\nArgs:\n- group_guid (str): The GUID of the group.\n- start_id (Optional[str]): The starting ID for fetching results.\n\nReturns:\n- rubpy.types.Update: The result of the API call." }, { "instruction": "متد get_group_admin_access_list در فایل rubpy/methods/groups/get_group_admin_access_list.py چه کاری انجام می‌دهد؟", "input": "", "output": "Get the admin access list for a member in a group.\n\nArgs:\n- group_guid (str): The GUID of the group.\n- member_guid (str): The GUID of the member for whom admin access is being checked.\n\nReturns:\n- rubpy.types.Update: The result of the API call." }, { "instruction": "متد get_group_admin_members در فایل rubpy/methods/groups/get_group_admin_members.py چه کاری انجام می‌دهد؟", "input": "", "output": "Get the list of admin members in a group.\n\nArgs:\n- group_guid (str): The GUID of the group.\n- start_id (str, optional): The starting ID for pagination. Defaults to None.\n\nReturns:\n- rubpy.types.Update: The result of the API call." }, { "instruction": "متد get_group_all_members در فایل rubpy/methods/groups/get_group_all_members.py چه کاری انجام می‌دهد؟", "input": "", "output": "Get all members of a group.\n\nArgs:\n- group_guid (str): The GUID of the group.\n- search_text (str, optional): Search text for filtering members. Defaults to None.\n- start_id (str, optional): The starting ID for pagination. Defaults to None.\n\nReturns:\n- InChatMembers: Object containing information about the group members." }, { "instruction": "متد get_group_default_access در فایل rubpy/methods/groups/get_group_default_access.py چه کاری انجام می‌دهد؟", "input": "", "output": "Get the default access settings for a group.\n\nArgs:\n- group_guid (str): The GUID of the group.\n\nReturns:\n- rubpy.types.Update: Update object containing information about the default access settings." }, { "instruction": "متد get_group_info در فایل rubpy/methods/groups/get_group_info.py چه کاری انجام می‌دهد؟", "input": "", "output": "Get information about a group.\n\nArgs:\n- group_guid (str): The GUID of the group.\n\nReturns:\n- rubpy.types.Update: Update object containing information about the group." }, { "instruction": "متد get_group_link در فایل rubpy/methods/groups/get_group_link.py چه کاری انجام می‌دهد؟", "input": "", "output": "Get the link associated with a group.\n\nArgs:\n- group_guid (str): The GUID of the group.\n\nReturns:\n- rubpy.types.Update: Update object containing the group link." }, { "instruction": "متد get_group_mention_list در فایل rubpy/methods/groups/get_group_mention_list.py چه کاری انجام می‌دهد؟", "input": "", "output": "Get the mention list for a group.\n\nArgs:\n- group_guid (str): The GUID of the group.\n- search_mention (str, optional): Search text for mentions.\n\nReturns:\n- rubpy.types.Update: Update object containing the group mention list." }, { "instruction": "متد get_group_voice_chat_updates در فایل rubpy/methods/groups/get_group_voice_chat_updates.py چه کاری انجام می‌دهد؟", "input": "", "output": "Get voice chat updates for a group.\n\nArgs:\n- group_guid (str): The GUID of the group.\n- voice_chat_id (str): The ID of the voice chat.\n- state (int, optional): The state for updates. If not provided, it defaults to the current time.\n\nReturns:\n- rubpy.types.Update: Update object containing the group voice chat updates." }, { "instruction": "متد group_preview_by_join_link در فایل rubpy/methods/groups/group_preview_by_join_link.py چه کاری انجام می‌دهد؟", "input": "", "output": "Get group preview by join link.\n\nArgs:\n- link (str): The join link or hash link.\n\nReturns:\n- rubpy.types.Update: Update object containing the group preview information." }, { "instruction": "متد join_group در فایل rubpy/methods/groups/join_group.py چه کاری انجام می‌دهد؟", "input": "", "output": "Join a group using the provided link.\n\nArgs:\n- link (str): The group link or hash link.\n\nReturns:\n- rubpy.types.Update: Update object confirming the group join action." }, { "instruction": "متد leave_group در فایل rubpy/methods/groups/leave_group.py چه کاری انجام می‌دهد؟", "input": "", "output": "Leave a group.\n\nArgs:\n- group_guid (str): The GUID of the group.\n\nReturns:\n- rubpy.types.Update: Update object confirming the leave group action." }, { "instruction": "متد leave_group_voice_chat در فایل rubpy/methods/groups/leave_group_voice_chat.py چه کاری انجام می‌دهد؟", "input": "", "output": "Leave a voice chat in a group.\n\nArgs:\n- group_guid (str): The GUID of the group.\n- voice_chat_id (str): The ID of the voice chat.\n\nReturns:\n- rubpy.types.Update: Update object confirming the leave voice chat action." }, { "instruction": "متد remove_group در فایل rubpy/methods/groups/remove_group.py چه کاری انجام می‌دهد؟", "input": "", "output": "Remove a group.\n\nArgs:\n- group_guid (str): The GUID of the group.\n\nReturns:\n- rubpy.types.Update: Update object confirming the removal of the group." }, { "instruction": "متد set_group_admin در فایل rubpy/methods/groups/set_group_admin.py چه کاری انجام می‌دهد؟", "input": "", "output": "Set or unset a member as a group admin.\n\nArgs:\n- group_guid (str): The GUID of the group.\n- member_guid (str): The GUID of the member.\n- action (str): The action to perform, either 'SetAdmin' or 'UnsetAdmin'.\n- access_list (Union[str, list]): List of allowed actions. Default is an empty list.\n\nReturns:\n- rubpy.types.Update: Update object confirming the change in admin status." }, { "instruction": "متد set_group_default_access در فایل rubpy/methods/groups/set_group_default_access.py چه کاری انجام می‌دهد؟", "input": "", "output": "Set default access for a group.\n\nArgs:\n- group_guid (str): The GUID of the group.\n- access_list (Union[str, list]): List of allowed actions.\n\nReturns:\n- rubpy.types.Update: Update object confirming the change in default access." }, { "instruction": "متد set_group_link در فایل rubpy/methods/groups/set_group_link.py چه کاری انجام می‌دهد؟", "input": "", "output": "Set private link for group.\n\nArgs:\n- group_guid (str): The GUID of the group.\n\nReturns:\n- rubpy.types.Update: Update object confirming the change in default access." }, { "instruction": "متد set_group_voice_chat_setting در فایل rubpy/methods/groups/set_group_voice_chat_setting.py چه کاری انجام می‌دهد؟", "input": "", "output": "Set group voice chat setting.\n\nArgs:\n- group_guid (str): The GUID of the group.\n- voice_chat_id (str): The voice chat ID.\n- title (str): Title of voice chat, Defualt is None.\n\nReturns:\n- rubpy.types.Update: Update object confirming the change in default access." }, { "instruction": "کلاس ActionOnMessageReaction در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Provides a method to perform actions on reactions to a specific message.\n\nMethods:\n- action_on_message_reaction: Perform actions on reactions to a specific message.\n\nAttributes:\n- self (rubpy.Client): The rubpy client instance." }, { "instruction": "متد action_on_message_reaction در فایل rubpy/methods/messages/action_on_message_reaction.py چه کاری انجام می‌دهد؟", "input": "", "output": "Perform actions on reactions to a specific message.\n\nParameters:\n- object_guid (str): The GUID of the object associated with the message (e.g., user, group, channel).\n- message_id (str): The ID of the message.\n- reaction_id (int): The ID of the reaction.\n- action (Literal['Add', 'Remove']): The action to perform on the reaction.\n\nReturns:\n- rubpy.types.Update: The updated information after performing the action on the message reaction." }, { "instruction": "کلاس AutoDeleteMessage در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Provides a method to automatically delete a message after a specified time.\n\nMethods:\n- auto_delete_message: Automatically delete a message after a specified time.\n\nAttributes:\n- self (rubpy.Client): The rubpy client instance." }, { "instruction": "متد auto_delete_message در فایل rubpy/methods/messages/auto_delete_message.py چه کاری انجام می‌دهد؟", "input": "", "output": "Automatically delete a message after a specified time.\n\nParameters:\n- object_guid (str): The GUID of the object associated with the message (e.g., user, group, channel).\n- message_id (str): The ID of the message to be deleted.\n- time (Union[float, int]): The time delay (in seconds) before deleting the message.\n\nReturns:\n- rubpy.types.Update: The updated information after deleting the message." }, { "instruction": "کلاس CreatePoll در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Provides a method to create a poll message.\n\nMethods:\n- create_poll: Create a poll message with the specified parameters.\n\nAttributes:\n- self (rubpy.Client): The rubpy client instance." }, { "instruction": "متد create_poll در فایل rubpy/methods/messages/create_poll.py چه کاری انجام می‌دهد؟", "input": "", "output": "Create a poll message with the specified parameters.\n\nParameters:\n- object_guid (str): The GUID of the object associated with the poll (e.g., user, group, channel).\n- question (str): The question for the poll.\n- options (list): A list of string values representing the poll options.\n- type (str): The type of the poll, can be 'Regular' or 'Quiz'.\n- is_anonymous (bool): Whether the poll is anonymous or not.\n- allows_multiple_answers (bool): Whether the poll allows multiple answers or not.\n- correct_option_index (Union[int, str]): The index or ID of the correct option for quiz-type polls.\n- explanation (str): An explanation for the correct answer in quiz-type polls.\n- reply_to_message_id (Union[str, int]): The ID of the message to reply to.\n\nReturns:\n- rubpy.types.Update: The updated information after creating the poll." }, { "instruction": "کلاس DeleteMessages در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Provides a method to delete messages.\n\nMethods:\n- delete_messages: Delete specified messages associated with the given object.\n\nAttributes:\n- self (rubpy.Client): The rubpy client instance." }, { "instruction": "متد delete_messages در فایل rubpy/methods/messages/delete_messages.py چه کاری انجام می‌دهد؟", "input": "", "output": "Delete specified messages associated with the given object.\n\nParameters:\n- object_guid (str): The GUID of the object associated with the messages (e.g., user, group, channel).\n- message_ids (Union[str, list]): The ID or list of IDs of the messages to be deleted.\n- type (str): The type of deletion, can be 'Global' or 'Local'.\n\nReturns:\n- rubpy.types.Update: The updated information after deleting the messages." }, { "instruction": "کلاس EditMessage در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Provides a method to edit a message.\n\nMethods:\n- edit_message: Edit the specified message associated with the given object.\n\nAttributes:\n- self (rubpy.Client): The rubpy client instance." }, { "instruction": "متد edit_message در فایل rubpy/methods/messages/edit_message.py چه کاری انجام می‌دهد؟", "input": "", "output": "Edit the specified message associated with the given object.\n\nParameters:\n- object_guid (str): The GUID of the object associated with the message (e.g., user, group, channel).\n- message_id (Union[int, str]): The ID of the message to be edited.\n- text (str): The new text content for the message.\n- parse_mode (str): The parse mode for the text, can be 'markdown' or 'html'. Defaults to None.\n\nReturns:\n- rubpy.types.Update: The updated information after editing the message." }, { "instruction": "کلاس ForwardMessages در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Provides a method to forward messages from one object to another.\n\nMethods:\n- forward_messages: Forward specified messages from one object to another.\n\nAttributes:\n- self (rubpy.Client): The rubpy client instance." }, { "instruction": "متد forward_messages در فایل rubpy/methods/messages/forward_messages.py چه کاری انجام می‌دهد؟", "input": "", "output": "Forward specified messages from one object to another.\n\nParameters:\n- from_object_guid (str): The GUID of the source object from which messages are forwarded.\n- to_object_guid (str): The GUID of the destination object to which messages are forwarded.\n- message_ids (Union[str, int, list]): The IDs of the messages to be forwarded. Can be a single ID or a list of IDs.\n\nReturns:\n- rubpy.types.Update: The updated information after forwarding the messages." }, { "instruction": "کلاس GetMessageShareUrl در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Provides a method to get the shareable URL of a specific message.\n\nMethods:\n- get_message_url: Get the shareable URL of a specific message.\n\nAttributes:\n- self (rubpy.Client): The rubpy client instance." }, { "instruction": "متد get_message_url در فایل rubpy/methods/messages/get_message_share_url.py چه کاری انجام می‌دهد؟", "input": "", "output": "Get the shareable URL of a specific message.\n\nParameters:\n- object_guid (str): The GUID of the object to which the message belongs.\n- message_id (str): The ID of the message for which to retrieve the shareable URL.\n\nReturns:\n- rubpy.types.Update: The shareable URL of the specified message." }, { "instruction": "کلاس GetMessagesByID در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Provides a method to retrieve messages by their IDs.\n\nMethods:\n- get_messages_by_id: Retrieve messages by their IDs.\n\nAttributes:\n- self (rubpy.Client): The rubpy client instance." }, { "instruction": "متد get_messages_by_id در فایل rubpy/methods/messages/get_messages_by_id.py چه کاری انجام می‌دهد؟", "input": "", "output": "Retrieve messages by their IDs.\n\nParameters:\n- object_guid (str): The GUID of the object to which the messages belong.\n- message_ids (Union[str, list]): The ID or list of IDs of the messages to retrieve.\n\nReturns:\n- rubpy.types.Update: The retrieved messages identified by their IDs." }, { "instruction": "کلاس GetMessagesInterval در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Provides a method to retrieve messages in an interval around a middle message ID.\n\nMethods:\n- get_messages_interval: Retrieve messages in an interval around a middle message ID.\n\nAttributes:\n- self (rubpy.Client): The rubpy client instance." }, { "instruction": "متد get_messages_interval در فایل rubpy/methods/messages/get_messages_interval.py چه کاری انجام می‌دهد؟", "input": "", "output": "Retrieve messages in an interval around a middle message ID.\n\nParameters:\n- object_guid (str): The GUID of the object to which the messages belong.\n- middle_message_id (Union[int, str]): The middle message ID around which the interval is determined.\n\nReturns:\n- rubpy.types.Update: The retrieved messages in the specified interval." }, { "instruction": "کلاس GetMessagesUpdates در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Provides a method to get message updates for a specific object.\n\nMethods:\n- get_messages_updates: Get message updates for a specific object.\n\nAttributes:\n- self (rubpy.Client): The rubpy client instance." }, { "instruction": "متد get_messages_updates در فایل rubpy/methods/messages/get_messages_updates.py چه کاری انجام می‌دهد؟", "input": "", "output": "Get message updates for a specific object.\n\nParameters:\n- object_guid (str): The GUID of the object for which updates are requested.\n- state (int): The state at which updates are requested. Defaults to a timestamp approximately 150 seconds ago.\n\nReturns:\n- rubpy.types.Update: The message updates for the specified object." }, { "instruction": "کلاس GetPollOptionVoters در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Provides a method to get voters for a specific poll option.\n\nMethods:\n- get_poll_option_voters: Get voters for a specific poll option.\n\nAttributes:\n- self (rubpy.Client): The rubpy client instance." }, { "instruction": "متد get_poll_option_voters در فایل rubpy/methods/messages/get_poll_option_voters.py چه کاری انجام می‌دهد؟", "input": "", "output": "Get voters for a specific poll option.\n\nParameters:\n- poll_id (str): The ID of the poll for which voters are requested.\n- selection_index (Union[str, int]): The index of the poll option for which voters are requested.\n- start_id (Optional[str]): The ID from which to start fetching voters. Defaults to None.\n\nReturns:\n- rubpy.types.Update: The voters for the specified poll option." }, { "instruction": "کلاس GetPollStatus در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Provides a method to get the status of a specific poll.\n\nMethods:\n- get_poll_status: Get the status of a specific poll.\n\nAttributes:\n- self (rubpy.Client): The rubpy client instance." }, { "instruction": "متد get_poll_status در فایل rubpy/methods/messages/get_poll_status.py چه کاری انجام می‌دهد؟", "input": "", "output": "Get the status of a specific poll.\n\nParameters:\n- poll_id (str): The ID of the poll for which the status is requested.\n\nReturns:\n- rubpy.types.Update: The status of the specified poll." }, { "instruction": "کلاس Reaction در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Provides a method to add a reaction to a specific message.\n\nMethods:\n- reaction: Add a reaction to a specific message.\n\nAttributes:\n- self (rubpy.Client): The rubpy client instance." }, { "instruction": "متد reaction در فایل rubpy/methods/messages/reaction.py چه کاری انجام می‌دهد؟", "input": "", "output": "Add a reaction to a specific message.\n\nParameters:\n- object_guid (str): The GUID of the object associated with the message.\n- message_id (str): The ID of the message to which the reaction will be added.\n- reaction_id (int): The ID of the reaction to be added.\n\nReturns:\n- rubpy.types.Update: The update indicating the success of adding the reaction." }, { "instruction": "کلاس RemoveReaction در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Provides a method to remove a reaction from a specific message.\n\nMethods:\n- remove_reaction: Remove a reaction from a specific message.\n\nAttributes:\n- self (rubpy.Client): The rubpy client instance." }, { "instruction": "متد remove_reaction در فایل rubpy/methods/messages/remove_reaction.py چه کاری انجام می‌دهد؟", "input": "", "output": "Remove a reaction from a specific message.\n\nParameters:\n- object_guid (str): The GUID of the object associated with the message.\n- message_id (str): The ID of the message from which the reaction will be removed.\n- reaction_id (int): The ID of the reaction to be removed.\n\nReturns:\n- rubpy.types.Update: The update indicating the success of removing the reaction." }, { "instruction": "کلاس RequestSendFile در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Provides a method to request sending a file.\n\nMethods:\n- request_send_file: Request sending a file.\n\nAttributes:\n- self (rubpy.Client): The rubpy client instance." }, { "instruction": "متد request_send_file در فایل rubpy/methods/messages/request_send_file.py چه کاری انجام می‌دهد؟", "input": "", "output": "Request sending a file.\n\nParameters:\n- file_name (str): The name of the file to be sent.\n- size (Union[str, int, float]): The size of the file to be sent.\n- mime (str, optional): The MIME type of the file. If None, it will be derived from the file name.\n\nReturns:\n- rubpy.types.Update: The update indicating the success of the file sending request." }, { "instruction": "کلاس SendDocument در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Provides a method to send a document.\n\nMethods:\n- send_document: Send a document.\n\nAttributes:\n- self (rubpy.Client): The rubpy client instance." }, { "instruction": "متد send_document در فایل rubpy/methods/messages/send_document.py چه کاری انجام می‌دهد؟", "input": "", "output": "Send a document.\n\nParameters:\n- object_guid (str): The GUID of the recipient.\n- document (Union[Path, bytes]): The document data.\n- caption (Optional[str]): The caption for the document. Defaults to None.\n- reply_to_message_id (Optional[str]): The ID of the message to which this is a reply. Defaults to None.\n- auto_delete (Optional[int]): Auto-delete duration in seconds. Defaults to None.\n\nReturns:\n- rubpy.types.Update: The update indicating the success of the document sending." }, { "instruction": "متد send_gif در فایل rubpy/methods/messages/send_gif.py چه کاری انجام می‌دهد؟", "input": "", "output": "Send a gif.\n\nArgs:\n object_guid (str):\n The GUID of the recipient.\n\n gif (Path, bytes):\n The gif data.\n\n caption (str, optional):\n The caption for the gif. Defaults to None.\n\n reply_to_message_id (str, optional):\n The ID of the message to which this is a reply. Defaults to None.\n\n auto_delete (int, optional):\n Auto-delete duration in seconds. Defaults to None." }, { "instruction": "کلاس SendMessage در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Class to send messages with attachments.\n\nMethods:\n- send_message: Send a message with various optional parameters.\n\nAttributes:\n- self (rubpy.Client): The rubpy client instance." }, { "instruction": "متد send_message در فایل rubpy/methods/messages/send_message.py چه کاری انجام می‌دهد؟", "input": "", "output": "Send a message with optional parameters.\n\nParameters:\n- object_guid (str): The GUID of the recipient.\n- text (Optional[str]): The text of the message. Defaults to None.\n- reply_to_message_id (Optional[str]): The ID of the message to which this is a reply. Defaults to None.\n- file_inline (Optional[Union[Update, Path, bytes]]): The file to be sent inline with the message. Defaults to None.\n- sticker (Optional[Union[Update, dict]]): The sticker to be sent with the message. Defaults to None.\n- type (str): The type of the message, e.g., 'File', 'Music', 'Voice', etc. Defaults to 'File'.\n- is_spoil (bool): Whether the message should be marked as a spoiler. Defaults to False.\n- thumb (bool): Whether to include a thumbnail. Defaults to True.\n- auto_delete (Optional[Union[int, float]]): Auto-delete duration in seconds. Defaults to None.\n- parse_mode (Optional[Union[ParseMode, str]]): The parse mode for the text. Defaults to None.\n- args, kwargs: Additional arguments and keyword arguments.\n\nReturns:\n- rubpy.types.Update: The update indicating the success of the message sending." }, { "instruction": "متد send_music در فایل rubpy/methods/messages/send_music.py چه کاری انجام می‌دهد؟", "input": "", "output": "Send a music.\n\nArgs:\n object_guid (str):\n The GUID of the recipient.\n\n music (Path, bytes):\n The music data.\n\n caption (str, optional):\n The caption for the music. Defaults to None.\n\n reply_to_message_id (str, optional):\n The ID of the message to which this is a reply. Defaults to None.\n\n auto_delete (int, optional):\n Auto-delete duration in seconds. Defaults to None." }, { "instruction": "متد send_photo در فایل rubpy/methods/messages/send_photo.py چه کاری انجام می‌دهد؟", "input": "", "output": "Send a photo.\n\nArgs:\n object_guid (str):\n The GUID of the recipient.\n\n photo (Path, bytes):\n The photo data.\n\n caption (str, optional):\n The caption for the photo. Defaults to None.\n\n reply_to_message_id (str, optional):\n The ID of the message to which this is a reply. Defaults to None.\n\n is_spoil (bool, optional):\n Whether the photo should be marked as a spoiler. Defaults to False.\n\n auto_delete (int, optional):\n Auto-delete duration in seconds. Defaults to None." }, { "instruction": "متد send_sticker در فایل rubpy/methods/messages/send_sticker.py چه کاری انجام می‌دهد؟", "input": "", "output": "Send a sticker.\n\nArgs:\n - object_guid (str):\n The GUID of the recipient.\n\n - emoji_character (str):\n The emoji character associated with the sticker.\n\n - sticker_id (str):\n The ID of the sticker.\n\n - sticker_set_id (str):\n The ID of the sticker set.\n\n - file (dict):\n The file data for the sticker.\n\n - w_h_ratio (str, optional):\n The width-to-height ratio of the sticker. Defaults to '1.0'.\n\n - reply_to_message_id (str, optional):\n The ID of the message to which this is a reply. Defaults to None.\n\n - auto_delete (int, optional):\n Auto-delete duration in seconds. Defaults to None." }, { "instruction": "متد send_video در فایل rubpy/methods/messages/send_video.py چه کاری انجام می‌دهد؟", "input": "", "output": "Send a video.\n\nArgs:\n - object_guid (str):\n The GUID of the recipient.\n\n - video (Union[Path, bytes]):\n The video data.\n\n - caption (str, optional):\n The caption for the video. Defaults to None.\n\n - reply_to_message_id (str, optional):\n The ID of the message to which this is a reply. Defaults to None." }, { "instruction": "متد send_video_message در فایل rubpy/methods/messages/send_video_message.py چه کاری انجام می‌دهد؟", "input": "", "output": "Send a video message.\n\nArgs:\n - object_guid (str):\n The GUID of the recipient.\n\n - video_message (Union[Path, bytes]):\n The video message data.\n\n - caption (str, optional):\n The caption for the video message. Defaults to None.\n\n - reply_to_message_id (str, optional):\n The ID of the message to which this is a reply. Defaults to None.\n\n - auto_delete (int, optional):\n Auto-delete duration in seconds. Defaults to None." }, { "instruction": "متد send_voice در فایل rubpy/methods/messages/send_voice.py چه کاری انجام می‌دهد؟", "input": "", "output": "Send a voice.\n\nArgs:\n object_guid (str):\n The GUID of the recipient.\n\n voice (Union[Path, bytes]):\n The voice data.\n\n caption (str, optional):\n The caption for the voice. Defaults to None.\n\n reply_to_message_id (str, optional):\n The ID of the message to which this is a reply. Defaults to None." }, { "instruction": "متد set_pin_message در فایل rubpy/methods/messages/set_pin_message.py چه کاری انجام می‌دهد؟", "input": "", "output": "Set or unset a pin on a message.\n\nArgs:\n - object_guid (str): The GUID of the recipient.\n - message_id (Union[str, int]): The ID of the message to pin or unpin.\n - action (Literal['Pin', 'Unpin']): The action to perform, either 'Pin' or 'Unpin'.\n\nReturns:\n - rubpy.types.Update: The update indicating the success of the operation." }, { "instruction": "متد set_pin در فایل rubpy/methods/messages/set_pin_message.py چه کاری انجام می‌دهد؟", "input": "", "output": "Set a pin on a message.\n\nArgs:\n - object_guid (str): The GUID of the recipient.\n - message_id (Union[str, int]): The ID of the message to pin.\n\nReturns:\n - rubpy.types.Update: The update indicating the success of setting the pin." }, { "instruction": "متد set_unpin در فایل rubpy/methods/messages/set_pin_message.py چه کاری انجام می‌دهد؟", "input": "", "output": "Unset a pin on a message.\n\nArgs:\n - object_guid (str): The GUID of the recipient.\n - message_id (Union[str, int]): The ID of the message to unpin.\n\nReturns:\n - rubpy.types.Update: The update indicating the success of unsetting the pin." }, { "instruction": "متد vote_poll در فایل rubpy/methods/messages/vote_poll.py چه کاری انجام می‌دهد؟", "input": "", "output": "Vote on a poll option.\n\nArgs:\n poll_id (str): The ID of the poll.\n selection_index (Union[str, int]): The index of the option to vote for.\n\nReturns:\n rubpy.types.Update: The update indicating the success of the vote." }, { "instruction": "کلاس DeleteFolder در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Provides a method to delete a folder.\n\nMethods:\n- delete_folder: Delete a folder.\n\nAttributes:\n- self (rubpy.Client): The rubpy client instance." }, { "instruction": "متد delete_folder در فایل rubpy/methods/settings/delete_folder.py چه کاری انجام می‌دهد؟", "input": "", "output": "Delete a folder.\n\nParameters:\n- folder_id (str): The ID of the folder to be deleted.\n\nReturns:\n- rubpy.types.Update: Result of the delete folder operation." }, { "instruction": "کلاس GetBlockedUsers در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Provides a method to get a list of blocked users.\n\nMethods:\n- get_blocked_users: Get a list of blocked users.\n\nAttributes:\n- self (rubpy.Client): The rubpy client instance." }, { "instruction": "متد get_blocked_users در فایل rubpy/methods/settings/get_blocked_users.py چه کاری انجام می‌دهد؟", "input": "", "output": "Get a list of blocked users.\n\nReturns:\n- rubpy.types.Update: List of blocked users." }, { "instruction": "کلاس GetFolders در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Provides a method to get a list of folders.\n\nMethods:\n- get_folders: Get a list of folders.\n\nAttributes:\n- self (rubpy.Client): The rubpy client instance." }, { "instruction": "متد get_folders در فایل rubpy/methods/settings/get_folders.py چه کاری انجام می‌دهد؟", "input": "", "output": "Get a list of folders.\n\nParameters:\n- last_state (Union[int, str]): The last state to retrieve folders.\n\nReturns:\n- rubpy.types.Update: List of folders." }, { "instruction": "کلاس GetMySessions در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Provides a method to get information about the current user's sessions.\n\nMethods:\n- get_my_sessions: Get information about the current user's sessions.\n\nAttributes:\n- self (rubpy.Client): The rubpy client instance." }, { "instruction": "متد get_my_sessions در فایل rubpy/methods/settings/get_my_sessions.py چه کاری انجام می‌دهد؟", "input": "", "output": "Get information about the current user's sessions.\n\nReturns:\n- rubpy.types.Update: Information about the user's sessions." }, { "instruction": "کلاس GetPrivacySetting در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Provides a method to get the current user's privacy setting.\n\nMethods:\n- get_privacy_setting: Get the current user's privacy setting.\n\nAttributes:\n- self (rubpy.Client): The rubpy client instance." }, { "instruction": "متد get_privacy_setting در فایل rubpy/methods/settings/get_privacy_setting.py چه کاری انجام می‌دهد؟", "input": "", "output": "Get the current user's privacy setting.\n\nReturns:\n- rubpy.types.Update: The current user's privacy setting." }, { "instruction": "کلاس GetSuggestedFolders در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Provides a method to get the suggested folders for the user.\n\nMethods:\n- get_suggested_folders: Get the suggested folders for the user.\n\nAttributes:\n- self (rubpy.Client): The rubpy client instance." }, { "instruction": "متد get_suggested_folders در فایل rubpy/methods/settings/get_suggested_folders.py چه کاری انجام می‌دهد؟", "input": "", "output": "Get the suggested folders for the user.\n\nReturns:\n- rubpy.types.Update: The suggested folders for the user." }, { "instruction": "کلاس GetTwoPasscodeStatus در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Provides a method to get the two-passcode status for the user.\n\nMethods:\n- get_two_passcode_status: Get the two-passcode status for the user.\n\nAttributes:\n- self (rubpy.Client): The rubpy client instance." }, { "instruction": "متد get_two_passcode_status در فایل rubpy/methods/settings/get_two_passcode_status.py چه کاری انجام می‌دهد؟", "input": "", "output": "Get the two-passcode status for the user.\n\nReturns:\n- rubpy.types.Update: The two-passcode status for the user." }, { "instruction": "کلاس SetSetting در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Provides a method to set various privacy settings for the user.\n\nMethods:\n- set_setting: Set various privacy settings for the user.\n\nAttributes:\n- self (rubpy.Client): The rubpy client instance." }, { "instruction": "متد set_setting در فایل rubpy/methods/settings/set_setting.py چه کاری انجام می‌دهد؟", "input": "", "output": "Set various privacy settings for the user.\n\nParameters:\n- show_my_last_online (Optional[str]): Privacy setting for showing last online status.\n- show_my_phone_number (Optional[str]): Privacy setting for showing phone number.\n- show_my_profile_photo (Optional[str]): Privacy setting for showing profile photo.\n- link_forward_message (Optional[str]): Privacy setting for link forwarding messages.\n- can_join_chat_by (Optional[str]): Privacy setting for who can join chats.\n\nReturns:\n- rubpy.types.Update: The updated privacy settings." }, { "instruction": "کلاس SetupTwoStepVerification در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Provides a method to set up two-step verification for the user.\n\nMethods:\n- setup_two_step_verification: Set up two-step verification for the user.\n\nAttributes:\n- self (rubpy.Client): The rubpy client instance." }, { "instruction": "متد setup_two_step_verification در فایل rubpy/methods/settings/setup_two_step_verification.py چه کاری انجام می‌دهد؟", "input": "", "output": "Set up two-step verification for the user.\n\nParameters:\n- password (Union[int, str]): The current user password.\n- hint (str): A hint to help remember the password.\n- recovery_email (str): The recovery email for two-step verification.\n\nReturns:\n- rubpy.types.Update: The updated user information after setting up two-step verification." }, { "instruction": "متد terminate_other_sessions در فایل rubpy/methods/settings/terminate_other_sessions.py چه کاری انجام می‌دهد؟", "input": "", "output": "Terminate other account sessions.\n\nReturns:\n- rubpy.types.Update: The updated user information after terminating the session." }, { "instruction": "کلاس TerminateSession در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Provides a method to terminate a user session.\n\nMethods:\n- terminate_session: Terminate a user session.\n\nAttributes:\n- self (rubpy.Client): The rubpy client instance." }, { "instruction": "متد terminate_session در فایل rubpy/methods/settings/terminate_session.py چه کاری انجام می‌دهد؟", "input": "", "output": "Terminate a user session.\n\nParameters:\n- session_key (str): The session key of the session to be terminated.\n\nReturns:\n- rubpy.types.Update: The updated user information after terminating the session." }, { "instruction": "کلاس UpdateProfile در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Provides a method to update user profile information.\n\nMethods:\n- update_profile: Update user profile information.\n\nAttributes:\n- self (rubpy.Client): The rubpy client instance." }, { "instruction": "متد update_profile در فایل rubpy/methods/settings/update_profile.py چه کاری انجام می‌دهد؟", "input": "", "output": "Update user profile information.\n\nParameters:\n- first_name (Optional[str]): The updated first name.\n- last_name (Optional[str]): The updated last name.\n- bio (Optional[str]): The updated biography.\n\nReturns:\n- rubpy.types.Update: The updated user information after the profile update." }, { "instruction": "کلاس UpdateUsername در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Provides a method to update the username of the user.\n\nMethods:\n- update_username: Update the username of the user.\n\nAttributes:\n- self (rubpy.Client): The rubpy client instance." }, { "instruction": "متد update_username در فایل rubpy/methods/settings/update_username.py چه کاری انجام می‌دهد؟", "input": "", "output": "Update the username of the user.\n\nParameters:\n- username (str): The new username for the user.\n\nReturns:\n- rubpy.types.Update: The updated user information after the username update." }, { "instruction": "کلاس ActionOnStickerSet در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Provides a method to perform actions on a sticker set.\n\nMethods:\n- action_on_sticker_set: Add or remove a sticker set.\n\nAttributes:\n- self (rubpy.Client): The rubpy client instance." }, { "instruction": "متد action_on_sticker_set در فایل rubpy/methods/stickers/action_on_sticker_set.py چه کاری انجام می‌دهد؟", "input": "", "output": "Add or remove a sticker set.\n\nArgs:\n- sticker_set_id (str): The ID of the sticker set.\n- action (str, optional): The action to perform, either 'Add' or 'Remove'.\n\nRaises:\n- ValueError: If the action is not 'Add' or 'Remove'.\n\nReturns:\n- The result of the add/remove operation." }, { "instruction": "کلاس GetMyStickerSets در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Provides a method to get the sticker sets owned by the user.\n\nMethods:\n- get_my_sticker_sets: Get the sticker sets owned by the user.\n\nAttributes:\n- self (rubpy.Client): The rubpy client instance." }, { "instruction": "متد get_my_sticker_sets در فایل rubpy/methods/stickers/get_my_sticker_sets.py چه کاری انجام می‌دهد؟", "input": "", "output": "Get the sticker sets owned by the user.\n\nReturns:\n- The sticker sets owned by the user." }, { "instruction": "کلاس GetStickerSetByID در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Provides a method to get a sticker set by its ID.\n\nMethods:\n- get_sticker_set_by_id: Get a sticker set by its ID.\n\nAttributes:\n- self (rubpy.Client): The rubpy client instance." }, { "instruction": "متد get_sticker_set_by_id در فایل rubpy/methods/stickers/get_sticker_set_by_id.py چه کاری انجام می‌دهد؟", "input": "", "output": "Get a sticker set by its ID.\n\nParameters:\n- sticker_set_id (str): The ID of the sticker set.\n\nReturns:\n- The sticker set corresponding to the provided ID." }, { "instruction": "کلاس GetStickersByEmoji در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Provides a method to get stickers by emoji.\n\nMethods:\n- get_stickers_by_emoji: Get stickers by emoji.\n\nAttributes:\n- self (rubpy.Client): The rubpy client instance." }, { "instruction": "متد get_stickers_by_emoji در فایل rubpy/methods/stickers/get_stickers_by_emoji.py چه کاری انجام می‌دهد؟", "input": "", "output": "Get stickers by emoji.\n\nParameters:\n- emoji (str): The emoji character.\n- suggest_by (str): The type of suggestion (default is 'All').\n\nReturns:\n- Stickers corresponding to the provided emoji and suggestion type." }, { "instruction": "کلاس GetStickersBySetIDs در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Provides a method to get stickers by set IDs.\n\nMethods:\n- get_stickers_by_set_ids: Get stickers by set IDs.\n\nAttributes:\n- self (rubpy.Client): The rubpy client instance." }, { "instruction": "متد get_stickers_by_set_ids در فایل rubpy/methods/stickers/get_stickers_by_set_ids.py چه کاری انجام می‌دهد؟", "input": "", "output": "Get stickers by set IDs.\n\nParameters:\n- sticker_set_ids (Union[str, list]): The sticker set ID or a list of sticker set IDs.\n\nReturns:\n- Stickers corresponding to the provided set IDs." }, { "instruction": "کلاس GetTrendStickerSets در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Provides a method to get trending sticker sets.\n\nMethods:\n- get_trend_sticker_sets: Get trending sticker sets.\n\nAttributes:\n- self (rubpy.Client): The rubpy client instance." }, { "instruction": "متد get_trend_sticker_sets در فایل rubpy/methods/stickers/get_trend_sticker_sets.py چه کاری انجام می‌دهد؟", "input": "", "output": "Get trending sticker sets.\n\nParameters:\n- start_id (str): The start ID for pagination.\n\nReturns:\n- Trending sticker sets." }, { "instruction": "کلاس SearchStickers در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Provides a method to search for stickers.\n\nMethods:\n- search_stickers: Search for stickers.\n\nAttributes:\n- self (rubpy.Client): The rubpy client instance." }, { "instruction": "متد search_stickers در فایل rubpy/methods/stickers/search_stickers.py چه کاری انجام می‌دهد؟", "input": "", "output": "Search for stickers.\n\nParameters:\n- search_text (str): The search text.\n- start_id (str): The start ID for pagination.\n\nReturns:\n- Stickers matching the search criteria." }, { "instruction": "کلاس CheckUserUsername در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Provides a method to check the availability of a username for a user.\n\nMethods:\n- check_user_username: Check the availability of a username.\n\nAttributes:\n- self (rubpy.Client): The rubpy client instance." }, { "instruction": "متد check_user_username در فایل rubpy/methods/users/check_user_username.py چه کاری انجام می‌دهد؟", "input": "", "output": "Check the availability of a username for a user.\n\nArgs:\n- username (str): The username to be checked.\n\nReturns:\n- The result of the username availability check." }, { "instruction": "کلاس DeleteUserChat در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Provides a method to delete a user chat.\n\nMethods:\n- delete_user_chat: Delete a user chat.\n\nAttributes:\n- self (rubpy.Client): The rubpy client instance." }, { "instruction": "متد delete_user_chat در فایل rubpy/methods/users/delete_user_chat.py چه کاری انجام می‌دهد؟", "input": "", "output": "Delete a user chat.\n\nArgs:\n- user_guid (str): The GUID of the user whose chat is to be deleted.\n- last_deleted_message_id (Union[str, int]): The last deleted message ID.\n\nReturns:\n- The result of the user chat deletion." }, { "instruction": "کلاس GetMe در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Provides a method to get information about the authenticated user.\n\nMethods:\n- get_me: Get information about the authenticated user.\n\nAttributes:\n- self (rubpy.Client): The rubpy client instance." }, { "instruction": "متد get_me در فایل rubpy/methods/users/get_me.py چه کاری انجام می‌دهد؟", "input": "", "output": "Get information about the authenticated user.\n\nReturns:\n- Information about the authenticated user." }, { "instruction": "کلاس GetUserInfo در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Provides a method to get information about a user.\n\nMethods:\n- get_user_info: Get information about a specific user.\n\nAttributes:\n- self (rubpy.Client): The rubpy client instance." }, { "instruction": "متد get_user_info در فایل rubpy/methods/users/get_user_info.py چه کاری انجام می‌دهد؟", "input": "", "output": "Get information about a specific user.\n\nArgs:\n- user_guid (str, optional): The GUID of the user to get information about.\n\nReturns:\n- Information about the specified user." }, { "instruction": "کلاس SetBlockUser در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Provides a method to block or unblock a user.\n\nMethods:\n- set_block_user: Block or unblock a user.\n\nAttributes:\n- self (rubpy.Client): The rubpy client instance." }, { "instruction": "متد set_block_user در فایل rubpy/methods/users/set_block_user.py چه کاری انجام می‌دهد؟", "input": "", "output": "Block or unblock a user.\n\nArgs:\n- user_guid (str): The GUID of the user to block or unblock.\n- action (Literal['Block', 'Unblock'], optional): The action to perform, either 'Block' or 'Unblock'.\n\nRaises:\n- ValueError: If the action is not 'Block' or 'Unblock'.\n\nReturns:\n- The result of the block/unblock operation." }, { "instruction": "متد add_handler در فایل rubpy/methods/utilities/add_handler.py چه کاری انجام می‌دهد؟", "input": "", "output": "Add a handler function for updates.\n\nArgs:\n- func (Callable): The handler function to be added.\n- handler (rubpy.handlers.Handler): The handler object.\n\nReturns:\n- None" }, { "instruction": "متد disconnect در فایل rubpy/methods/utilities/disconnect.py چه کاری انجام می‌دهد؟", "input": "", "output": "Disconnect from the Rubpy server.\n\nRaises:\n- exceptions.NoConnection: If the client is not connected." }, { "instruction": "متد download در فایل rubpy/methods/utilities/download.py چه کاری انجام می‌دهد؟", "input": "", "output": "Download a file using its file_inline information.\n\nArgs:\n- file_inline (rubpy.types.Results): The file information used for downloading.\n- save_as (str, optional): The path to save the downloaded file. If None, the file will not be saved.\n- chunk_size (int, optional): The size of each chunk to download.\n- callback (callable, optional): A callback function to monitor the download progress.\n- *args, **kwargs: Additional parameters to pass to the download method.\n\nReturns:\n- bytes: The binary data of the downloaded file.\n\nRaises:\n- aiofiles.errors.OSFError: If there is an issue with file I/O (when saving the file)." }, { "instruction": "متد download_profile_picture در فایل rubpy/methods/utilities/download_profile_picture.py چه کاری انجام می‌دهد؟", "input": "", "output": "Download the profile picture of a user, group, or channel.\n\nArgs:\n- object_guid (str): The GUID of the user, group, channel or other chats.\n\nReturns:\n- bytes: The binary data of the profile picture.\n\nRaises:\n- rubpy.errors.ApiError: If there is an issue with the Rubpy API." }, { "instruction": "متد get_members در فایل rubpy/methods/utilities/get_members.py چه کاری انجام می‌دهد؟", "input": "", "output": "Get members of a group or channel.\n\nArgs:\n- object_guid (str): The GUID of the group or channel.\n- start_id (int, optional): The starting ID for fetching members.\n- search_text (str, optional): The text to search for among members.\n\nReturns:\n- rubpy.types.Update: An Update object containing information about the members.\n\nRaises:\n- ValueError: If the object_guid does not start with 'c0' or 'g0'." }, { "instruction": "متد get_updates در فایل rubpy/methods/utilities/get_updates.py چه کاری انجام می‌دهد؟", "input": "", "output": "Get updates from the server.\n\nReturns:\n- rubpy.types.Update: An Update object containing information about the updates." }, { "instruction": "متد remove_handler در فایل rubpy/methods/utilities/remove_handler.py چه کاری انجام می‌دهد؟", "input": "", "output": "Remove a handler function.\n\nArgs:\n- func: The handler function to be removed." }, { "instruction": "متد run در فایل rubpy/methods/utilities/run.py چه کاری انجام می‌دهد؟", "input": "", "output": "Run the client in either synchronous or asynchronous mode.\n\nArgs:\n- coroutine (Optional[Coroutine]): An optional coroutine to run asynchronously.\n- phone_number (str): The phone number to use for starting the client.\n\nReturns:\n- If running synchronously, returns the initialized client.\n- If running asynchronously, returns None." }, { "instruction": "متد start در فایل rubpy/methods/utilities/start.py چه کاری انجام می‌دهد؟", "input": "", "output": "Start the RubPy client, handling user registration if necessary.\n\nArgs:\n- phone_number (str): The phone number to use for starting the client.\n\nReturns:\n- The initialized client." }, { "instruction": "کلاس ResultMedia در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Represents media data along with its metadata.\n\nAttributes:\n- image (bytes): The raw image data.\n- width (int): The width of the media.\n- height (int): The height of the media.\n- seconds (int): The duration of the media in seconds." }, { "instruction": "کلاس MediaThumbnail در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Provides methods to generate media thumbnails.\n\nMethods:\n- from_image: Generate a thumbnail from image data.\n- from_video: Generate a thumbnail from video data." }, { "instruction": "متد __init__ در فایل rubpy/methods/utilities/thumbnail.py چه کاری انجام می‌دهد؟", "input": "", "output": "Initialize ResultMedia with image data and metadata.\n\nArgs:\n- image (bytes): The raw image data.\n- width (int): The width of the media.\n- height (int): The height of the media.\n- seconds (int): The duration of the media in seconds." }, { "instruction": "متد ndarray_to_bytes در فایل rubpy/methods/utilities/thumbnail.py چه کاری انجام می‌دهد؟", "input": "", "output": "Convert NumPy array to bytes.\n\nArgs:\n- image: NumPy array representing the image.\n\nReturns:\n- bytes: The image data in bytes." }, { "instruction": "متد to_base64 در فایل rubpy/methods/utilities/thumbnail.py چه کاری انجام می‌دهد؟", "input": "", "output": "Convert media data to base64.\n\nReturns:\n- str: Base64-encoded media data." }, { "instruction": "متد from_image در فایل rubpy/methods/utilities/thumbnail.py چه کاری انجام می‌دهد؟", "input": "", "output": "Generate a thumbnail from image data.\n\nArgs:\n- image (bytes): The raw image data.\n\nReturns:\n- ResultMedia: ResultMedia object containing the thumbnail and metadata." }, { "instruction": "متد from_video در فایل rubpy/methods/utilities/thumbnail.py چه کاری انجام می‌دهد؟", "input": "", "output": "Generate a thumbnail from video data.\n\nArgs:\n- video (bytes): The raw video data.\n\nReturns:\n- ResultMedia: ResultMedia object containing the thumbnail and metadata." }, { "instruction": "کلاس UploadFile در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Provides a method to upload a file.\n\nMethods:\n- upload: Upload a file.\n\nAttributes:\n- self (rubpy.Client): The rubpy client instance." }, { "instruction": "متد upload در فایل rubpy/methods/utilities/upload.py چه کاری انجام می‌دهد؟", "input": "", "output": "Upload a file.\n\nArgs:\n- file: The file to be uploaded.\n- *args: Additional positional arguments.\n- **kwargs: Additional keyword arguments.\n\nReturns:\n- The result of the file upload operation." }, { "instruction": "متد join_voice_chat در فایل rubpy/methods/voice_chat/join_voice_chat.py چه کاری انجام می‌دهد؟", "input": "", "output": "Join to the group | channel voice chat.\n\nArgs:\n- chat_guid (str): The GUID of the Chat.\n- voice_chat_id (str): The voice chat ID.\n- sdp_offer_data (str): SDP offer data.\n\nReturns:\n- rubpy.types.Update: Update object confirming the change in default access." }, { "instruction": "متد send_group_voice_chat_activity در فایل rubpy/methods/voice_chat/send_group_voice_chat_activity.py چه کاری انجام می‌دهد؟", "input": "", "output": "Set group voice chat activity.\n\nArgs:\n- chat_guid (str): The GUID of the Chat.\n- voice_chat_id (str): The voice chat ID.\n- participant_object_guid (str): Participant object guid, Defualt is `self.guid`.\n- activity (str): Literal['Speaking'] and Defualt is `Speaking`.\n\nReturns:\n- rubpy.types.Update: Update object confirming the change in default access." }, { "instruction": "متد set_voice_chat_state در فایل rubpy/methods/voice_chat/set_voice_chat_state.py چه کاری انجام می‌دهد؟", "input": "", "output": "Set group or channel voice chat state.\n\nArgs:\n- chat_guid (str): The GUID of the Chat.\n- voice_chat_id (str): The voice chat ID.\n- participant_object_guid (str): Participant object guid, Defualt is `self.guid`.\n- action (str): Literal['Mute', 'Unmute'] and Defualt is `Unmute`.\n\nReturns:\n- rubpy.types.Update: Update object confirming the change in default access." }, { "instruction": "کلاس PluginMeta در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Metadata describing a plugin package." }, { "instruction": "کلاس Plugin در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Base class that every Rubpy plugin must inherit from." }, { "instruction": "متد setup در فایل rubpy/plugins/base.py چه کاری انجام می‌دهد؟", "input": "", "output": "Hook executed when the plugin is enabled. Can be sync or async." }, { "instruction": "متد teardown در فایل rubpy/plugins/base.py چه کاری انجام می‌دهد؟", "input": "", "output": "Hook executed when the plugin is disabled. Can be sync or async." }, { "instruction": "متد configure در فایل rubpy/plugins/base.py چه کاری انجام می‌دهد؟", "input": "", "output": "Override to validate/extend merged configuration before it is stored." }, { "instruction": "متد get_config در فایل rubpy/plugins/base.py چه کاری انجام می‌دهد؟", "input": "", "output": "Convenience access to the resolved configuration mapping." }, { "instruction": "متد identifier در فایل rubpy/plugins/base.py چه کاری انجام می‌دهد؟", "input": "", "output": "Return the registry identifier for this plugin." }, { "instruction": "کلاس PluginDefinitionError در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Raised when a plugin definition is invalid." }, { "instruction": "کلاس PluginLoadError در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Raised when a plugin fails to load or run hooks." }, { "instruction": "کلاس PluginManager در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Registers, discovers, and manages Rubpy plugins." }, { "instruction": "متد discover_entrypoint_plugins در فایل rubpy/plugins/manager.py چه کاری انجام می‌دهد؟", "input": "", "output": "Discover and register plugins advertised via entry points." }, { "instruction": "متد register_plugin در فایل rubpy/plugins/manager.py چه کاری انجام می‌دهد؟", "input": "", "output": "Register a Plugin subclass for later usage." }, { "instruction": "متد unregister_plugin در فایل rubpy/plugins/manager.py چه کاری انجام می‌دهد؟", "input": "", "output": "Remove a plugin registration. Does not teardown active instances." }, { "instruction": "متد enable در فایل rubpy/plugins/manager.py چه کاری انجام می‌دهد؟", "input": "", "output": "Instantiate (if necessary) and run setup for a plugin." }, { "instruction": "متد disable در فایل rubpy/plugins/manager.py چه کاری انجام می‌دهد؟", "input": "", "output": "Run teardown for an enabled plugin." }, { "instruction": "متد upload_file در فایل rubpy/rubino/client.py چه کاری انجام می‌دهد؟", "input": "", "output": "Upload a file to Rubino.\n\nParameters:\n- file: File path or bytes.\n- mime: MIME type of the file.\n- file_name: Name of the file.\n- chunk: Chunk size for uploading.\n- callback: Progress callback.\n\nReturns:\nResults object." }, { "instruction": "کلاس ResultMedia در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Represents media data along with its metadata.\n\nAttributes:\n- image (bytes): The raw image data.\n- width (int): The width of the media.\n- height (int): The height of the media.\n- seconds (int): The duration of the media in seconds." }, { "instruction": "کلاس MediaThumbnail در rubpy چه کاری انجام می‌دهد؟", "input": "", "output": "Provides methods to generate media thumbnails.\n\nMethods:\n- from_image: Generate a thumbnail from image data.\n- from_video: Generate a thumbnail from video data." }, { "instruction": "متد __init__ در فایل rubpy/rubino/thumbnail.py چه کاری انجام می‌دهد؟", "input": "", "output": "Initialize ResultMedia with image data and metadata.\n\nArgs:\n- image (bytes): The raw image data.\n- width (int): The width of the media.\n- height (int): The height of the media.\n- seconds (int): The duration of the media in seconds." }, { "instruction": "متد ndarray_to_bytes در فایل rubpy/rubino/thumbnail.py چه کاری انجام می‌دهد؟", "input": "", "output": "Convert NumPy array to bytes.\n\nArgs:\n- image: NumPy array representing the image.\n\nReturns:\n- bytes: The image data in bytes." }, { "instruction": "متد to_base64 در فایل rubpy/rubino/thumbnail.py چه کاری انجام می‌دهد؟", "input": "", "output": "Convert media data to base64.\n\nReturns:\n- str: Base64-encoded media data." }, { "instruction": "متد from_image در فایل rubpy/rubino/thumbnail.py چه کاری انجام می‌دهد؟", "input": "", "output": "Generate a thumbnail from image data.\n\nArgs:\n- image (bytes): The raw image data.\n\nReturns:\n- ResultMedia: ResultMedia object containing the thumbnail and metadata." }, { "instruction": "متد from_video در فایل rubpy/rubino/thumbnail.py چه کاری انجام می‌دهد؟", "input": "", "output": "Generate a thumbnail from video data.\n\nArgs:\n- video (bytes): The raw video data.\n\nReturns:\n- ResultMedia: ResultMedia object containing the thumbnail and metadata." }, { "instruction": "متد _from_video_opencv در فایل rubpy/rubino/thumbnail.py چه کاری انجام می‌دهد؟", "input": "", "output": "Generate a thumbnail from video data using OpenCV.\n\nArgs:\n- video (bytes): The raw video data.\n\nReturns:\n- ResultMedia: ResultMedia object containing the thumbnail and metadata." }, { "instruction": "متد _from_video_moviepy در فایل rubpy/rubino/thumbnail.py چه کاری انجام می‌دهد؟", "input": "", "output": "Generate a thumbnail from video data using MoviePy.\n\nArgs:\n- video (bytes): The raw video data.\n\nReturns:\n- ResultMedia: ResultMedia object containing the thumbnail and metadata." }, { "instruction": "متد to_dict در فایل rubpy/types/update.py چه کاری انجام می‌دهد؟", "input": "", "output": "Return the update as dict" }, { "instruction": "متد guid_type در فایل rubpy/types/update.py چه کاری انجام می‌دهد؟", "input": "", "output": "Determine the type of the object based on its GUID.\n\nArgs:\n - object_guid (str): The GUID of the object.\n\nReturns:\n - str: The type of the object ('Channel', 'Group', or 'User')." }, { "instruction": "متد pin در فایل rubpy/types/update.py چه کاری انجام می‌دهد؟", "input": "", "output": "Pin a message.\n\nArgs:\n - object_guid (str, optional): Custom object GUID. Defaults to update.object_guid if not provided.\n - message_id (str, optional): Custom message ID. Defaults to update.message_id if not provided.\n - action (str, optional): Pin or unpin action. Defaults to 'Pin'.\n\nReturns:\n - BaseResults: Result of the pin or unpin operation." }, { "instruction": "متد unpin در فایل rubpy/types/update.py چه کاری انجام می‌دهد؟", "input": "", "output": "Unpin a message.\n\nArgs:\n - object_guid (str, optional): Custom object GUID. Defaults to update.object_guid if not provided.\n - message_id (str, optional): Custom message ID. Defaults to update.message_id if not provided.\n - action (str, optional): Pin or unpin action. Defaults to 'Pin'.\n\nReturns:\n - BaseResults: Result of the pin or unpin operation." }, { "instruction": "متد edit در فایل rubpy/types/update.py چه کاری انجام می‌دهد؟", "input": "", "output": "Edit a message.\n\nArgs:\n - text (str): The new message text.\n - object_guid (str, optional): Custom object GUID. Defaults to update.object_guid if not provided.\n - message_id (str, optional): Custom message ID. Defaults to update.message_id if not provided.\n\nReturns:\n - dict: Result of the edit operation." }, { "instruction": "متد copy در فایل rubpy/types/update.py چه کاری انجام می‌دهد؟", "input": "", "output": "Copy messages to another object.\n\nArgs:\n - to_object_guid (str): To object guid.\n - from_object_guid (str, optional): From object guid. Defaults to update.object_guid.\n - message_ids (Union[str, int, List[str]], optional): Message ids. Defaults to update.message_id." }, { "instruction": "متد seen در فایل rubpy/types/update.py چه کاری انجام می‌دهد؟", "input": "", "output": "Mark chats as seen.\n\nArgs:\n - seen_list (dict, optional): Dictionary containing object GUIDs and corresponding message IDs.\n Defaults to {update.object_guid: update.message_id} if not provided.\n\nReturns:\n - dict: Result of the operation." }, { "instruction": "متد reply در فایل rubpy/types/update.py چه کاری انجام می‌دهد؟", "input": "", "output": "Reply to a message.\n\nArgs:\n - text (str, optional): Text content of the reply. Defaults to None.\n - object_guid (str, optional): Custom object GUID. Defaults to update.object_guid.\n - reply_to_message_id (str, optional): Reply to message ID. Defaults to None.\n - file_inline (Union[pathlib.Path, bytes], optional): File to send with the reply. Defaults to None.\n - auto_delete (int, optional): Auto-delete timer for the message. Defaults to None.\n - *args, **kwargs: Additional arguments.\n\nReturns:\n - dict: Result of the reply operation." }, { "instruction": "متد reply_document در فایل rubpy/types/update.py چه کاری انجام می‌دهد؟", "input": "", "output": "Reply with a document.\n\nArgs:\n - document (Union[str, bytes, Path]): Document to reply with.\n - caption (str, optional): Caption for the document. Defaults to None.\n - auto_delete (int, optional): Auto-delete timer for the message. Defaults to None.\n - object_guid (str, optional): Custom object GUID. Defaults to update.object_guid.\n - reply_to_message_id (str, optional): Reply to message ID. Defaults to None.\n - *args, **kwargs: Additional arguments.\n\nReturns:\n - dict: Result of the reply operation." }, { "instruction": "متد reply_photo در فایل rubpy/types/update.py چه کاری انجام می‌دهد؟", "input": "", "output": "Reply with a photo.\n\nArgs:\n - photo (Union[str, bytes, Path]): Photo to reply with.\n - caption (str, optional): Caption for the photo. Defaults to None.\n - auto_delete (int, optional): Auto-delete timer for the message. Defaults to None.\n - object_guid (str, optional): Custom object GUID. Defaults to update.object_guid.\n - reply_to_message_id (str, optional): Reply to message ID. Defaults to None.\n - *args, **kwargs: Additional arguments.\n\nReturns:\n - dict: Result of the reply operation." }, { "instruction": "متد reply_video در فایل rubpy/types/update.py چه کاری انجام می‌دهد؟", "input": "", "output": "Reply with a video.\n\nArgs:\n - video (Union[str, bytes, Path]): Video to reply with.\n - caption (str, optional): Caption for the Video. Defaults to None.\n - auto_delete (int, optional): Auto-delete timer for the message. Defaults to None.\n - object_guid (str, optional): Custom object GUID. Defaults to update.object_guid.\n - reply_to_message_id (str, optional): Reply to message ID. Defaults to None.\n - *args, **kwargs: Additional arguments.\n\nReturns:\n - dict: Result of the reply operation." }, { "instruction": "متد reply_music در فایل rubpy/types/update.py چه کاری انجام می‌دهد؟", "input": "", "output": "Reply with a music.\n\nArgs:\n - music (Union[str, bytes, Path]): Music to reply with.\n - caption (str, optional): Caption for the Music. Defaults to None.\n - auto_delete (int, optional): Auto-delete timer for the message. Defaults to None.\n - object_guid (str, optional): Custom object GUID. Defaults to update.object_guid.\n - reply_to_message_id (str, optional): Reply to message ID. Defaults to None.\n - *args, **kwargs: Additional arguments.\n\nReturns:\n - dict: Result of the reply operation." }, { "instruction": "متد reply_voice در فایل rubpy/types/update.py چه کاری انجام می‌دهد؟", "input": "", "output": "Reply with a voice.\n\nArgs:\n - voice (Union[str, bytes, Path]): Voice to reply with.\n - caption (str, optional): Caption for the Voice. Defaults to None.\n - auto_delete (int, optional): Auto-delete timer for the message. Defaults to None.\n - object_guid (str, optional): Custom object GUID. Defaults to update.object_guid.\n - reply_to_message_id (str, optional): Reply to message ID. Defaults to None.\n - *args, **kwargs: Additional arguments.\n\nReturns:\n - dict: Result of the reply operation." }, { "instruction": "متد reply_gif در فایل rubpy/types/update.py چه کاری انجام می‌دهد؟", "input": "", "output": "Reply with a gif.\n\nArgs:\n - gif (Union[str, bytes, Path]): Gif to reply with.\n - caption (str, optional): Caption for the Gif. Defaults to None.\n - auto_delete (int, optional): Auto-delete timer for the message. Defaults to None.\n - object_guid (str, optional): Custom object GUID. Defaults to update.object_guid.\n - reply_to_message_id (str, optional): Reply to message ID. Defaults to None.\n - *args, **kwargs: Additional arguments.\n\nReturns:\n - dict: Result of the reply operation." }, { "instruction": "متد reply_video_message در فایل rubpy/types/update.py چه کاری انجام می‌دهد؟", "input": "", "output": "Reply with a video.\n\nArgs:\n - video (Union[str, bytes, Path]): VideoMessage to reply with.\n - caption (str, optional): Caption for the VideoMessage. Defaults to None.\n - auto_delete (int, optional): Auto-delete timer for the message. Defaults to None.\n - object_guid (str, optional): Custom object GUID. Defaults to update.object_guid.\n - reply_to_message_id (str, optional): Reply to message ID. Defaults to None.\n - *args, **kwargs: Additional arguments.\n\nReturns:\n - dict: Result of the reply operation." }, { "instruction": "متد forward در فایل rubpy/types/update.py چه کاری انجام می‌دهد؟", "input": "", "output": "Forward message.\n\nArgs:\n - to_object_guid (str): Destination object GUID.\n\nReturns:\n - dict: Result of the forward operation." }, { "instruction": "متد forwards در فایل rubpy/types/update.py چه کاری انجام می‌دهد؟", "input": "", "output": "Forward messages.\n\nArgs:\n - to_object_guid (str): Destination object GUID.\n - from_object_guid (str, optional): Source object GUID. Defaults to update.object_guid.\n - message_ids (Union[str, int, List[str]], optional): Message IDs to forward. Defaults to update.message_id.\n\nReturns:\n - dict: Result of the forward operation." }, { "instruction": "متد download در فایل rubpy/types/update.py چه کاری انجام می‌دهد؟", "input": "", "output": "Download a file.\n\nArgs:\n- file_inline (dict, optional): File information. Defaults to update.file_inline.\n- save_as (str, optional): The path to save the downloaded file. If None, the file will not be saved.\n- chunk_size (int, optional): The size of each chunk to download.\n- callback (callable, optional): A callback function to monitor the download progress.\n- *args, **kwargs: Additional parameters to pass to the download method.\n\nReturns:\n- bytes: The binary data of the downloaded file.\n\nRaises:\n- aiofiles.errors.OSFError: If there is an issue with file I/O (when saving the file)." }, { "instruction": "متد get_author در فایل rubpy/types/update.py چه کاری انجام می‌دهد؟", "input": "", "output": "Get user or author information.\n\nArgs:\n - author_guid (str, optional): Custom author GUID. Defaults to update.author_guid.\n\nReturns:\n - dict: User or author information." }, { "instruction": "متد get_object در فایل rubpy/types/update.py چه کاری انجام می‌دهد؟", "input": "", "output": "Get object information.\n\nArgs:\n - object_guid (str, optional): Custom object GUID. Defaults to update.object_guid.\n\nReturns:\n - dict: Object information." }, { "instruction": "متد get_messages در فایل rubpy/types/update.py چه کاری انجام می‌دهد؟", "input": "", "output": "Get messages.\n\nArgs:\n - object_guid (str, optional): Custom object GUID. Defaults to update.object_guid.\n - message_ids (Union[str, int, List[str]], optional): Message IDs. Defaults to update.message_id.\n\nReturns:\n - dict: Retrieved messages." }, { "instruction": "متد delete در فایل rubpy/types/update.py چه کاری انجام می‌دهد؟", "input": "", "output": "Delete message.\n\nReturns:\n - dict: Result of the message deletion operation." }, { "instruction": "متد delete_messages در فایل rubpy/types/update.py چه کاری انجام می‌دهد؟", "input": "", "output": "Delete messages.\n\nArgs:\n - object_guid (str, optional): Custom object GUID. Defaults to update.object_guid.\n - message_ids (list, optional): Custom message IDs. Defaults to update.message_id.\n\nReturns:\n - dict: Result of the message deletion operation." }, { "instruction": "متد reaction در فایل rubpy/types/update.py چه کاری انجام می‌دهد؟", "input": "", "output": "Add a reaction to a message.\n\nArgs:\n - reaction_id (int): Reaction ID.\n - object_guid (str, optional): Custom object GUID. Defaults to update.object_guid.\n - message_id (str, optional): Custom message ID. Defaults to update.message_id.\n\nReturns:\n - dict: Result of the reaction operation." }, { "instruction": "متد ban_member در فایل rubpy/types/update.py چه کاری انجام می‌دهد؟", "input": "", "output": "Ban a member.\n\nArgs:\n - object_guid (str, optional): Custom object GUID. Defaults to update.object_guid.\n - user_guid (str, optional): User GUID. Defaults to None.\n\nReturns:\n - dict: Result of the ban operation." }, { "instruction": "متد unban_member در فایل rubpy/types/update.py چه کاری انجام می‌دهد؟", "input": "", "output": "Unban a member.\n\nArgs:\n - object_guid (str, optional): Custom object GUID. Defaults to update.object_guid.\n - user_guid (str, optional): User GUID. Defaults to None.\n\nReturns:\n - dict: Result of the unban operation." }, { "instruction": "متد send_activity در فایل rubpy/types/update.py چه کاری انجام می‌دهد؟", "input": "", "output": "Send chat activity.\n\nArgs:\n - activity (Literal['Typing', 'Uploading', 'Recording'], optional): Chat activity type. Defaults to 'Typing'.\n - object_guid (str, optional): Custom object GUID. Defaults to update.object_guid.\n\nReturns:\n - dict: Result of the activity sending operation." }, { "instruction": "متد is_admin در فایل rubpy/types/update.py چه کاری انجام می‌دهد؟", "input": "", "output": "Check if a user is an admin.\n\nArgs:\n - object_guid (str, optional): Custom object GUID. Defaults to update.object_guid.\n - user_guid (str, optional): User GUID. Defaults to update.object_guid.\n\nReturns:\n - dict: Result of the admin check operation." }, { "instruction": "متد block در فایل rubpy/types/update.py چه کاری انجام می‌دهد؟", "input": "", "output": "Block a user.\n\nArgs:\n - user_guid (str, optional): User GUID. Defaults to update.object_guid.\n\nReturns:\n - dict: Result of the admin check operation." }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"Client\",\n \"file\": \"rubpy/client.py\",\n \"doc\": \"Main client for interacting with the Rubika API.\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__init__\",\n \"file\": \"rubpy/client.py\",\n \"doc\": \"Initialize the Rubika client.\\n\\nParameters:\\n- name: Session name or file path (str) or a StringSession instance.\\n- auth: Authentication key (optional).\\n- private_key: RSA private key (optional, str or bytes).\\n- phone_number: Phone number (optional).\\n- user_agent: User-Agent string (optional, defaults to Chrome).\\n- timeout: Request timeout in seconds (default: 20).\\n- lang_code: Language code (default: 'fa').\\n- parse_mode: Message parsing mode ('html', 'markdown', 'mk', or None).\\n- proxy: Proxy address (example: 'http://127.0.0.1:80').\\n- logger: Logger instance for logging (optional).\\n- display_welcome: Show welcome message (default: False).\\n- platform: Client platform ('PWA' or 'Android').\\n- max_retries: Maximum number of retries for requests (default: 5).\\n- sequential_handlers: If True, run registered handlers sequentially and stop after the first match (default: False).\\n\\nRaises:\\n- ValueError: If any input is invalid.\\n- TypeError: If the 'name' parameter is not str or StringSession.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__enter__\",\n \"file\": \"rubpy/client.py\",\n \"doc\": \"Support for context manager to start the client.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__exit__\",\n \"file\": \"rubpy/client.py\",\n \"doc\": \"Support for context manager to disconnect the client.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__aenter__\",\n \"file\": \"rubpy/client.py\",\n \"doc\": \"Support for async context manager to start the client.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__aexit__\",\n \"file\": \"rubpy/client.py\",\n \"doc\": \"Support for async context manager to disconnect the client.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"stop\",\n \"file\": \"rubpy/client.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"ClientError\",\n \"file\": \"rubpy/exceptions.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"StopHandler\",\n \"file\": \"rubpy/exceptions.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"CancelledError\",\n \"file\": \"rubpy/exceptions.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"RequestError\",\n \"file\": \"rubpy/exceptions.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"UploadError\",\n \"file\": \"rubpy/exceptions.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"CodeIsUsed\",\n \"file\": \"rubpy/exceptions.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"TooRequests\",\n \"file\": \"rubpy/exceptions.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"InvalidAuth\",\n \"file\": \"rubpy/exceptions.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"ServerError\",\n \"file\": \"rubpy/exceptions.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"UrlNotFound\",\n \"file\": \"rubpy/exceptions.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"ErrorAction\",\n \"file\": \"rubpy/exceptions.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"ErrorIgnore\",\n \"file\": \"rubpy/exceptions.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"ErrorGeneric\",\n \"file\": \"rubpy/exceptions.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"NoConnection\",\n \"file\": \"rubpy/exceptions.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"InvalidInput\",\n \"file\": \"rubpy/exceptions.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"Undeliverable\",\n \"file\": \"rubpy/exceptions.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"NotRegistered\",\n \"file\": \"rubpy/exceptions.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"CodeIsExpired\",\n \"file\": \"rubpy/exceptions.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"InvalidMethod\",\n \"file\": \"rubpy/exceptions.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"UsernameExist\",\n \"file\": \"rubpy/exceptions.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"ErrorTryAgain\",\n \"file\": \"rubpy/exceptions.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"ErrorMessageTry\",\n \"file\": \"rubpy/exceptions.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"InternalProblem\",\n \"file\": \"rubpy/exceptions.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"ErrorMessageIgn\",\n \"file\": \"rubpy/exceptions.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"NotSupportedApiVersion\",\n \"file\": \"rubpy/exceptions.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"NetworkError\",\n \"file\": \"rubpy/exceptions.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"ExcetionsHandler\",\n \"file\": \"rubpy/exceptions.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__init__\",\n \"file\": \"rubpy/exceptions.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__init__\",\n \"file\": \"rubpy/exceptions.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__init__\",\n \"file\": \"rubpy/exceptions.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__getattr__\",\n \"file\": \"rubpy/exceptions.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__call__\",\n \"file\": \"rubpy/exceptions.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"create_model\",\n \"file\": \"rubpy/filters.py\",\n \"doc\": \"ایجاد دینامیک یک مدل بر اساس نام و کلاس پایه.\\n\\nپارامترها:\\n- name: نام مدل.\\n- base: کلاس پایه برای مدل.\\n- authorize: لیست نام‌های مدل‌های مجاز.\\n- exception: آیا در صورت غیرمجاز بودن مدل خطا پرتاب شود.\\n- kwargs: آرگومان‌های اضافی برای تنظیم کلاس.\\n\\nخروجی:\\nکلاس مدل ایجادشده یا None در صورت غیرمجاز بودن.\\n\\nخطاها:\\n- AttributeError: اگر مدل غیرمجاز باشد و exception=True.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"Operator\",\n \"file\": \"rubpy/filters.py\",\n \"doc\": \"کلاس برای تعریف عملگرهای استفاده‌شده در فیلترهای مدل‌ها.\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"BaseModel\",\n \"file\": \"rubpy/filters.py\",\n \"doc\": \"کلاس پایه برای مدل‌های سفارشی.\\n\\nپارامترها:\\n- func: تابع فیلتر (اختیاری).\\n- filters: لیست یا تک فیلتر برای اعمال.\\n- kwargs: آرگومان‌های اضافی.\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"commands\",\n \"file\": \"rubpy/filters.py\",\n \"doc\": \"فیلتر برای دستورات در پیام‌های متنی.\\n\\nپارامترها:\\n- commands: دستور یا لیست دستورات (رشته یا لیست رشته‌ها).\\n- prefixes: پیشوند یا لیست پیشوندها (پیش‌فرض '/').\\n- case_sensitive: حساسیت به حروف بزرگ و کوچک (پیش‌فرض False).\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"regex\",\n \"file\": \"rubpy/filters.py\",\n \"doc\": \"فیلتر برای تطبیق متن با عبارات منظم.\\n\\nپارامترها:\\n- pattern: الگوی عبارت منظم.\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"object_guids\",\n \"file\": \"rubpy/filters.py\",\n \"doc\": \"فیلتر بر اساس GUIDهای شیء.\\n\\nپارامترها:\\n- args: GUID یا لیست/تاپل GUIDها.\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"author_guids\",\n \"file\": \"rubpy/filters.py\",\n \"doc\": \"فیلتر بر اساس GUIDهای نویسنده.\\n\\nپارامترها:\\n- args: GUID یا لیست/تاپل GUIDها.\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"Models\",\n \"file\": \"rubpy/filters.py\",\n \"doc\": \"کلاس برای مدیریت و ایجاد مدل‌های خاص.\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__init__\",\n \"file\": \"rubpy/filters.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__eq__\",\n \"file\": \"rubpy/filters.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__init__\",\n \"file\": \"rubpy/filters.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"insert\",\n \"file\": \"rubpy/filters.py\",\n \"doc\": \"اضافه کردن فیلتر به لیست فیلترها.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__or__\",\n \"file\": \"rubpy/filters.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__and__\",\n \"file\": \"rubpy/filters.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__eq__\",\n \"file\": \"rubpy/filters.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__ne__\",\n \"file\": \"rubpy/filters.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__lt__\",\n \"file\": \"rubpy/filters.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__le__\",\n \"file\": \"rubpy/filters.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__gt__\",\n \"file\": \"rubpy/filters.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__ge__\",\n \"file\": \"rubpy/filters.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"build\",\n \"file\": \"rubpy/filters.py\",\n \"doc\": \"ساخت و اجرای فیلترها روی آپدیت.\\n\\nپارامترها:\\n- update: شیء آپدیت برای بررسی.\\n\\nخروجی:\\nTrue اگر فیلترها با موفقیت اعمال شوند، در غیر این صورت False.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__call__\",\n \"file\": \"rubpy/filters.py\",\n \"doc\": \"اجرای مدل روی آپدیت.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__init__\",\n \"file\": \"rubpy/filters.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__call__\",\n \"file\": \"rubpy/filters.py\",\n \"doc\": \"بررسی دستورات در متن آپدیت.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__init__\",\n \"file\": \"rubpy/filters.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__call__\",\n \"file\": \"rubpy/filters.py\",\n \"doc\": \"تطبیق متن آپدیت با الگوی عبارت منظم.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__init__\",\n \"file\": \"rubpy/filters.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__call__\",\n \"file\": \"rubpy/filters.py\",\n \"doc\": \"بررسی وجود GUID شیء در آپدیت.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__init__\",\n \"file\": \"rubpy/filters.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__call__\",\n \"file\": \"rubpy/filters.py\",\n \"doc\": \"بررسی وجود GUID نویسنده در آپدیت.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__init__\",\n \"file\": \"rubpy/filters.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__eq__\",\n \"file\": \"rubpy/filters.py\",\n \"doc\": \"بررسی برابری با کلاس پایه مدل‌ها.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__dir__\",\n \"file\": \"rubpy/filters.py\",\n \"doc\": \"دریافت لیست مدل‌های مجاز.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__call__\",\n \"file\": \"rubpy/filters.py\",\n \"doc\": \"فراخوانی مدل بر اساس نام.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__getattr__\",\n \"file\": \"rubpy/filters.py\",\n \"doc\": \"دریافت مدل دینامیک بر اساس نام.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"create_handler\",\n \"file\": \"rubpy/handlers.py\",\n \"doc\": \"ایجاد دینامیک یک handler بر اساس نام و کلاس پایه.\\n\\nپارامترها:\\n- name: نام handler.\\n- base: کلاس پایه برای handler.\\n- authorized_handlers: لیست نام‌های handlerهای مجاز.\\n- exception: آیا در صورت غیرمجاز بودن handler خطا پرتاب شود.\\n- kwargs: آرگومان‌های اضافی برای تنظیم کلاس.\\n\\nخروجی:\\nکلاس handler ایجادشده یا None در صورت غیرمجاز بودن.\\n\\nخطاها:\\n- AttributeError: اگر handler غیرمجاز باشد و exception=True.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"BaseHandlers\",\n \"file\": \"rubpy/handlers.py\",\n \"doc\": \"کلاس پایه برای handlerهای سفارشی.\\n\\nپارامترها:\\n- models: لیست مدل‌های فیلتر.\\n- any_handler: آیا هر handler باید اجرا شود.\\n- kwargs: آرگومان‌های اضافی.\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"Handlers\",\n \"file\": \"rubpy/handlers.py\",\n \"doc\": \"کلاس برای مدیریت و ایجاد handlerهای خاص.\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__init__\",\n \"file\": \"rubpy/handlers.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"is_async\",\n \"file\": \"rubpy/handlers.py\",\n \"doc\": \"بررسی اینکه آیا تابع داده‌شده ناهمگام (async) است.\\n\\nپارامترها:\\n- value: تابع برای بررسی.\\n\\nخروجی:\\nTrue اگر تابع ناهمگام باشد، در غیر این صورت False.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__call__\",\n \"file\": \"rubpy/handlers.py\",\n \"doc\": \"اجرای handler روی آپدیت داده‌شده.\\n\\nپارامترها:\\n- update: دیکشنری آپدیت.\\n- args: آرگومان‌های اضافی موقعیتی.\\n- kwargs: آرگومان‌های اضافی کلیدی.\\n\\nخروجی:\\nTrue اگر handler باید اجرا شود، در غیر این صورت False.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__init__\",\n \"file\": \"rubpy/handlers.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__eq__\",\n \"file\": \"rubpy/handlers.py\",\n \"doc\": \"بررسی برابری با کلاس پایه handlerها.\\n\\nپارامترها:\\n- value: مقداری برای بررسی.\\n\\nخروجی:\\nTrue اگر برابر با BaseHandlers باشد، در غیر این صورت False.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__dir__\",\n \"file\": \"rubpy/handlers.py\",\n \"doc\": \"دریافت لیست handlerهای مجاز.\\n\\nخروجی:\\nلیست مرتب‌شده handlerهای مجاز.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__call__\",\n \"file\": \"rubpy/handlers.py\",\n \"doc\": \"فراخوانی handler بر اساس نام.\\n\\nپارامترها:\\n- name: نام handler.\\n- args: آرگومان‌های اضافی موقعیتی.\\n- kwargs: آرگومان‌های اضافی کلیدی.\\n\\nخروجی:\\nکلاس handler ایجادشده.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__getattr__\",\n \"file\": \"rubpy/handlers.py\",\n \"doc\": \"دریافت handler ایجادشده دینامیک بر اساس نام.\\n\\nپارامترها:\\n- name: نام handler.\\n\\nخروجی:\\nکلاس handler ایجادشده.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"capitalize\",\n \"file\": \"rubpy/network.py\",\n \"doc\": \"تبدیل رشته snake_case به CamelCase.\\n\\nپارامترها:\\n- text: رشته با فرمت snake_case.\\n\\nخروجی:\\nرشته با فرمت CamelCase.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"Network\",\n \"file\": \"rubpy/network.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__init__\",\n \"file\": \"rubpy/network.py\",\n \"doc\": \"Network class initializition.\\n\\nParameters:\\n- client: Instance of rubpy.Client.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"_normalize_url\",\n \"file\": \"rubpy/network.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"_ensure_trailing_slash\",\n \"file\": \"rubpy/network.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"_is_managed_api\",\n \"file\": \"rubpy/network.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"_candidate_api_urls\",\n \"file\": \"rubpy/network.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"_promote_api\",\n \"file\": \"rubpy/network.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"close\",\n \"file\": \"rubpy/network.py\",\n \"doc\": \"Close the aiphttp.ClientSession\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_dcs\",\n \"file\": \"rubpy/network.py\",\n \"doc\": \"Retrieves API and WebSocket URLs with retry and exponential backoff.\\n\\nThis method fetches the data center configuration from Rubika's endpoint,\\nsets the API and WebSocket URLs on the client instance, and handles network\\nor server errors with retry logic.\\n\\nArgs:\\n max_retries (int, optional): Maximum number of retry attempts. Defaults to 3.\\n backoff (float, optional): Base delay in seconds for exponential backoff. Defaults to 1.0.\\n\\nReturns:\\n bool: True if the data center configuration was successfully retrieved.\\n\\nRaises:\\n NetworkError: If all retry attempts fail to fetch the data centers.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"request\",\n \"file\": \"rubpy/network.py\",\n \"doc\": \"Sends an HTTP POST request with retry logic and exponential backoff.\\n\\nThis method attempts to send a POST request to the specified URL using the\\nprovided JSON data. If the request fails due to network issues or server errors,\\nit retries up to `max_retries` times with a growing delay.\\n\\nArgs:\\n url (str): The target API endpoint.\\n data (dict): The JSON-serializable payload to send.\\n max_retries (int, optional): Maximum number of retry attempts. Defaults to 3.\\n backoff (float, optional): Base delay in seconds for exponential backoff. Defaults to 1.0.\\n\\nReturns:\\n dict: The parsed JSON response from the server.\\n\\nRaises:\\n NetworkError: If the request fails after all retry attempts.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"send\",\n \"file\": \"rubpy/network.py\",\n \"doc\": \"Send request to Rubika's API\\n\\nParameters:\\n- kwargs: Request parameters\\n\\nReturns:\\n- JSON-decoded response.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"handle_update\",\n \"file\": \"rubpy/network.py\",\n \"doc\": \"Dispatches incoming updates to the registered handlers.\\n\\nThis method iterates over all registered client handlers and invokes the one\\nwhose name matches the incoming update type. Handlers can be coroutine functions\\nor regular functions (executed in a background thread). If a handler raises\\n`StopHandler`, it halts further processing of that update.\\n\\nArgs:\\n name (str): The name/type of the incoming update (e.g. \\\"message\\\", \\\"chat\\\").\\n update (dict): The update payload received from the server.\\n\\nReturns:\\n None\\n\\nLogs:\\n - Errors during handler execution, including traceback.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_updates\",\n \"file\": \"rubpy/network.py\",\n \"doc\": \"Continuously listens for updates from Rubika's WebSocket API,\\nmaintaining connection with automatic reconnection logic.\\n\\nThis coroutine establishes a persistent WebSocket connection to Rubika,\\nperforms handshake authentication, and listens for incoming messages.\\nIf the connection drops or times out, it waits briefly and reconnects.\\nIt also launches a background task to keep the socket alive.\\n\\nReturns:\\n None\\n\\nLogs:\\n - Warning on connection failures or errors during communication.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"keep_socket\",\n \"file\": \"rubpy/network.py\",\n \"doc\": \"Maintains the WebSocket connection by periodically sending pings\\nand checking for chat updates.\\n\\nThis coroutine runs indefinitely, sending an empty JSON object\\nto the server every 10 seconds to keep the connection alive. If the\\nWebSocket is closed or an exception occurs, it logs a warning and retries.\\n\\nReturns:\\n None\\n\\nLogs:\\n - Warning if the connection check or ping fails.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"handle_text_message\",\n \"file\": \"rubpy/network.py\",\n \"doc\": \"Handles incoming text messages received via WebSocket.\\n\\nThis method decrypts the incoming `data_enc` field using the client's key,\\nextracts updates, and dispatches them asynchronously to the appropriate handler(s).\\n\\nArgs:\\n msg_data (dict): Parsed JSON dictionary received from the WebSocket.\\n\\nReturns:\\n None\\n\\nLogs:\\n - Debug message if `data_enc` is missing.\\n - Error message if decryption or handling fails.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"upload_file\",\n \"file\": \"rubpy/network.py\",\n \"doc\": \"Uploads a file to Rubika with chunked transfer and retry logic.\\n\\nSupports both file path and raw bytes input. Uploads in chunks and\\nprovides progress updates via optional callback. If the server requests\\nreinitialization (e.g. due to expired upload credentials), it automatically\\nresets and resumes the process.\\n\\nArgs:\\n file (str or bytes): File path or bytes to upload.\\n mime (str, optional): MIME type of the file. Defaults to file extension.\\n file_name (str, optional): Name of the file to assign. Required for bytes input.\\n chunk (int, optional): Chunk size in bytes. Defaults to 1MB.\\n callback (callable, optional): Function or coroutine for progress reporting.\\n Called with (total_size, uploaded_bytes).\\n max_retries (int, optional): Max retry attempts per chunk. Defaults to 3.\\n backoff (float, optional): Initial delay (in seconds) for exponential retry backoff. Defaults to 1.0.\\n\\nReturns:\\n Update: An object containing metadata about the uploaded file (dc_id, file_id, size, mime, etc.).\\n\\nRaises:\\n ValueError: If file path is invalid or file_name is missing for bytes input.\\n TypeError: If the file argument is neither str nor bytes.\\n Exception: If the upload fails after retries.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"download\",\n \"file\": \"rubpy/network.py\",\n \"doc\": \"Download a file from Rubika using its file ID and access hash.\\n\\nThis function supports downloading files either to memory (as bytes)\\nor saving directly to disk. It also supports parallel downloading using\\nasyncio.gather and provides retry logic with exponential backoff.\\n\\nArgs:\\n dc_id (int): Data center ID.\\n file_id (int): Unique identifier of the file.\\n access_hash (str): Access hash associated with the file.\\n size (int): Total size of the file in bytes.\\n chunk (int, optional): Size of each download chunk in bytes. Defaults to 131072 (128 KB).\\n callback (callable, optional): A function or coroutine called with (total_size, downloaded_size)\\n to report progress.\\n gather (bool, optional): If True, downloads chunks in parallel using asyncio.gather. Defaults to False.\\n save_as (str, optional): If specified, path to save the downloaded file. If None, returns file content.\\n max_retries (int, optional): Maximum number of retry attempts for each chunk. Defaults to 3.\\n backoff (float, optional): Base delay (in seconds) for exponential backoff. Defaults to 1.0.\\n\\nReturns:\\n bytes or str: The downloaded file content as bytes (if `save_as` is None),\\n or the path to the saved file (if `save_as` is specified).\\n\\nRaises:\\n None explicitly, but logs warnings and errors internally on failed retries or callback exceptions.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"add_candidate\",\n \"file\": \"rubpy/network.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"handle_callback\",\n \"file\": \"rubpy/network.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"upload_chunk\",\n \"file\": \"rubpy/network.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"fetch_chunk\",\n \"file\": \"rubpy/network.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"handle_callback\",\n \"file\": \"rubpy/network.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"async_to_sync\",\n \"file\": \"rubpy/sync.py\",\n \"doc\": \"Wrap an asynchronous function or asynchronous generator method\\nto make it synchronous.\\n\\nParameters:\\n- obj: Object containing the method.\\n- name: Name of the method to wrap.\\n\\nReturns:\\nWrapped synchronous function or generator.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"wrap_methods\",\n \"file\": \"rubpy/sync.py\",\n \"doc\": \"Wrap asynchronous methods in a class to make them synchronous.\\n\\nParameters:\\n- source: Class containing asynchronous methods.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"wrap_types_methods\",\n \"file\": \"rubpy/sync.py\",\n \"doc\": \"Wrap asynchronous methods in types' classes to make them synchronous.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"wrap_models_methods\",\n \"file\": \"rubpy/sync.py\",\n \"doc\": \"Wrap asynchronous methods in models' classes to make them synchronous.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"async_to_sync_gen\",\n \"file\": \"rubpy/sync.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"async_to_sync_wrap\",\n \"file\": \"rubpy/sync.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"anext\",\n \"file\": \"rubpy/sync.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"coro_wrapper\",\n \"file\": \"rubpy/sync.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"is_rubika_link\",\n \"file\": \"rubpy/utils.py\",\n \"doc\": \"Check if the given string contains a Rubika link.\\n\\n:param string: Input string to check.\\n:return: True if the string contains a Rubika link, False otherwise.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"is_group_link\",\n \"file\": \"rubpy/utils.py\",\n \"doc\": \"Check if the given string contains a Rubika group link.\\n\\n:param string: Input string to check.\\n:return: True if the string contains a Rubika group link, False otherwise.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"is_channel_link\",\n \"file\": \"rubpy/utils.py\",\n \"doc\": \"Check if the given string contains a Rubika channel link.\\n\\n:param string: Input string to check.\\n:return: True if the string contains a Rubika channel link, False otherwise.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"is_username\",\n \"file\": \"rubpy/utils.py\",\n \"doc\": \"Check if the given string contains a Rubika username.\\n\\n:param string: Input string to check.\\n:return: True if the string contains a Rubika username, False otherwise.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_rubika_links\",\n \"file\": \"rubpy/utils.py\",\n \"doc\": \"Extract Rubika links from the given string.\\n\\n:param string: Input string to extract links from.\\n:return: List of Rubika links found in the string.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_group_links\",\n \"file\": \"rubpy/utils.py\",\n \"doc\": \"Extract Rubika group links from the given string.\\n\\n:param string: Input string to extract group links from.\\n:return: List of Rubika group links found in the string.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_channel_links\",\n \"file\": \"rubpy/utils.py\",\n \"doc\": \"Extract Rubika channel links from the given string.\\n\\n:param string: Input string to extract channel links from.\\n:return: List of Rubika channel links found in the string.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_usernames\",\n \"file\": \"rubpy/utils.py\",\n \"doc\": \"Extract Rubika usernames from the given string.\\n\\n:param string: Input string to extract usernames from.\\n:return: List of Rubika usernames found in the string.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"Bold\",\n \"file\": \"rubpy/utils.py\",\n \"doc\": \"Make the text bold.\\n\\n:param text: Input text to be formatted.\\n:return: Bold formatted text.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"Italic\",\n \"file\": \"rubpy/utils.py\",\n \"doc\": \"Make the text italic.\\n\\n:param text: Input text to be formatted.\\n:return: Italic formatted text.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"Underline\",\n \"file\": \"rubpy/utils.py\",\n \"doc\": \"Underline the text.\\n\\n:param text: Input text to be formatted.\\n:return: Underlined text.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"Strike\",\n \"file\": \"rubpy/utils.py\",\n \"doc\": \"Add strike-through to the text.\\n\\n:param text: Input text to be formatted.\\n:return: Text with strike-through.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"Spoiler\",\n \"file\": \"rubpy/utils.py\",\n \"doc\": \"Format the text as a spoiler.\\n\\n:param text: Input text to be formatted.\\n:return: Spoiler formatted text.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"Code\",\n \"file\": \"rubpy/utils.py\",\n \"doc\": \"Format the text as code.\\n\\n:param text: Input text to be formatted.\\n:return: Code formatted text.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"Mention\",\n \"file\": \"rubpy/utils.py\",\n \"doc\": \"Mention a user with a specific object GUID.\\n\\n:param text: Text to be mentioned.\\n:param object_guid: GUID of the mentioned object.\\n:return: Mention formatted text.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"Hyperlink\",\n \"file\": \"rubpy/utils.py\",\n \"doc\": \"Create a hyperlink with the provided text and link.\\n\\n:param text: Text for the hyperlink.\\n:param link: URL for the hyperlink.\\n:return: Hyperlink formatted text.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"AntiSpam\",\n \"file\": \"rubpy/utils.py\",\n \"doc\": \"Advanced Anti-Spam System for Bots (Groups & Private)\\n\\nFeatures:\\n- Per chat_id spam protection (group & private)\\n- Max messages per time window\\n- Auto block duration\\n- Auto clear expired blocks\\n- Max message length check\\n\\nExample:\\n--------\\nantispam = AntiSpam()\\n\\n# Check spam in group\\nif await antispam.is_spammer(chat_id=123, user_id=456, message=\\\"hello\\\"):\\n print(\\\"User is spamming in group!\\\")\\n\\n# Check spam in private chat\\nif await antispam.is_spammer(chat_id=456, message=\\\"hi\\\"):\\n print(\\\"User is spamming in private!\\\")\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__init__\",\n \"file\": \"rubpy/utils.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"_make_key\",\n \"file\": \"rubpy/utils.py\",\n \"doc\": \"Generate unique key for spam tracking\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"is_spammer\",\n \"file\": \"rubpy/utils.py\",\n \"doc\": \"Check if user is spammer\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"_auto_clear\",\n \"file\": \"rubpy/utils.py\",\n \"doc\": \"Auto clear expired blocks to free memory\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"has_time_passed\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": \"Check if a certain amount of time has passed since the last time.\\n\\nArgs:\\n last_time: The last time in seconds.\\n seconds: The amount of time to check for.\\n\\nReturns:\\n bool: True if the time has passed, False otherwise.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"BotClient\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": \"Asynchronous client for managing Rubika bot interactions.\\n\\nAttributes:\\n token: Bot authentication token provided by Rubika.\\n base_url: The base URL for API requests.\\n handlers: A dictionary of registered handlers.\\n start_handlers: A list of registered startup handlers.\\n shutdown_handlers: A list of registered shutdown handlers.\\n middlewares: A list of registered middleware functions.\\n session: The active aiohttp session.\\n running: A flag indicating whether the client is running.\\n next_offset_id: The next offset ID for API requests.\\n processed_messages: A deque of processed messages.\\n rate_limit: The minimum delay in seconds between API requests.\\n last_request_time: The last time an API request was made.\\n first_get_updates: A flag indicating whether this is the first get updates request.\\n use_webhook: A flag indicating whether the client should operate in webhook mode.\\n timeout: The overall timeout for API requests.\\n connector: An optional shared aiohttp connector instance.\\n max_retries: The maximum number of retries for retryable responses.\\n backoff_factor: The base delay in seconds for exponential backoff.\\n retry_statuses: A set of HTTP status codes that should trigger retries.\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"_format_base_url\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__init__\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": \"Initialize a new :class:`BotClient` instance.\\n\\nArgs:\\n token: Bot authentication token provided by Rubika.\\n rate_limit: Minimum delay in seconds between API requests.\\n use_webhook: Whether the client should operate in webhook mode.\\n timeout: Overall timeout for API requests.\\n connector: Optional shared aiohttp connector instance.\\n max_retries: Maximum number of retries for retryable responses.\\n backoff_factor: Base delay (in seconds) for exponential backoff.\\n retry_statuses: HTTP status codes that should trigger retries.\\n fallback_urls: Additional base URL templates to try if the primary URL fails.\\n ignore_timeout: Whether to keep retrying indefinitely on Bot API Timeout errors.\\n persist_offset: Persist \\\"next_offset_id\\\" to disk during long polling when True.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"_normalize_parse_mode\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"_resolve_parse_mode\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"_apply_text_formatting\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": \"Apply text formatting (parse_mode) and metadata to the payload.\\n\\nArgs:\\n payload: The request payload dictionary to update.\\n text: The text content to format.\\n parse_mode: The parse mode to use (Markdown, HTML, or None).\\n metadata: Optional metadata to include in the payload.\\n \\nReturns:\\n The resolved parse mode that was applied.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"_apply_text_parse_mode\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": \"Deprecated: Use _apply_text_formatting instead.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"on_start\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": \"Decorator to register startup handlers.\\n\\nExample:\\n @bot.on_start()\\n async def hello(bot):\\n print(\\\"Bot started!\\\")\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__aenter__\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": \"Asynchronous context manager entry point.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__aexit__\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": \"Ensure the client stops when leaving an async context.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__enter__\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": \"Synchronous context manager entry point.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__exit__\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": \"Ensure the client stops when leaving a sync context.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"_rate_limit_delay\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": \"Enforce the rate limit by waiting for a certain amount of time.\\n\\nThis method checks the time elapsed since the last request and waits\\nfor the remaining time if necessary.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"start\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": \"Start the client session and execute registered startup hooks.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"stop\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": \"Stop the client and run shutdown hooks.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"on_shutdown\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": \"Decorator to register shutdown handlers.\\n\\nExample:\\n @bot.on_shutdown()\\n async def bye(bot):\\n print(\\\"Bot stopped!\\\")\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"middleware\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": \"Decorator to register a middleware function.\\n\\nMiddleware receives (bot, update, next_middleware).\\nIt must call `await next_middleware()` to continue chain.\\n\\nExample:\\n @bot.middleware()\\n async def logger(bot, update, call_next):\\n print(\\\"🔹 Update received:\\\", update)\\n await call_next()\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"enable_plugins\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": \"Enable the given plugins or the configured defaults.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"disable_plugins\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": \"Disable provided plugins or all enabled plugins when omitted.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"register_plugin\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": \"Register a plugin class with the internal manager.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"_make_request\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": \"Perform an API request with retry and response validation.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"_ensure_session\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": \"Ensure there is an open aiohttp session available for use.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"_close_session\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": \"Close the active aiohttp session if it exists.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"_set_base_url_index\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"_try_next_base_url\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"_offset_storage_path\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": \"Build and memoize the file path for persisting offset IDs.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"_load_persisted_offset\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": \"Load the last persisted offset ID from disk, if available.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"_persist_offset_id\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": \"Persist or clear the stored offset ID based on the provided value.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"_is_retryable_status\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"_should_force_retry\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"_sleep_backoff\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": \"Wait for an exponentially increasing delay between retries.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_me\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"send_message\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"send_sticker\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"send_file\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"send_music\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"send_voice\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"request_send_file\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"upload_file\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_file\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"send_poll\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"send_location\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"send_contact\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_updates\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": \"Fetch updates from the server.\\n\\nArgs:\\n limit (int): Maximum number of updates to fetch.\\n offset_id (str): Offset for pagination.\\n\\nReturns:\\n List[Update]: Parsed updates as Update objects.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"updater\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_chat\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"forward_message\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"edit_message_text\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"edit_message_keypad\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"delete_message\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"set_commands\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"update_bot_endpoints\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_chat_member\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"pin_chat_message\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"unpin_chat_message\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"unpin_all_chat_messages\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_chat_administrators\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_chat_member_count\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"ban_chat_member\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"unban_chat_member\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_chat_member\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"promote_chat_member\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"set_chat_permissions\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"edit_chat_keypad\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"on_update\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"add_handler\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": \"Register a new handler with given filters.\\n\\nArgs:\\n handler (Callable): The function to handle updates.\\n *filters (Filter): One or more filters that must pass.\\n\\nReturns:\\n str: Unique handler key (can be used to remove handler later).\\n\\nExample:\\n key = bot.add_handler(my_handler, TextFilter(\\\"hello\\\"))\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"remove_handler\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": \"Remove a registered handler.\\n\\nArgs:\\n handler_key (str): The unique key returned by add_handler/on_update.\\n handler (Optional[Callable]): Specific handler function to remove.\\n If None, removes all handlers under the key.\\n\\nReturns:\\n bool: True if something was removed, False otherwise.\\n\\nExample:\\n bot.remove_handler(key)\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"_parse_update\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"process_update\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": \"Run middlewares in order before dispatching the update.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"_dispatch_update\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": \"Invoke the first matching handler for the provided update.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"_extract_message_id\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"_filters_pass\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"handle_webhook\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": \"Process incoming webhook requests and queue updates for handling.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"run\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": \"Run the client in either webhook or polling mode.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"close\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": \"Close the underlying HTTP session.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"download_file\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": \"Downloads a file by file_id.\\n\\nArgs:\\n file_id (str): Unique identifier of the file.\\n save_as (Optional[str]): File path to save. Ignored if as_bytes=True.\\n progress (Optional[Callable[[int, int], None]]): Optional progress callback.\\n chunk_size (int): Download chunk size in bytes.\\n as_bytes (bool): If True, returns the content as bytes instead of saving.\\n file_name (Optional[str]): File name to save. Ignored if save_as is provided.\\n timeout (Optional[Union[int, float]]): Timeout for the download request.\\nReturns:\\n str: Path to saved file (if as_bytes=False)\\n bytes: Content of the file (if as_bytes=True)\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"decorator\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"decorator\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"decorator\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"decorator\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"run_middlewares\",\n \"file\": \"rubpy/bot/bot.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"DictLike\",\n \"file\": \"rubpy/bot/dict_like.py\",\n \"doc\": \"A class that allows attribute access via dictionary-like key lookup.\\n\\nProvides dictionary-style access (`obj[key]`) to attributes.\\nAlso supports `get(key, default)` method.\\n\\nMethods:\\n find_key(key): Recursively searches for a key in nested attributes\\n and returns its value if found, else raises KeyError.\\n\\nExample:\\n >>> class Example(DictLike):\\n ... def __init__(self):\\n ... self.a = 10\\n ... self.b = DictLike()\\n ... self.b.c = 20\\n ... self.b.d = DictLike()\\n ... self.b.d.e = 30\\n ...\\n >>> ex = Example()\\n >>> ex['a']\\n 10\\n >>> ex.get('a')\\n 10\\n >>> ex.find_key('e')\\n 30\\n >>> ex.find_key('x')\\n Traceback (most recent call last):\\n ...\\n KeyError: 'x'\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__getitem__\",\n \"file\": \"rubpy/bot/dict_like.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get\",\n \"file\": \"rubpy/bot/dict_like.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"find_key\",\n \"file\": \"rubpy/bot/dict_like.py\",\n \"doc\": \"Recursively searches for the given key in self and nested DictLike attributes.\\n\\nArgs:\\n key (str): The key to search for.\\n\\nReturns:\\n Any: The value corresponding to the key if found.\\n\\nRaises:\\n KeyError: If the key is not found in self or nested attributes.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__post_init__\",\n \"file\": \"rubpy/bot/dict_like.py\",\n \"doc\": \"Automatically convert nested dictionaries to DictLike subclasses after initialization.\\nThis runs automatically in dataclasses that inherit from DictLike.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"STREnum\",\n \"file\": \"rubpy/bot/enums.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"ChatTypeEnum\",\n \"file\": \"rubpy/bot/enums.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"ForwardedFromEnum\",\n \"file\": \"rubpy/bot/enums.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"PaymentStatusEnum\",\n \"file\": \"rubpy/bot/enums.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"PollStatusEnum\",\n \"file\": \"rubpy/bot/enums.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"LiveLocationStatusEnum\",\n \"file\": \"rubpy/bot/enums.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"ButtonSelectionTypeEnum\",\n \"file\": \"rubpy/bot/enums.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"ButtonSelectionSearchEnum\",\n \"file\": \"rubpy/bot/enums.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"ButtonSelectionGetEnum\",\n \"file\": \"rubpy/bot/enums.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"ButtonCalendarTypeEnum\",\n \"file\": \"rubpy/bot/enums.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"ButtonTextboxTypeKeypadEnum\",\n \"file\": \"rubpy/bot/enums.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"ButtonTextboxTypeLineEnum\",\n \"file\": \"rubpy/bot/enums.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"ButtonLocationTypeEnum\",\n \"file\": \"rubpy/bot/enums.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"ButtonTypeEnum\",\n \"file\": \"rubpy/bot/enums.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"ButtonLinkTypeEnum\",\n \"file\": \"rubpy/bot/enums.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"MessageSenderEnum\",\n \"file\": \"rubpy/bot/enums.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"UpdateTypeEnum\",\n \"file\": \"rubpy/bot/enums.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"ChatKeypadTypeEnum\",\n \"file\": \"rubpy/bot/enums.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"UpdateEndpointTypeEnum\",\n \"file\": \"rubpy/bot/enums.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"APIException\",\n \"file\": \"rubpy/bot/exceptions.py\",\n \"doc\": \"Exception for handling Rubika API errors.\\n\\nAttributes:\\n status (str): Response status from API.\\n dev_message (str): Optional developer message from API.\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__init__\",\n \"file\": \"rubpy/bot/exceptions.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__str__\",\n \"file\": \"rubpy/bot/exceptions.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"maybe_instance\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"FilterMeta\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"Filter\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"AndFilter\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"OrFilter\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"NotFilter\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"text\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": \"Filter for checking message text content.\\n\\nThis filter can match messages based on:\\n- An exact string match.\\n- A regular expression pattern.\\n- Or, if no value is given, it simply checks that the message has any text.\\n\\nArgs:\\n text (str, optional): The exact text or regex pattern to match.\\n regex (bool): If True, `text` is treated as a regular expression.\\n\\nReturns:\\n bool: True if the message text matches the given criteria.\\n\\nExample:\\n >>> from rubpy import BotClient\\n >>> from rubpy.bot.filters import text\\n >>>\\n >>> bot = BotClient(\\\"your_auth_token\\\")\\n >>>\\n >>> # Match any text message\\n >>> @bot.on_update(text)\\n ... async def any_text(c, update):\\n ... await c.send_message(update.chat_id, \\\"You sent some text!\\\")\\n >>>\\n >>> # Match exact text\\n >>> @bot.on_update(text(\\\"hello\\\"))\\n ... async def exact_match(c, update):\\n ... await c.send_message(update.chat_id, \\\"You said hello!\\\")\\n >>>\\n >>> # Match using regex\\n >>> @bot.on_update(text(r\\\"^/start.*\\\", regex=True))\\n ... async def regex_match(c, update):\\n ... await c.send_message(update.chat_id, \\\"Start command detected!\\\")\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"commands\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": \"Advanced filter for detecting bot commands (e.g. /start, !help, test).\\n\\nFeatures:\\n - Supports multiple command prefixes (default: / and !).\\n - Case-insensitive option.\\n - Matches both exact commands and commands with arguments.\\n - Supports single or multiple commands.\\n\\nArgs:\\n commands (Union[str, List[str]]): Command or list of commands (without prefix).\\n prefixes (List[str], optional): Allowed prefixes (default: [\\\"/\\\", \\\"!\\\"]).\\n case_sensitive (bool, optional): Whether command matching is case-sensitive. Default False.\\n allow_no_prefix (bool, optional): If True, matches commands even without prefix. Default False.\\n\\nExample:\\n >>> @bot.on_update(commands(\\\"start\\\"))\\n ... async def handle_start(c, update):\\n ... await update.reply(\\\"Welcome to the bot!\\\")\\n\\n >>> @bot.on_update(commands([\\\"help\\\", \\\"about\\\"], prefixes=[\\\"/\\\", \\\".\\\", \\\"!\\\"]))\\n ... async def handle_help(c, update):\\n ... await update.reply(\\\"Help/About detected!\\\")\\n\\n >>> @bot.on_update(commands(\\\"test\\\", allow_no_prefix=True))\\n ... async def handle_test(c, update):\\n ... await update.reply(\\\"Matched with or without prefix\\\")\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"update_type\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": \"Filter for matching specific update types.\\n\\nThis filter checks if the update's type matches one or more given update types.\\nIt supports both `Update` objects (checking their `type` attribute)\\nand `InlineMessage` objects (matched by the string `\\\"InlineMessage\\\"`).\\n\\nArgs:\\n update_types (Union[str, List[str]]): A single update type string or a list of update type strings.\\n\\nReturns:\\n bool: True if the update's type matches one of the specified types.\\n\\nExample:\\n >>> from rubpy import BotClient\\n >>> from your_module import update_type\\n >>>\\n >>> bot = BotClient(\\\"your_auth_token\\\")\\n >>>\\n >>> # Match only message updates\\n >>> @bot.on_update(update_type(\\\"NewMessage\\\"))\\n ... async def handle_message_update(c, update):\\n ... await c.send_message(update.chat_id, \\\"Received a message update.\\\")\\n >>>\\n >>> # Match multiple types including inline messages\\n >>> @bot.on_update(update_type([\\\"NewMessage\\\", \\\"UpdatedMessage\\\", \\\"InlineMessage\\\"]))\\n ... async def handle_multiple_types(c, update):\\n ... await c.send_message(update.chat_id, \\\"Received one of several update types.\\\")\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"private\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": \"Filter for detecting messages sent in private (one-on-one) chats.\\n\\nThis filter checks whether the sender of the message is a regular user (i.e., not a group or bot).\\nIt's typically used to ensure that a handler only runs for messages from private chats.\\n\\nReturns:\\n bool: True if the message was sent by a user in a private chat, otherwise False.\\n\\nExample:\\n >>> from rubpy import BotClient\\n >>> from rubpy.bot.models import Update\\n >>> from rubpy.bot.filters import private\\n >>>\\n >>> bot_client = BotClient(\\\"your_bot_token\\\")\\n >>>\\n >>> @bot_client.on_update(private)\\n ... async def handle_private_message(c, update):\\n ... await c.send_message(update.chat_id, \\\"You are chatting privately with the bot.\\\")\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"group\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": \"Filter for detecting messages sent from groups.\\n\\nThis filter checks whether the sender of the message is of type `'Group'`.\\nIt's useful when you want a handler to be triggered only for messages\\noriginating from group chats.\\n\\nReturns:\\n bool: True if the message was sent from a group, otherwise False.\\n\\nExample:\\n >>> from rubpy import BotClient\\n >>> from rubpy.bot.models import Update\\n >>> from rubpy.bot.filters import group\\n >>>\\n >>> bot_client = BotClient(\\\"your_bot_token\\\")\\n >>>\\n >>> @bot_client.on_update(group)\\n ... async def handle_group_messages(c, update):\\n ... await c.send_message(update.chat_id, \\\"This message came from a group!\\\")\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"channel\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": \"Filter for detecting messages sent from groups.\\n\\nThis filter checks whether the sender of the message is of type `'Group'`.\\nIt's useful when you want a handler to be triggered only for messages\\noriginating from group chats.\\n\\nReturns:\\n bool: True if the message was sent from a group, otherwise False.\\n\\nExample:\\n >>> from rubpy import BotClient\\n >>> from rubpy.bot.models import Update\\n >>> from rubpy.bot.filters import group\\n >>>\\n >>> bot_client = BotClient(\\\"your_bot_token\\\")\\n >>>\\n >>> @bot_client.on_update(group)\\n ... async def handle_group_messages(c, update):\\n ... await c.send_message(update.chat_id, \\\"This message came from a group!\\\")\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"bot\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": \"Filter for detecting messages sent by bots.\\n\\nThis filter checks whether the sender of the message is of type `'Bot'`.\\nIt supports both regular updates and inline messages.\\n\\nReturns:\\n bool: True if the message was sent by a bot, otherwise False.\\n\\nExample:\\n >>> from rubpy import BotClient\\n >>> from rubpy.bot.models import Update\\n >>> from rubpy.bot.filters import bot\\n >>>\\n >>> bot_client = BotClient(\\\"your_bot_token\\\")\\n >>>\\n >>> @bot_client.on_update(bot)\\n ... async def handle_bot_messages(c, update):\\n ... await c.send_message(update.chat_id, \\\"A bot sent this message!\\\")\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"chat\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": \"Filter for matching specific chat IDs.\\n\\nThis filter allows you to restrict a handler to updates coming from one or more specified chat IDs.\\nIt supports both a single chat ID (as a string) and a list of chat IDs.\\n\\nArgs:\\n chat_id (Union[list, str]): A single chat ID or a list of chat IDs to allow.\\n\\nExample:\\n >>> from rubpy import BotClient\\n >>> from rubpy.bot.models import Update\\n >>> from rubpy.bot.filters import chat\\n >>>\\n >>> bot = BotClient(\\\"your_bot_token\\\")\\n >>>\\n >>> @bot.on_update(chat(\\\"b0_test_chat\\\"))\\n ... async def only_for_test_chat(c, update):\\n ... await c.send_message(update.chat_id, \\\"Hello from test chat!\\\")\\n >>>\\n >>> @bot.on_update(chat([\\\"b0_admin\\\", \\\"b0_mod\\\"]))\\n ... async def for_admins_and_mods(c, update):\\n ... await c.send_message(update.chat_id, \\\"Hello admins and moderators!\\\")\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"button\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": \"Filter for button click interactions. Supports both direct string comparison and regex matching.\\n\\nThis filter is useful for handling button presses in a bot framework. It checks whether\\nthe button's identifier (such as `button_id` or `callback_data`) matches the expected value.\\n\\nArgs:\\n button_id (str): The value to compare directly or match using a regex pattern.\\n regex (bool): If True, treats the button_id as a regular expression.\\n\\nExample:\\n >>> from rubpy import BotClient\\n >>> from rubpy.bot.models import Update\\n >>> from rubpy.bot.filters import button\\n >>>\\n >>> bot = BotClient(\\\"your_bot_token\\\")\\n >>>\\n >>> @bot.on_update(button(\\\"btn_123\\\"))\\n ... async def handle_btn(c, update):\\n ... await c.send_message(update.chat_id, \\\"Button 123 clicked!\\\")\\n >>>\\n >>> @bot.on_update(button(r\\\"btn_\\\\d+\\\", regex=True))\\n ... async def handle_regex_btn(c, update):\\n ... await c.send_message(update.chat_id, \\\"Numbered button clicked!\\\")\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"forward\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": \"Filter for checking forwarded messages.\\n\\nReturns:\\n bool: True if the message forward matches the given criteria.\\n\\nExample:\\n >>> from rubpy import BotClient\\n >>> from rubpy.bot.filters import forward\\n >>>\\n >>> bot = BotClient(\\\"your_bot_token\\\")\\n >>>\\n >>> # Match any forward message\\n >>> @bot.on_update(forward)\\n ... async def any_forward(c, update):\\n ... await update.reply(\\\"You sent some forward!\\\")\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"is_edited\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": \"Filter for checking edited messages.\\n\\nReturns:\\n bool: False or True\\n\\nExample:\\n >>> from rubpy import BotClient\\n >>> from rubpy.bot import filters\\n >>>\\n >>> bot = BotClient(\\\"your_bot_token\\\")\\n >>>\\n >>> # Match any is_edited message\\n >>> @bot.on_update(filters.is_edited)\\n ... async def any_edited(c, update):\\n ... await update.delete()\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"edited\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"sender_type\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": \"Filter for matching specific sender types.\\n\\nThis filter is used to allow or restrict handlers based on the `sender_type` field in an update.\\nIt supports both a single sender type as a string, or a list of allowed sender types.\\n\\nArgs:\\n types (Union[List[str], str]): A single sender type or a list of allowed sender types.\\n Examples of sender types may include \\\"user\\\", \\\"bot\\\", \\\"channel\\\", etc.\\n\\nExample:\\n >>> from rubpy import BotClient\\n >>> from rubpy.bot.models import Update\\n >>> from rubpy.bot.filters import sender_type\\n >>>\\n >>> bot = BotClient(\\\"your_bot_token\\\")\\n >>>\\n >>> @bot.on_update(sender_type(\\\"User\\\"))\\n ... async def handle_user_message(c, update):\\n ... await c.send_message(update.chat_id, \\\"Hello user!\\\")\\n >>>\\n >>> @bot.on_update(sender_type([\\\"Bot\\\", \\\"Channel\\\"]))\\n ... async def handle_bots_or_channels(c, update):\\n ... await c.send_message(update.chat_id, \\\"Hello bot or channel!\\\")\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"has_aux_data\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": \"Filter for checking aux_data messages.\\n\\nReturns:\\n bool: False or True\\n\\nExample:\\n >>> from rubpy import BotClient\\n >>> from rubpy.bot import filters\\n >>>\\n >>> bot = BotClient(\\\"your_bot_token\\\")\\n >>>\\n >>> # Match any aux_data message\\n >>> @bot.on_update(filters.has_aux_data)\\n ... async def any_has_aux_data(c, update):\\n ... await update.reply(\\\"has aux data\\\")\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"file\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": \"Filter for checking file messages.\\n\\nReturns:\\n bool: False or True\\n\\nExample:\\n >>> from rubpy import BotClient\\n >>> from rubpy.bot import filters\\n >>>\\n >>> bot = BotClient(\\\"your_bot_token\\\")\\n >>>\\n >>> # Match any file message\\n >>> @bot.on_update(filters.file)\\n ... async def any_file(c, update):\\n ... await update.reply(\\\"new file\\\")\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"photo\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": \"Filter for checking photo messages.\\n\\nReturns:\\n bool: False or True\\n\\nExample:\\n >>> from rubpy import BotClient\\n >>> from rubpy.bot import filters\\n >>>\\n >>> bot = BotClient(\\\"your_bot_token\\\")\\n >>>\\n >>> # Match any photo message\\n >>> @bot.on_update(filters.photo)\\n ... async def any_photo(c, update):\\n ... await update.reply(\\\"new photo\\\")\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"video\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": \"Filter for checking video messages.\\n\\nReturns:\\n bool: False or True\\n\\nExample:\\n >>> from rubpy import BotClient\\n >>> from rubpy.bot import filters\\n >>>\\n >>> bot = BotClient(\\\"your_bot_token\\\")\\n >>>\\n >>> # Match any video message\\n >>> @bot.on_update(filters.video)\\n ... async def any_video(c, update):\\n ... await update.reply(\\\"new video\\\")\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"audio\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": \"Filter for checking audio messages.\\n\\nReturns:\\n bool: False or True\\n\\nExample:\\n >>> from rubpy import BotClient\\n >>> from rubpy.bot import filters\\n >>>\\n >>> bot = BotClient(\\\"your_bot_token\\\")\\n >>>\\n >>> # Match any audio message\\n >>> @bot.on_update(filters.audio)\\n ... async def any_audio(c, update):\\n ... await update.reply(\\\"new audio\\\")\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"voice\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": \"Filter for checking voice messages.\\n\\nReturns:\\n bool: False or True\\n\\nExample:\\n >>> from rubpy import BotClient\\n >>> from rubpy.bot import filters\\n >>>\\n >>> bot = BotClient(\\\"your_bot_token\\\")\\n >>>\\n >>> # Match any voice message\\n >>> @bot.on_update(filters.voice)\\n ... async def any_voice(c, update):\\n ... await update.reply(\\\"new voice\\\")\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"gif\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": \"Filter for checking gif messages.\\n\\nReturns:\\n bool: False or True\\n\\nExample:\\n >>> from rubpy import BotClient\\n >>> from rubpy.bot import filters\\n >>>\\n >>> bot = BotClient(\\\"your_bot_token\\\")\\n >>>\\n >>> # Match any gif message\\n >>> @bot.on_update(filters.gif)\\n ... async def any_gif(c, update):\\n ... await update.reply(\\\"new gif\\\")\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"location\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": \"Filter for checking location messages.\\n\\nReturns:\\n bool: False or True\\n\\nExample:\\n >>> from rubpy import BotClient\\n >>> from rubpy.bot import filters\\n >>>\\n >>> bot = BotClient(\\\"your_bot_token\\\")\\n >>>\\n >>> # Match any location message\\n >>> @bot.on_update(filters.location)\\n ... async def any_location(c, update):\\n ... await update.reply(\\\"new location\\\")\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"sticker\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": \"Filter for checking sticker messages.\\n\\nReturns:\\n bool: False or True\\n\\nExample:\\n >>> from rubpy import BotClient\\n >>> from rubpy.bot import filters\\n >>>\\n >>> bot = BotClient(\\\"your_bot_token\\\")\\n >>>\\n >>> # Match any sticker message\\n >>> @bot.on_update(filters.sticker)\\n ... async def any_sticker(c, update):\\n ... await update.reply(\\\"new sticker\\\")\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"contact_message\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": \"Filter for checking contact_message messages.\\n\\nReturns:\\n bool: False or True\\n\\nExample:\\n >>> from rubpy import BotClient\\n >>> from rubpy.bot import filters\\n >>>\\n >>> bot = BotClient(\\\"your_bot_token\\\")\\n >>>\\n >>> # Match any contact_message message\\n >>> @bot.on_update(filters.contact_message)\\n ... async def any_contact_message(c, update):\\n ... await update.reply(\\\"new contact_message\\\")\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"poll\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": \"Filter for checking poll messages.\\n\\nReturns:\\n bool: False or True\\n\\nExample:\\n >>> from rubpy import BotClient\\n >>> from rubpy.bot import filters\\n >>>\\n >>> bot = BotClient(\\\"your_bot_token\\\")\\n >>>\\n >>> # Match any poll message\\n >>> @bot.on_update(filters.poll)\\n ... async def any_poll(c, update):\\n ... await update.reply(\\\"new poll\\\")\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"live_location\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": \"Filter for checking live_location messages.\\n\\nReturns:\\n bool: False or True\\n\\nExample:\\n >>> from rubpy import BotClient\\n >>> from rubpy.bot import filters\\n >>>\\n >>> bot = BotClient(\\\"your_bot_token\\\")\\n >>>\\n >>> # Match any live_location message\\n >>> @bot.on_update(filters.live_location)\\n ... async def any_live_location(c, update):\\n ... await update.reply(\\\"new live_location\\\")\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"replied\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"metadata\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"states\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": \"Self-contained states filter that stores states in-memory (no external libs).\\n\\n- Use as a filter instance: `s = states(\\\"awaiting_email\\\"); @bot.on_update(s) ...`\\n- Also exposes methods to set/get/clear state for a given update:\\n await s.set_state_for(update, \\\"awaiting_email\\\", expire=300)\\n await s.get_state_for(update)\\n await s.clear_state_for(update)\\n\\nArgs:\\n targets: None|str|List[str] - states to match (None => match any existing state).\\n match_mode: \\\"exact\\\"|\\\"regex\\\"|\\\"contains\\\"|\\\"any\\\" (default \\\"exact\\\")\\n scope: \\\"user\\\"|\\\"chat\\\"|\\\"both\\\" - where to look up the state keys in internal store\\n check_keys: list of keys to check inside update payload before checking internal store\\n auto_clear: bool - if True and matched => automatically clear stored state\\n set_on_match: Optional[str] - if provided, set this new state on match\\n expire: Optional[int] - default TTL (seconds) when using set_on_match (or when set_state_for uses expire)\\n invert: bool - invert the match result\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__and__\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__rand__\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__or__\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__ror__\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__invert__\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"check\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__and__\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__rand__\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__or__\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__ror__\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__invert__\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__init__\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"check\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__init__\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"check\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__init__\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"check\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__init__\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"check\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__init__\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"check\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__init__\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"check\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"check\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"check\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"check\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"check\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__init__\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"check\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__init__\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"check\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"check\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"check\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__init__\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"check\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"check\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"check\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"check\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"check\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"check\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"check\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"check\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"check\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"check\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"check\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"check\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"check\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"check\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"check\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__init__\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"_schedule_expiry\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"_set_store\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"_get_store\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"_clear_store\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"set_state_for\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": \"Set a state for the update's scope (user/chat) according to filter.scope.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_state_for\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": \"Get first available state from storage for the update (according to scope).\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"clear_state_for\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": \"Clear states (all keys derived from update).\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"_keys_for_update\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": \"Build one or two keys to try based on scope and available ids on update.\\nKeys look like \\\"user:{sender_id}\\\" and/or \\\"chat:{chat_id}\\\".\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"_extract_local_state\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": \"Try to read state directly from update payload keys (without using internal store).\\nReturns first found string value or None.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"_matches\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"check\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"_job\",\n \"file\": \"rubpy/bot/filters.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"File\",\n \"file\": \"rubpy/bot/models.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"Chat\",\n \"file\": \"rubpy/bot/models.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"ForwardedFrom\",\n \"file\": \"rubpy/bot/models.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"PaymentStatus\",\n \"file\": \"rubpy/bot/models.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"MessageTextUpdate\",\n \"file\": \"rubpy/bot/models.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"Bot\",\n \"file\": \"rubpy/bot/models.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"BotCommand\",\n \"file\": \"rubpy/bot/models.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"Sticker\",\n \"file\": \"rubpy/bot/models.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"ContactMessage\",\n \"file\": \"rubpy/bot/models.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"PollStatus\",\n \"file\": \"rubpy/bot/models.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"Poll\",\n \"file\": \"rubpy/bot/models.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"Location\",\n \"file\": \"rubpy/bot/models.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"LiveLocation\",\n \"file\": \"rubpy/bot/models.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"ButtonSelectionItem\",\n \"file\": \"rubpy/bot/models.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"ButtonSelection\",\n \"file\": \"rubpy/bot/models.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"ButtonCalendar\",\n \"file\": \"rubpy/bot/models.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"ButtonNumberPicker\",\n \"file\": \"rubpy/bot/models.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"ButtonStringPicker\",\n \"file\": \"rubpy/bot/models.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"ButtonTextbox\",\n \"file\": \"rubpy/bot/models.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"ButtonLocation\",\n \"file\": \"rubpy/bot/models.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"AuxData\",\n \"file\": \"rubpy/bot/models.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"JoinChannelData\",\n \"file\": \"rubpy/bot/models.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"OpenChatData\",\n \"file\": \"rubpy/bot/models.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"ButtonLink\",\n \"file\": \"rubpy/bot/models.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"Button\",\n \"file\": \"rubpy/bot/models.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"KeypadRow\",\n \"file\": \"rubpy/bot/models.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"Keypad\",\n \"file\": \"rubpy/bot/models.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"MessageKeypadUpdate\",\n \"file\": \"rubpy/bot/models.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"MessageId\",\n \"file\": \"rubpy/bot/models.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"MetaDataParts\",\n \"file\": \"rubpy/bot/models.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"Metadata\",\n \"file\": \"rubpy/bot/models.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"Message\",\n \"file\": \"rubpy/bot/models.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"Update\",\n \"file\": \"rubpy/bot/models.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"InlineMessage\",\n \"file\": \"rubpy/bot/models.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__post_init__\",\n \"file\": \"rubpy/bot/models.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__post_init__\",\n \"file\": \"rubpy/bot/models.py\",\n \"doc\": \"Automatically normalize specific Rubika links to deep-link format.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"delete\",\n \"file\": \"rubpy/bot/models.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"edit_text\",\n \"file\": \"rubpy/bot/models.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"message_id\",\n \"file\": \"rubpy/bot/models.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"reply\",\n \"file\": \"rubpy/bot/models.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"reply_file\",\n \"file\": \"rubpy/bot/models.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"reply_photo\",\n \"file\": \"rubpy/bot/models.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"reply_video\",\n \"file\": \"rubpy/bot/models.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"reply_voice\",\n \"file\": \"rubpy/bot/models.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"reply_music\",\n \"file\": \"rubpy/bot/models.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"reply_gif\",\n \"file\": \"rubpy/bot/models.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"delete\",\n \"file\": \"rubpy/bot/models.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"edit_keypad\",\n \"file\": \"rubpy/bot/models.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"download\",\n \"file\": \"rubpy/bot/models.py\",\n \"doc\": \"Downloads a file by file_id.\\n\\nArgs:\\n file_id (str): Unique identifier of the file.\\n save_as (Optional[str]): File path to save. Ignored if as_bytes=True.\\n progress (Optional[Callable[[int, int], None]]): Optional progress callback.\\n chunk_size (int): Download chunk size in bytes.\\n as_bytes (bool): If True, returns the content as bytes instead of saving.\\n\\nReturns:\\n str: Path to saved file (if as_bytes=False)\\n bytes: Content of the file (if as_bytes=True)\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"edit_text\",\n \"file\": \"rubpy/bot/models.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"edit_keypad\",\n \"file\": \"rubpy/bot/models.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"reply\",\n \"file\": \"rubpy/bot/models.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"reply_file\",\n \"file\": \"rubpy/bot/models.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"reply_photo\",\n \"file\": \"rubpy/bot/models.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"reply_voice\",\n \"file\": \"rubpy/bot/models.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"reply_music\",\n \"file\": \"rubpy/bot/models.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"reply_gif\",\n \"file\": \"rubpy/bot/models.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"reply_video\",\n \"file\": \"rubpy/bot/models.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"delete\",\n \"file\": \"rubpy/bot/models.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"Crypto\",\n \"file\": \"rubpy/crypto/crypto.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"decode_auth\",\n \"file\": \"rubpy/crypto/crypto.py\",\n \"doc\": \"Decode an auth string by applying character substitutions.\\n\\nArgs:\\n auth (str): The input auth string.\\n\\nReturns:\\n str: The decoded auth string.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"passphrase\",\n \"file\": \"rubpy/crypto/crypto.py\",\n \"doc\": \"Generate a passphrase from an auth string.\\n\\nArgs:\\n auth (str): The input auth string.\\n\\nReturns:\\n str: The generated passphrase.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"secret\",\n \"file\": \"rubpy/crypto/crypto.py\",\n \"doc\": \"Generate a random secret of the given length.\\n\\nArgs:\\n length (int): Length of the secret.\\n\\nReturns:\\n str: The generated secret.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"decrypt\",\n \"file\": \"rubpy/crypto/crypto.py\",\n \"doc\": \"Decrypt data using AES encryption.\\n\\nArgs:\\n data (str): The encrypted data.\\n key (str): The encryption key.\\n\\nReturns:\\n dict: The decrypted data as a dictionary.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"encrypt\",\n \"file\": \"rubpy/crypto/crypto.py\",\n \"doc\": \"Encrypt data using AES encryption.\\n\\nArgs:\\n data (str or dict): The data to be encrypted.\\n key (str): The encryption key.\\n\\nReturns:\\n str: The encrypted data as a string.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"sign\",\n \"file\": \"rubpy/crypto/crypto.py\",\n \"doc\": \"Sign data using an RSA private key.\\n\\nArgs:\\n private_key (str): The RSA private key.\\n data (str): The data to be signed.\\n\\nReturns:\\n str: The base64-encoded signature.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"create_keys\",\n \"file\": \"rubpy/crypto/crypto.py\",\n \"doc\": \"Generate RSA public and private keys.\\n\\nReturns:\\n tuple: A tuple containing the base64-encoded public key and the private key.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"decrypt_RSA_OAEP\",\n \"file\": \"rubpy/crypto/crypto.py\",\n \"doc\": \"Decrypt data using RSA OAEP encryption.\\n\\nArgs:\\n private_key (str): The RSA private key.\\n data (str): The encrypted data.\\n\\nReturns:\\n str: The decrypted data as a string.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"Access\",\n \"file\": \"rubpy/enums/chat_access_type.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"ChatAction\",\n \"file\": \"rubpy/enums/chat_action.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"ChatType\",\n \"file\": \"rubpy/enums/chat_type.py\",\n \"doc\": \"Chat type enumeration used in :obj:`~pyrogram.types.Chat`.\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"MessageMediaType\",\n \"file\": \"rubpy/enums/message_media_type.py\",\n \"doc\": \"Message media type\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"ParseMode\",\n \"file\": \"rubpy/enums/parse_mode.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"PollType\",\n \"file\": \"rubpy/enums/poll_type.py\",\n \"doc\": \"Poll type enumeration\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"ReactionType\",\n \"file\": \"rubpy/enums/reaction_type.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"ReportType\",\n \"file\": \"rubpy/enums/report_type.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"ReportTypeObject\",\n \"file\": \"rubpy/enums/report_type.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"Methods\",\n \"file\": \"rubpy/methods/__init__.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"Advanced\",\n \"file\": \"rubpy/methods/advanced/__init__.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"Builder\",\n \"file\": \"rubpy/methods/advanced/build.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"builder\",\n \"file\": \"rubpy/methods/advanced/build.py\",\n \"doc\": \"Build and send a request to the Rubika API.\\n\\nArgs:\\n - name (str): The API method name.\\n - tmp_session (bool, optional): Whether to use a temporary session. Defaults to False.\\n - encrypt (bool, optional): Whether to encrypt the data. Defaults to True.\\n - dict (bool, optional): Return the result as a dictionary. Defaults to False.\\n - input (dict, optional): The input data for the API method. Defaults to None.\\n\\nReturns:\\n - Union[rubpy.types.Update, dict]: Result of the API call.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"VoiceChatConnection\",\n \"file\": \"rubpy/methods/advanced/voice_chat_player.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"VoiceChatPlayer\",\n \"file\": \"rubpy/methods/advanced/voice_chat_player.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__init__\",\n \"file\": \"rubpy/methods/advanced/voice_chat_player.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"stop\",\n \"file\": \"rubpy/methods/advanced/voice_chat_player.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"pause\",\n \"file\": \"rubpy/methods/advanced/voice_chat_player.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"resume\",\n \"file\": \"rubpy/methods/advanced/voice_chat_player.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"replace_track\",\n \"file\": \"rubpy/methods/advanced/voice_chat_player.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_stats\",\n \"file\": \"rubpy/methods/advanced/voice_chat_player.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_info\",\n \"file\": \"rubpy/methods/advanced/voice_chat_player.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"heartbeat\",\n \"file\": \"rubpy/methods/advanced/voice_chat_player.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"speaking\",\n \"file\": \"rubpy/methods/advanced/voice_chat_player.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"voice_chat_player\",\n \"file\": \"rubpy/methods/advanced/voice_chat_player.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"AudioFileTrack\",\n \"file\": \"rubpy/methods/advanced/voice_chat_player.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"on_ice_change\",\n \"file\": \"rubpy/methods/advanced/voice_chat_player.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"on_conn_change\",\n \"file\": \"rubpy/methods/advanced/voice_chat_player.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__init__\",\n \"file\": \"rubpy/methods/advanced/voice_chat_player.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"recv\",\n \"file\": \"rubpy/methods/advanced/voice_chat_player.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"pause\",\n \"file\": \"rubpy/methods/advanced/voice_chat_player.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"resume\",\n \"file\": \"rubpy/methods/advanced/voice_chat_player.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"Auth\",\n \"file\": \"rubpy/methods/auth/__init__.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_android\",\n \"file\": \"rubpy/methods/auth/register_device.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_browser\",\n \"file\": \"rubpy/methods/auth/register_device.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"RegisterDevice\",\n \"file\": \"rubpy/methods/auth/register_device.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"register_device\",\n \"file\": \"rubpy/methods/auth/register_device.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"SendCode\",\n \"file\": \"rubpy/methods/auth/send_code.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"send_code\",\n \"file\": \"rubpy/methods/auth/send_code.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"SignIn\",\n \"file\": \"rubpy/methods/auth/sign_in.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"sign_in\",\n \"file\": \"rubpy/methods/auth/sign_in.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"Channels\",\n \"file\": \"rubpy/methods/channels/__init__.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"AddChannel\",\n \"file\": \"rubpy/methods/channels/add_channel.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"add_channel\",\n \"file\": \"rubpy/methods/channels/add_channel.py\",\n \"doc\": \"Create a new channel and add members if specified.\\n\\nParameters:\\n- title (str): The title of the new channel.\\n- description (str, optional): The description of the new channel.\\n- member_guids (Union[str, list], optional): The unique identifier(s) of the member(s) to be added to the new channel.\\n\\nReturns:\\nrubpy.types.Update: The result of the API call.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"AddChannelMembers\",\n \"file\": \"rubpy/methods/channels/add_channel_members.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"add_channel_members\",\n \"file\": \"rubpy/methods/channels/add_channel_members.py\",\n \"doc\": \"Add members to a channel.\\n\\nParameters:\\n- channel_guid (str): The unique identifier of the channel.\\n- member_guids (Union[str, list]): The unique identifier(s) of the member(s) to be added.\\n\\nReturns:\\nrubpy.types.Update: The result of the API call.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"BanChannelMember\",\n \"file\": \"rubpy/methods/channels/ban_channel_member.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"ban_channel_member\",\n \"file\": \"rubpy/methods/channels/ban_channel_member.py\",\n \"doc\": \"Ban or unban a member in a channel.\\n\\nParameters:\\n- channel_guid (str): The unique identifier of the channel.\\n- member_guid (str): The unique identifier of the member to be banned or unbanned.\\n- action (str, optional): The action to perform, can be 'Set' (ban) or 'Unset' (unban). Defaults to 'Set'.\\n\\nReturns:\\nrubpy.types.Update: The result of the API call.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"ChannelPreviewByJoinLink\",\n \"file\": \"rubpy/methods/channels/channel_preview_by_join_link.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"channel_preview_by_join_link\",\n \"file\": \"rubpy/methods/channels/channel_preview_by_join_link.py\",\n \"doc\": \"Get a preview of a channel using its join link.\\n\\nParameters:\\n- link (str): The join link or a link containing the channel's hash.\\n\\nReturns:\\nrubpy.types.Update: The result of the API call.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"CheckChannelUsername\",\n \"file\": \"rubpy/methods/channels/check_channel_username.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"check_channel_username\",\n \"file\": \"rubpy/methods/channels/check_channel_username.py\",\n \"doc\": \"Check the availability of a username for a channel.\\n\\nParameters:\\n- username (str): The username to check.\\n\\nReturns:\\nrubpy.types.Update: The result of the API call.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"CreateChannelVoiceChat\",\n \"file\": \"rubpy/methods/channels/create_channel_voice_chat.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"create_channel_voice_chat\",\n \"file\": \"rubpy/methods/channels/create_channel_voice_chat.py\",\n \"doc\": \"Create a voice chat for a channel.\\n\\nParameters:\\n- channel_guid (str): The GUID of the channel.\\n\\nReturns:\\nrubpy.types.Update: The result of the API call.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"DiscardChannelVoiceChat\",\n \"file\": \"rubpy/methods/channels/discard_channel_voice_chat.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"discard_channel_voice_chat\",\n \"file\": \"rubpy/methods/channels/discard_channel_voice_chat.py\",\n \"doc\": \"Discard a voice chat in a channel.\\n\\nParameters:\\n- channel_guid (str): The GUID of the channel.\\n- voice_chat_id (str): The ID of the voice chat to discard.\\n\\nReturns:\\nrubpy.types.Update: The result of the API call.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"EditChannelInfo\",\n \"file\": \"rubpy/methods/channels/edit_channel_info.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"edit_channel_info\",\n \"file\": \"rubpy/methods/channels/edit_channel_info.py\",\n \"doc\": \"Edit information of a channel.\\n\\nParameters:\\n- channel_guid (str): The GUID of the channel.\\n- title (str, optional): The new title of the channel.\\n- description (str, optional): The new description of the channel.\\n- channel_type (str, optional): The new type of the channel.\\n- sign_messages (str, optional): Whether to sign messages in the channel.\\n- chat_reaction_setting (dict, optional): The new chat reaction setting.\\n- chat_history_for_new_members (str, optional): The chat history visibility for new members.\\n\\nReturns:\\nrubpy.types.Update: The result of the API call.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"GetBannedGroupMembers\",\n \"file\": \"rubpy/methods/channels/get_banned_group_members.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_banned_group_members\",\n \"file\": \"rubpy/methods/channels/get_banned_group_members.py\",\n \"doc\": \"Get a list of banned members in a group.\\n\\nParameters:\\n- group_guid (str): The GUID of the group.\\n- start_id (str, optional): The ID to start retrieving banned members from.\\n\\nReturns:\\nrubpy.types.Update: The result of the API call.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"GetChannelAdminAccessList\",\n \"file\": \"rubpy/methods/channels/get_channel_admin_access_list.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_channel_admin_access_list\",\n \"file\": \"rubpy/methods/channels/get_channel_admin_access_list.py\",\n \"doc\": \"Get the admin access list for a specific member in a channel.\\n\\nParameters:\\n- channel_guid (str): The GUID of the channel.\\n- member_guid (str): The GUID of the member.\\n\\nReturns:\\nrubpy.types.Update: The result of the API call.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"GetChannelAdminMembers\",\n \"file\": \"rubpy/methods/channels/get_channel_admin_members.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_channel_admin_members\",\n \"file\": \"rubpy/methods/channels/get_channel_admin_members.py\",\n \"doc\": \"Get the list of admin members in a channel.\\n\\nParameters:\\n- channel_guid (str): The GUID of the channel.\\n- start_id (str, optional): The ID to start fetching from. Defaults to None.\\n\\nReturns:\\nrubpy.types.Update: The result of the API call.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"GetChannelAllMembers\",\n \"file\": \"rubpy/methods/channels/get_channel_all_members.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_channel_all_members\",\n \"file\": \"rubpy/methods/channels/get_channel_all_members.py\",\n \"doc\": \"Get all members in a channel.\\n\\nParameters:\\n- channel_guid (str): The GUID of the channel.\\n- search_text (str, optional): Text to search for in members. Defaults to None.\\n- start_id (str, optional): The ID to start fetching from. Defaults to None.\\n\\nReturns:\\nrubpy.types.InChatMembers: The result of the API call.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"GetChannelInfo\",\n \"file\": \"rubpy/methods/channels/get_channel_info.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_channel_info\",\n \"file\": \"rubpy/methods/channels/get_channel_info.py\",\n \"doc\": \"Get information about a channel.\\n\\nParameters:\\n- channel_guid (str): The GUID of the channel.\\n\\nReturns:\\nrubpy.types.Update: The result of the API call.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"GetChannelLink\",\n \"file\": \"rubpy/methods/channels/get_channel_link.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_channel_link\",\n \"file\": \"rubpy/methods/channels/get_channel_link.py\",\n \"doc\": \"Get the join link of a channel.\\n\\nParameters:\\n- channel_guid (str): The GUID of the channel.\\n\\nReturns:\\nrubpy.types.Update: The result of the API call.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"JoinChannelAction\",\n \"file\": \"rubpy/methods/channels/join_channel_action.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"join_channel_action\",\n \"file\": \"rubpy/methods/channels/join_channel_action.py\",\n \"doc\": \"Perform an action on a channel, such as joining, removing, or archiving.\\n\\nParameters:\\n- channel_guid (str): The GUID of the channel.\\n- action (Literal['Join', 'Remove', 'Archive']): The action to perform on the channel.\\n\\nReturns:\\nrubpy.types.Update: The result of the API call.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"JoinChannelByLink\",\n \"file\": \"rubpy/methods/channels/join_channel_by_link.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"join_channel_by_link\",\n \"file\": \"rubpy/methods/channels/join_channel_by_link.py\",\n \"doc\": \"Join a channel using its invite link.\\n\\nParameters:\\n- link (str): The invite link or hash of the channel.\\n\\nReturns:\\nrubpy.types.Update: The result of the API call.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"RemoveChannel\",\n \"file\": \"rubpy/methods/channels/remove_channel.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"remove_channel\",\n \"file\": \"rubpy/methods/channels/remove_channel.py\",\n \"doc\": \"Remove a channel.\\n\\nParameters:\\n- channel_guid (str): The unique identifier of the channel.\\n\\nReturns:\\nrubpy.types.Update: The result of the API call.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"SeenChannelMessages\",\n \"file\": \"rubpy/methods/channels/seen_channel_messages.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"seen_channel_messages\",\n \"file\": \"rubpy/methods/channels/seen_channel_messages.py\",\n \"doc\": \"Mark channel messages as seen within a specific range.\\n\\nParameters:\\n- channel_guid (str): The unique identifier of the channel.\\n- min_id (Union[int, str]): The minimum message ID to mark as seen.\\n- max_id (Union[int, str]): The maximum message ID to mark as seen.\\n\\nReturns:\\nrubpy.types.Update: The result of the API call.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"SetChannelLink\",\n \"file\": \"rubpy/methods/channels/set_channel_link.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"set_channel_link\",\n \"file\": \"rubpy/methods/channels/set_channel_link.py\",\n \"doc\": \"Set a custom link for the channel.\\n\\nParameters:\\n- channel_guid (str): The unique identifier of the channel.\\n\\nReturns:\\nrubpy.types.Update: The result of the API call.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"SetChannelVoiceChatSetting\",\n \"file\": \"rubpy/methods/channels/set_channel_voice_chat_setting.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"set_channel_voice_chat_setting\",\n \"file\": \"rubpy/methods/channels/set_channel_voice_chat_setting.py\",\n \"doc\": \"Set the title for a voice chat in a channel.\\n\\nParameters:\\n- channel_guid (str): The unique identifier of the channel.\\n- voice_chat_id (str): The unique identifier of the voice chat.\\n- title (str, optional): The new title for the voice chat.\\n\\nReturns:\\nrubpy.types.Update: The result of the API call.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"UpdateChannelUsername\",\n \"file\": \"rubpy/methods/channels/update_channel_username.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"update_channel_username\",\n \"file\": \"rubpy/methods/channels/update_channel_username.py\",\n \"doc\": \"Update the username of a channel.\\n\\nParameters:\\n- channel_guid (str): The unique identifier of the channel.\\n- username (str): The new username for the channel.\\n\\nReturns:\\nrubpy.types.Update: The result of the API call.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"Chats\",\n \"file\": \"rubpy/methods/chats/__init__.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"DeleteAvatar\",\n \"file\": \"rubpy/methods/chats/delete_avatar.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"delete_avatar\",\n \"file\": \"rubpy/methods/chats/delete_avatar.py\",\n \"doc\": \"Delete an avatar.\\n\\nParameters:\\n- object_guid (str): The unique identifier of the object (e.g., user, chat) that owns the avatar.\\n- avatar_id (str): The identifier of the avatar to be deleted.\\n\\nReturns:\\nrubpy.types.Update: The result of the API call.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"DeleteChatHistory\",\n \"file\": \"rubpy/methods/chats/delete_chat_history.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"delete_chat_history\",\n \"file\": \"rubpy/methods/chats/delete_chat_history.py\",\n \"doc\": \"Delete chat history up to a certain message.\\n\\nParameters:\\n- object_guid (str): The unique identifier of the object (e.g., user, chat) for which chat history will be deleted.\\n- last_message_id (Union[str, int]): The identifier of the last message to keep in the chat history.\\n\\nReturns:\\nrubpy.types.Update: The result of the API call.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"GetAbsObjects\",\n \"file\": \"rubpy/methods/chats/get_abs_objects.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_abs_objects\",\n \"file\": \"rubpy/methods/chats/get_abs_objects.py\",\n \"doc\": \"Get absolute objects based on their unique identifiers.\\n\\nParameters:\\n- object_guids (Union[str, list]): The unique identifiers of the objects to retrieve.\\n\\nReturns:\\nrubpy.types.Update: The result of the API call.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"GetAvatars\",\n \"file\": \"rubpy/methods/chats/get_avatars.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_avatars\",\n \"file\": \"rubpy/methods/chats/get_avatars.py\",\n \"doc\": \"Get avatars of a specific object.\\n\\nParameters:\\n- object_guid (str): The unique identifier of the object to retrieve avatars for.\\n\\nReturns:\\nrubpy.types.Update: The result of the API call.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"GetChats\",\n \"file\": \"rubpy/methods/chats/get_chats.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_chats\",\n \"file\": \"rubpy/methods/chats/get_chats.py\",\n \"doc\": \"Get a list of chats.\\n\\nParameters:\\n- start_id (Optional[str]): The ID to start from. If not provided, it starts from the\\n beginning.\\n\\nReturns:\\nrubpy.types.Update: The result of the API call, representing a list of chats.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"GetChatsUpdates\",\n \"file\": \"rubpy/methods/chats/get_chats_updates.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_chats_updates\",\n \"file\": \"rubpy/methods/chats/get_chats_updates.py\",\n \"doc\": \"Get updates for chats.\\n\\nParameters:\\n- state (Optional[Union[str, int]]): State parameter for syncing updates. If not provided,\\n it uses the current time minus 150 seconds.\\n\\nReturns:\\nrubpy.types.Update: The result of the API call.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"GetLinkFromAppUrl\",\n \"file\": \"rubpy/methods/chats/get_link_from_app_url.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_link_from_app_url\",\n \"file\": \"rubpy/methods/chats/get_link_from_app_url.py\",\n \"doc\": \"Retrieves a link from an application URL.\\n\\nArgs:\\n app_url (str): The application URL.\\n\\nReturns:\\n rubpy.types.Update: The link data.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"SearchChatMessages\",\n \"file\": \"rubpy/methods/chats/search_chat_messages.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"search_chat_messages\",\n \"file\": \"rubpy/methods/chats/search_chat_messages.py\",\n \"doc\": \"Searches for chat messages based on the specified criteria.\\n\\nArgs:\\n object_guid (str): The GUID of the chat or channel.\\n search_text (str): The text to search for in messages.\\n type (str, optional): The type of search, can be 'Text' or 'Hashtag'. Defaults to 'Text'.\\n\\nReturns:\\n rubpy.types.Update: The search results.\\n\\nRaises:\\n ValueError: If the `type` argument is not valid.\\n rubpy.exceptions.APIError: If the API request fails.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"SeenChats\",\n \"file\": \"rubpy/methods/chats/seen_chats.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"seen_chats\",\n \"file\": \"rubpy/methods/chats/seen_chats.py\",\n \"doc\": \"Marks multiple chats as seen.\\n\\nArgs:\\n seen_list (dict): A dictionary containing chat GUIDs and their last seen message IDs.\\n\\nReturns:\\n rubpy.types.Update: The result of the operation.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"SendChatActivity\",\n \"file\": \"rubpy/methods/chats/send_chat_activity.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"send_chat_activity\",\n \"file\": \"rubpy/methods/chats/send_chat_activity.py\",\n \"doc\": \"Sends a chat activity, such as typing, uploading, or recording.\\n\\nArgs:\\n object_guid (str): The GUID of the chat.\\n activity (str, optional): The type of activity. Defaults to 'Typing'.\\n\\nReturns:\\n rubpy.types.Update: The result of the operation.\\n\\nRaises:\\n ValueError: If the `activity` argument is not one of `[\\\"Typing\\\", \\\"Uploading\\\", \\\"Recording\\\"]`.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"SetActionChat\",\n \"file\": \"rubpy/methods/chats/set_action_chat.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"set_action_chat\",\n \"file\": \"rubpy/methods/chats/set_action_chat.py\",\n \"doc\": \"Set the action for a chat, such as muting or unmuting.\\n\\nArgs:\\n object_guid (str): The GUID of the chat.\\n action (str, optional): The action to be set. Defaults to 'Mute'.\\n\\nReturns:\\n rubpy.types.Update: The result of the operation.\\n\\nRaises:\\n ValueError: If the `action` argument is not one of `[\\\"Mute\\\", \\\"Unmute\\\"]`.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"UploadAvatar\",\n \"file\": \"rubpy/methods/chats/upload_avatar.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"upload_avatar\",\n \"file\": \"rubpy/methods/chats/upload_avatar.py\",\n \"doc\": \"Uploads an avatar image for a specified object (user, group, or chat).\\n\\nArgs:\\n object_guid (str): The GUID of the object for which the avatar is being uploaded.\\n image (Union[Path, bytes]): The image file or bytes to be used as the avatar.\\n thumbnail_file_id (Optional[str]): The file ID of the thumbnail image.\\n *args, **kwargs: Additional arguments to be passed to the `upload` method.\\n\\nReturns:\\n rubpy.types.Update: The result of the avatar upload operation.\\n\\nRaises:\\n Any exceptions that might occur during the avatar upload process.\\n\\nNote:\\n - If `object_guid` is 'me', 'cloud', or 'self', it will be replaced with the client's GUID.\\n - If `image` is a string (path to a file), the file name is extracted from the path.\\n Otherwise, a default file name ('rubpy.jpg') is used.\\n - The `upload` method is used internally to handle the file upload process.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"Contacts\",\n \"file\": \"rubpy/methods/contacts/__init__.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"AddAddressBook\",\n \"file\": \"rubpy/methods/contacts/add_address_book.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"add_address_book\",\n \"file\": \"rubpy/methods/contacts/add_address_book.py\",\n \"doc\": \"Adds a contact to the client's address book.\\n\\nArgs:\\n phone (str): The phone number of the contact to be added.\\n first_name (str): The first name of the contact.\\n last_name (str, optional): The last name of the contact. Defaults to an empty string.\\n\\nReturns:\\n rubpy.types.Update: The result of the address book addition operation.\\n\\nRaises:\\n Any exceptions that might occur during the address book addition process.\\n\\nNote:\\n - The `phone` parameter should be a valid phone number.\\n - The `first_name` and `last_name` parameters represent the name of the contact.\\n If the contact has no last name, `last_name` can be an empty string.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"DeleteContact\",\n \"file\": \"rubpy/methods/contacts/delete_contact.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"delete_contact\",\n \"file\": \"rubpy/methods/contacts/delete_contact.py\",\n \"doc\": \"Deletes a contact from the client's address book.\\n\\nArgs:\\n user_guid (str): The GUID (Globally Unique Identifier) of the contact to be deleted.\\n\\nReturns:\\n rubpy.types.Update: The result of the contact deletion operation.\\n\\nRaises:\\n Any exceptions that might occur during the contact deletion process.\\n\\nNote:\\n - The `user_guid` parameter should be the GUID of the contact to be deleted.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"GetContacts\",\n \"file\": \"rubpy/methods/contacts/get_contacts.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_contacts\",\n \"file\": \"rubpy/methods/contacts/get_contacts.py\",\n \"doc\": \"Get a list of contacts.\\n\\nArgs:\\n self (\\\"rubpy.Client\\\"): The rubpy client.\\n start_id (Optional[Union[str, int]], optional): Start ID for pagination. Defaults to None.\\n\\nReturns:\\n rubpy.types.Update: The result of the API call.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"GetContactsUpdates\",\n \"file\": \"rubpy/methods/contacts/get_contacts_updates.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_contacts_updates\",\n \"file\": \"rubpy/methods/contacts/get_contacts_updates.py\",\n \"doc\": \"Get updates related to contacts.\\n\\nArgs:\\n self (rubpy.Client): The rubpy client.\\n state (Optional[Union[str, int]], optional):\\n The state parameter to filter updates. Defaults to `round(time()) - 150`.\\n\\nReturns:\\n rubpy.types.Update: The update related to contacts.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"ResetContacts\",\n \"file\": \"rubpy/methods/contacts/reset_contacts.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"reset_contacts\",\n \"file\": \"rubpy/methods/contacts/reset_contacts.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"Decorators\",\n \"file\": \"rubpy/methods/decorators/__init__.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"OnChatUpdates\",\n \"file\": \"rubpy/methods/decorators/on_chat_updates.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"on_chat_updates\",\n \"file\": \"rubpy/methods/decorators/on_chat_updates.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"MetaHandler\",\n \"file\": \"rubpy/methods/decorators/on_chat_updates.py\",\n \"doc\": \"Decorator to register a function as a handler for chat updates.\\n\\nArgs:\\n func: The function to be registered as a handler.\\n\\nReturns:\\n func: The original function.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"OnMessageUpdates\",\n \"file\": \"rubpy/methods/decorators/on_message_updates.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"on_message_updates\",\n \"file\": \"rubpy/methods/decorators/on_message_updates.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"MetaHandler\",\n \"file\": \"rubpy/methods/decorators/on_message_updates.py\",\n \"doc\": \"Decorator to register a function as a handler for message updates.\\n\\nArgs:\\n func: The function to be registered as a handler.\\n\\nReturns:\\n func: The original function.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"OnRemoveNotifications\",\n \"file\": \"rubpy/methods/decorators/on_remove_notifications.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"on_remove_notifications\",\n \"file\": \"rubpy/methods/decorators/on_remove_notifications.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"MetaHandler\",\n \"file\": \"rubpy/methods/decorators/on_remove_notifications.py\",\n \"doc\": \"Decorator to register a function as a handler for remove notifications.\\n\\nArgs:\\n func: The function to be registered as a handler.\\n\\nReturns:\\n func: The original function.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"OnShowActivities\",\n \"file\": \"rubpy/methods/decorators/on_show_activities.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"on_show_activities\",\n \"file\": \"rubpy/methods/decorators/on_show_activities.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"MetaHandler\",\n \"file\": \"rubpy/methods/decorators/on_show_activities.py\",\n \"doc\": \"Decorator to register a function as a handler for show activities.\\n\\nArgs:\\n func: The function to be registered as a handler.\\n\\nReturns:\\n func: The original function.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"OnShowNotifications\",\n \"file\": \"rubpy/methods/decorators/on_show_notifications.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"on_show_notifications\",\n \"file\": \"rubpy/methods/decorators/on_show_notifications.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"MetaHandler\",\n \"file\": \"rubpy/methods/decorators/on_show_notifications.py\",\n \"doc\": \"Decorator to register a function as a handler for show notifications.\\n\\nArgs:\\n func: The function to be registered as a handler.\\n\\nReturns:\\n func: The original function.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"Exctras\",\n \"file\": \"rubpy/methods/extras/__init__.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"ActionOnJoinRequest\",\n \"file\": \"rubpy/methods/extras/action_on_join_request.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"action_on_join_request\",\n \"file\": \"rubpy/methods/extras/action_on_join_request.py\",\n \"doc\": \"انجام عملیات بر روی درخواست عضویت (تأیید یا رد).\\n\\nArgs:\\n object_guid (str): شناسه گروه یا کانال.\\n user_guid (str): شناسه کاربری درخواست‌دهنده.\\n action (Literal['Accept', 'Reject']): عملیات مورد نظر (پیش‌فرض 'Accept').\\n\\nReturns:\\n dict: پاسخ API پس از انجام عملیات.\\n\\nRaises:\\n ValueError: اگر action غیرمجاز باشد.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"BanMember\",\n \"file\": \"rubpy/methods/extras/ban_member.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"ban_member\",\n \"file\": \"rubpy/methods/extras/ban_member.py\",\n \"doc\": \"Ban a member from a group or channel.\\n\\nArgs:\\n object_guid (str): The GUID of the group or channel.\\n member_guid (str): The GUID of the member to be banned.\\n\\nReturns:\\n rubpy.types.Update: The update after banning the member.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"CreateJoinLink\",\n \"file\": \"rubpy/methods/extras/create_join_link.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"create_join_link\",\n \"file\": \"rubpy/methods/extras/create_join_link.py\",\n \"doc\": \"ساخت لینک دعوت برای گروه یا کانال.\\n\\nArgs:\\n object_guid (str): شناسه گروه یا کانال.\\n expire_time (Optional[int]): زمان انقضا لینک به ثانیه (اختیاری).\\n request_needed (bool): آیا پذیرش درخواست عضویت دستی باشد یا خیر.\\n title (Optional[str]): عنوان لینک (اختیاری).\\n usage_limit (int): محدودیت تعداد استفاده از لینک.\\n\\nReturns:\\n dict: پاسخ API شامل لینک ایجاد شده.\\n\\nRaises:\\n ValueError: اگر مقدار `request_needed` بولی نباشد.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"GetInfo\",\n \"file\": \"rubpy/methods/extras/get_info.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_info\",\n \"file\": \"rubpy/methods/extras/get_info.py\",\n \"doc\": \"Get information about a user, group, or channel.\\n\\nArgs:\\n object_guid (str, optional): The GUID of the object (user, group, or channel).\\n username (str, optional): The username of the object.\\n\\nReturns:\\n rubpy.types.Update: The update containing information about the object.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"GetJoinLinks\",\n \"file\": \"rubpy/methods/extras/get_join_links.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_join_links\",\n \"file\": \"rubpy/methods/extras/get_join_links.py\",\n \"doc\": \"دریافت لینک‌های پیوستن به یک گروه/کانال خاص بر اساس object_guid.\\n\\nArgs:\\n object_guid (str): شناسه گروه یا کانال\\n\\nReturns:\\n dict: پاسخ API شامل لینک‌های پیوستن\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"GetJoinRequests\",\n \"file\": \"rubpy/methods/extras/get_join_requests.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_join_requests\",\n \"file\": \"rubpy/methods/extras/get_join_requests.py\",\n \"doc\": \"دریافت درخواست‌های عضویت در گروه یا کانال مشخص‌شده.\\n\\nArgs:\\n object_guid (str): شناسه‌ی گروه یا کانال\\n\\nReturns:\\n dict: پاسخ API شامل درخواست‌های عضویت\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"GetObjectByUsername\",\n \"file\": \"rubpy/methods/extras/get_object_by_username.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_object_by_username\",\n \"file\": \"rubpy/methods/extras/get_object_by_username.py\",\n \"doc\": \"Get an object (user, group, or channel) by its username.\\n\\nArgs:\\n username (str): The username of the object.\\n\\nReturns:\\n rubpy.types.Update: The update containing information about the object.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"GetProfileLinkItems\",\n \"file\": \"rubpy/methods/extras/get_profile_link_items.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_profile_link_items\",\n \"file\": \"rubpy/methods/extras/get_profile_link_items.py\",\n \"doc\": \"Get profile link items for a given object.\\n\\nArgs:\\n object_guid (str): The GUID of the object.\\n\\nReturns:\\n rubpy.types.Update: The update containing information about profile link items.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"GetRelatedObjects\",\n \"file\": \"rubpy/methods/extras/get_related_objects.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_related_objects\",\n \"file\": \"rubpy/methods/extras/get_related_objects.py\",\n \"doc\": \"Get related objects for a given object.\\n\\nArgs:\\n object_guid (str): The GUID of the object.\\n\\nReturns:\\n rubpy.types.Update: The update containing information about related objects.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"GetTime\",\n \"file\": \"rubpy/methods/extras/get_time.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_time\",\n \"file\": \"rubpy/methods/extras/get_time.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"GetTranscription\",\n \"file\": \"rubpy/methods/extras/get_transcription.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_transcription\",\n \"file\": \"rubpy/methods/extras/get_transcription.py\",\n \"doc\": \"Get transcription for a specific message.\\n\\nArgs:\\n message_id (Union[str, int]): The ID of the message.\\n transcription_id (str): The ID of the transcription.\\n\\nReturns:\\n rubpy.types.Update: The update containing the requested transcription.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"Join\",\n \"file\": \"rubpy/methods/extras/join.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"join_chat\",\n \"file\": \"rubpy/methods/extras/join.py\",\n \"doc\": \"Join a chat using its identifier or link.\\n\\nArgs:\\n chat (str): The identifier or link of the chat.\\n\\nReturns:\\n rubpy.types.Update: The update containing information about the joined chat.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"LeaveChat\",\n \"file\": \"rubpy/methods/extras/leave_chat.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"leave_chat\",\n \"file\": \"rubpy/methods/extras/leave_chat.py\",\n \"doc\": \"Leave a chat (channel or group).\\n\\nArgs:\\n object_guid (str): The identifier of the chat (channel or group).\\n\\nReturns:\\n rubpy.types.Update: The update containing information about leaving the chat.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"ReportObject\",\n \"file\": \"rubpy/methods/extras/report_object.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"report_object\",\n \"file\": \"rubpy/methods/extras/report_object.py\",\n \"doc\": \"Report an object (user, channel, group, etc.) for a specific reason.\\n\\nArgs:\\n object_guid (str): The identifier of the object to be reported.\\n report_type (rubpy.enums.ReportType): The type of report.\\n description (str, optional): Additional description for the report.\\n report_type_object (str, optional): The type of object being reported.\\n\\nReturns:\\n rubpy.types.Update: The update containing information about the report.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"SearchGlobalObjects\",\n \"file\": \"rubpy/methods/extras/search_global_objects.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"search_global_objects\",\n \"file\": \"rubpy/methods/extras/search_global_objects.py\",\n \"doc\": \"Search for global objects (users, channels, etc.) based on the given search text.\\n\\nArgs:\\n search_text (str): The text to search for.\\n\\nReturns:\\n rubpy.types.Update: The update containing search results.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"TranscribeVoice\",\n \"file\": \"rubpy/methods/extras/transcribe_voice.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"transcribe_voice\",\n \"file\": \"rubpy/methods/extras/transcribe_voice.py\",\n \"doc\": \"Transcribes voice messages.\\n\\nParameters:\\n - object_guid (str): The GUID of the object (chat, channel, or group) containing the voice message.\\n - message_id (str): The ID of the voice message.\\n\\nReturns:\\n rubpy.types.Update: The transcription result.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"UserIsAdmin\",\n \"file\": \"rubpy/methods/extras/user_is_admin.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"user_is_admin\",\n \"file\": \"rubpy/methods/extras/user_is_admin.py\",\n \"doc\": \"Checks if a user is an admin in a group or channel.\\n\\nArgs:\\n object_guid (str): The GUID of the group or channel.\\n user_guid (str): The GUID of the user.\\n\\nReturns:\\n bool: True if the user is an admin, False otherwise.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"Gifs\",\n \"file\": \"rubpy/methods/gif/__init__.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"AddToMyGifSet\",\n \"file\": \"rubpy/methods/gif/add_to_my_gif_set.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"add_to_my_gif_set\",\n \"file\": \"rubpy/methods/gif/add_to_my_gif_set.py\",\n \"doc\": \"Adds a GIF message to the user's personal GIF set.\\n\\nArgs:\\n object_guid (str): The GUID of the chat or channel.\\n message_id (str): The ID of the GIF message.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"GetMyGifSet\",\n \"file\": \"rubpy/methods/gif/get_my_gif_set.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_my_gif_set\",\n \"file\": \"rubpy/methods/gif/get_my_gif_set.py\",\n \"doc\": \"Gets the user's personal GIF set.\\n\\nReturns:\\n rubpy.types.Update: Information about the user's GIF set.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"RemoveFromMyGifSet\",\n \"file\": \"rubpy/methods/gif/remove_from_my_gif_set.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"remove_from_my_gif_set\",\n \"file\": \"rubpy/methods/gif/remove_from_my_gif_set.py\",\n \"doc\": \"Removes a GIF from the user's personal GIF set.\\n\\nArgs:\\n file_id (str): The file ID of the GIF to be removed.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"Groups\",\n \"file\": \"rubpy/methods/groups/__init__.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"AddGroup\",\n \"file\": \"rubpy/methods/groups/add_group.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"add_group\",\n \"file\": \"rubpy/methods/groups/add_group.py\",\n \"doc\": \"Add a new group.\\n\\nArgs:\\n- title (str): The title of the group.\\n- member_guids (Union[str, List[str]]): A single member GUID or a list of member GUIDs to be added to the group.\\n- description (Optional[str]): Description of the group (optional).\\n\\nReturns:\\n- rubpy.types.Update: The result of the API call.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"AddGroupMembers\",\n \"file\": \"rubpy/methods/groups/add_group_members.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"add_group_members\",\n \"file\": \"rubpy/methods/groups/add_group_members.py\",\n \"doc\": \"Adds one or more members to a group.\\n\\nArgs:\\n group_guid (str): The GUID of the group.\\n member_guids (Union[str, list]): A single member GUID or a list of member GUIDs to be added.\\n\\nReturns:\\n rubpy.types.Update: An update object indicating the result of the operation.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"BanGroupMember\",\n \"file\": \"rubpy/methods/groups/ban_group_member.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"ban_group_member\",\n \"file\": \"rubpy/methods/groups/ban_group_member.py\",\n \"doc\": \"Ban or unban a member from a group.\\n\\nArgs:\\n- group_guid (str): The GUID of the group.\\n- member_guid (str): The GUID of the member to be banned or unbanned.\\n- action (str): The action to perform. Should be either 'Set' (ban) or 'Unset' (unban).\\n\\nReturns:\\n- rubpy.types.Update: The result of the API call.\\n\\nRaises:\\n- ValueError: If the `action` argument is not 'Set' or 'Unset'.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"CreateGroupVoiceChat\",\n \"file\": \"rubpy/methods/groups/create_group_voice_chat.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"create_group_voice_chat\",\n \"file\": \"rubpy/methods/groups/create_group_voice_chat.py\",\n \"doc\": \"Create a voice chat in a group.\\n\\nArgs:\\n- group_guid (str): The GUID of the group.\\n\\nReturns:\\n- rubpy.types.Update: The result of the API call.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"DeleteNoAccessGroupChat\",\n \"file\": \"rubpy/methods/groups/delete_no_access_group_chat.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"delete_no_access_group_chat\",\n \"file\": \"rubpy/methods/groups/delete_no_access_group_chat.py\",\n \"doc\": \"Delete a group chat that has no access.\\n\\nArgs:\\n- group_guid (str): The GUID of the group.\\n\\nReturns:\\n- rubpy.types.Update: The result of the API call.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"EditGroupInfo\",\n \"file\": \"rubpy/methods/groups/edit_group_info.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"edit_group_info\",\n \"file\": \"rubpy/methods/groups/edit_group_info.py\",\n \"doc\": \"Edit the information of a group.\\n\\nArgs:\\n- group_guid (str): The GUID of the group.\\n- title (Optional[str]): The new title for the group.\\n- description (Optional[str]): The new description for the group.\\n- slow_mode (Optional[str]): The new slow mode setting for the group.\\n- event_messages (Optional[bool]): Enable or disable event messages for the group.\\n- chat_reaction_setting (Optional[Dict[str, Union[str, int]]]): The new chat reaction setting.\\n- chat_history_for_new_members (Optional[str]): The new chat history setting for new members.\\n\\nReturns:\\n- rubpy.types.Update: The result of the API call.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"GetBannedGroupMembers\",\n \"file\": \"rubpy/methods/groups/get_banned_group_members.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_banned_group_members\",\n \"file\": \"rubpy/methods/groups/get_banned_group_members.py\",\n \"doc\": \"Get the list of banned members in a group.\\n\\nArgs:\\n- group_guid (str): The GUID of the group.\\n- start_id (Optional[str]): The starting ID for fetching results.\\n\\nReturns:\\n- rubpy.types.Update: The result of the API call.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"GetGroupAdminAccessList\",\n \"file\": \"rubpy/methods/groups/get_group_admin_access_list.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_group_admin_access_list\",\n \"file\": \"rubpy/methods/groups/get_group_admin_access_list.py\",\n \"doc\": \"Get the admin access list for a member in a group.\\n\\nArgs:\\n- group_guid (str): The GUID of the group.\\n- member_guid (str): The GUID of the member for whom admin access is being checked.\\n\\nReturns:\\n- rubpy.types.Update: The result of the API call.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"GetGroupAdminMembers\",\n \"file\": \"rubpy/methods/groups/get_group_admin_members.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_group_admin_members\",\n \"file\": \"rubpy/methods/groups/get_group_admin_members.py\",\n \"doc\": \"Get the list of admin members in a group.\\n\\nArgs:\\n- group_guid (str): The GUID of the group.\\n- start_id (str, optional): The starting ID for pagination. Defaults to None.\\n\\nReturns:\\n- rubpy.types.Update: The result of the API call.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"GetGroupAllMembers\",\n \"file\": \"rubpy/methods/groups/get_group_all_members.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_group_all_members\",\n \"file\": \"rubpy/methods/groups/get_group_all_members.py\",\n \"doc\": \"Get all members of a group.\\n\\nArgs:\\n- group_guid (str): The GUID of the group.\\n- search_text (str, optional): Search text for filtering members. Defaults to None.\\n- start_id (str, optional): The starting ID for pagination. Defaults to None.\\n\\nReturns:\\n- InChatMembers: Object containing information about the group members.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"GetGroupDefaultAccess\",\n \"file\": \"rubpy/methods/groups/get_group_default_access.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_group_default_access\",\n \"file\": \"rubpy/methods/groups/get_group_default_access.py\",\n \"doc\": \"Get the default access settings for a group.\\n\\nArgs:\\n- group_guid (str): The GUID of the group.\\n\\nReturns:\\n- rubpy.types.Update: Update object containing information about the default access settings.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"GetGroupInfo\",\n \"file\": \"rubpy/methods/groups/get_group_info.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_group_info\",\n \"file\": \"rubpy/methods/groups/get_group_info.py\",\n \"doc\": \"Get information about a group.\\n\\nArgs:\\n- group_guid (str): The GUID of the group.\\n\\nReturns:\\n- rubpy.types.Update: Update object containing information about the group.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"GetGroupLink\",\n \"file\": \"rubpy/methods/groups/get_group_link.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_group_link\",\n \"file\": \"rubpy/methods/groups/get_group_link.py\",\n \"doc\": \"Get the link associated with a group.\\n\\nArgs:\\n- group_guid (str): The GUID of the group.\\n\\nReturns:\\n- rubpy.types.Update: Update object containing the group link.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"GetGroupMentionList\",\n \"file\": \"rubpy/methods/groups/get_group_mention_list.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_group_mention_list\",\n \"file\": \"rubpy/methods/groups/get_group_mention_list.py\",\n \"doc\": \"Get the mention list for a group.\\n\\nArgs:\\n- group_guid (str): The GUID of the group.\\n- search_mention (str, optional): Search text for mentions.\\n\\nReturns:\\n- rubpy.types.Update: Update object containing the group mention list.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"GetGroupOnlineCount\",\n \"file\": \"rubpy/methods/groups/get_group_online_count.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_group_online_count\",\n \"file\": \"rubpy/methods/groups/get_group_online_count.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"GetGroupVoiceChatUpdates\",\n \"file\": \"rubpy/methods/groups/get_group_voice_chat_updates.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_group_voice_chat_updates\",\n \"file\": \"rubpy/methods/groups/get_group_voice_chat_updates.py\",\n \"doc\": \"Get voice chat updates for a group.\\n\\nArgs:\\n- group_guid (str): The GUID of the group.\\n- voice_chat_id (str): The ID of the voice chat.\\n- state (int, optional): The state for updates. If not provided, it defaults to the current time.\\n\\nReturns:\\n- rubpy.types.Update: Update object containing the group voice chat updates.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"GroupPreviewByJoinLink\",\n \"file\": \"rubpy/methods/groups/group_preview_by_join_link.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"group_preview_by_join_link\",\n \"file\": \"rubpy/methods/groups/group_preview_by_join_link.py\",\n \"doc\": \"Get group preview by join link.\\n\\nArgs:\\n- link (str): The join link or hash link.\\n\\nReturns:\\n- rubpy.types.Update: Update object containing the group preview information.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"JoinGroup\",\n \"file\": \"rubpy/methods/groups/join_group.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"join_group\",\n \"file\": \"rubpy/methods/groups/join_group.py\",\n \"doc\": \"Join a group using the provided link.\\n\\nArgs:\\n- link (str): The group link or hash link.\\n\\nReturns:\\n- rubpy.types.Update: Update object confirming the group join action.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"LeaveGroup\",\n \"file\": \"rubpy/methods/groups/leave_group.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"leave_group\",\n \"file\": \"rubpy/methods/groups/leave_group.py\",\n \"doc\": \"Leave a group.\\n\\nArgs:\\n- group_guid (str): The GUID of the group.\\n\\nReturns:\\n- rubpy.types.Update: Update object confirming the leave group action.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"LeaveGroupVoiceChat\",\n \"file\": \"rubpy/methods/groups/leave_group_voice_chat.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"leave_group_voice_chat\",\n \"file\": \"rubpy/methods/groups/leave_group_voice_chat.py\",\n \"doc\": \"Leave a voice chat in a group.\\n\\nArgs:\\n- group_guid (str): The GUID of the group.\\n- voice_chat_id (str): The ID of the voice chat.\\n\\nReturns:\\n- rubpy.types.Update: Update object confirming the leave voice chat action.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"RemoveGroup\",\n \"file\": \"rubpy/methods/groups/remove_group.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"remove_group\",\n \"file\": \"rubpy/methods/groups/remove_group.py\",\n \"doc\": \"Remove a group.\\n\\nArgs:\\n- group_guid (str): The GUID of the group.\\n\\nReturns:\\n- rubpy.types.Update: Update object confirming the removal of the group.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"SetGroupAdmin\",\n \"file\": \"rubpy/methods/groups/set_group_admin.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"set_group_admin\",\n \"file\": \"rubpy/methods/groups/set_group_admin.py\",\n \"doc\": \"Set or unset a member as a group admin.\\n\\nArgs:\\n- group_guid (str): The GUID of the group.\\n- member_guid (str): The GUID of the member.\\n- action (str): The action to perform, either 'SetAdmin' or 'UnsetAdmin'.\\n- access_list (Union[str, list]): List of allowed actions. Default is an empty list.\\n\\nReturns:\\n- rubpy.types.Update: Update object confirming the change in admin status.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"SetGroupDefaultAccess\",\n \"file\": \"rubpy/methods/groups/set_group_default_access.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"set_group_default_access\",\n \"file\": \"rubpy/methods/groups/set_group_default_access.py\",\n \"doc\": \"Set default access for a group.\\n\\nArgs:\\n- group_guid (str): The GUID of the group.\\n- access_list (Union[str, list]): List of allowed actions.\\n\\nReturns:\\n- rubpy.types.Update: Update object confirming the change in default access.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"SetGroupLink\",\n \"file\": \"rubpy/methods/groups/set_group_link.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"set_group_link\",\n \"file\": \"rubpy/methods/groups/set_group_link.py\",\n \"doc\": \"Set private link for group.\\n\\nArgs:\\n- group_guid (str): The GUID of the group.\\n\\nReturns:\\n- rubpy.types.Update: Update object confirming the change in default access.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"SetGroupVoiceChatSetting\",\n \"file\": \"rubpy/methods/groups/set_group_voice_chat_setting.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"set_group_voice_chat_setting\",\n \"file\": \"rubpy/methods/groups/set_group_voice_chat_setting.py\",\n \"doc\": \"Set group voice chat setting.\\n\\nArgs:\\n- group_guid (str): The GUID of the group.\\n- voice_chat_id (str): The voice chat ID.\\n- title (str): Title of voice chat, Defualt is None.\\n\\nReturns:\\n- rubpy.types.Update: Update object confirming the change in default access.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"Messages\",\n \"file\": \"rubpy/methods/messages/__init__.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"ActionOnMessageReaction\",\n \"file\": \"rubpy/methods/messages/action_on_message_reaction.py\",\n \"doc\": \"Provides a method to perform actions on reactions to a specific message.\\n\\nMethods:\\n- action_on_message_reaction: Perform actions on reactions to a specific message.\\n\\nAttributes:\\n- self (rubpy.Client): The rubpy client instance.\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"action_on_message_reaction\",\n \"file\": \"rubpy/methods/messages/action_on_message_reaction.py\",\n \"doc\": \"Perform actions on reactions to a specific message.\\n\\nParameters:\\n- object_guid (str): The GUID of the object associated with the message (e.g., user, group, channel).\\n- message_id (str): The ID of the message.\\n- reaction_id (int): The ID of the reaction.\\n- action (Literal['Add', 'Remove']): The action to perform on the reaction.\\n\\nReturns:\\n- rubpy.types.Update: The updated information after performing the action on the message reaction.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"AutoDeleteMessage\",\n \"file\": \"rubpy/methods/messages/auto_delete_message.py\",\n \"doc\": \"Provides a method to automatically delete a message after a specified time.\\n\\nMethods:\\n- auto_delete_message: Automatically delete a message after a specified time.\\n\\nAttributes:\\n- self (rubpy.Client): The rubpy client instance.\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"auto_delete_message\",\n \"file\": \"rubpy/methods/messages/auto_delete_message.py\",\n \"doc\": \"Automatically delete a message after a specified time.\\n\\nParameters:\\n- object_guid (str): The GUID of the object associated with the message (e.g., user, group, channel).\\n- message_id (str): The ID of the message to be deleted.\\n- time (Union[float, int]): The time delay (in seconds) before deleting the message.\\n\\nReturns:\\n- rubpy.types.Update: The updated information after deleting the message.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"CreatePoll\",\n \"file\": \"rubpy/methods/messages/create_poll.py\",\n \"doc\": \"Provides a method to create a poll message.\\n\\nMethods:\\n- create_poll: Create a poll message with the specified parameters.\\n\\nAttributes:\\n- self (rubpy.Client): The rubpy client instance.\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"create_poll\",\n \"file\": \"rubpy/methods/messages/create_poll.py\",\n \"doc\": \"Create a poll message with the specified parameters.\\n\\nParameters:\\n- object_guid (str): The GUID of the object associated with the poll (e.g., user, group, channel).\\n- question (str): The question for the poll.\\n- options (list): A list of string values representing the poll options.\\n- type (str): The type of the poll, can be 'Regular' or 'Quiz'.\\n- is_anonymous (bool): Whether the poll is anonymous or not.\\n- allows_multiple_answers (bool): Whether the poll allows multiple answers or not.\\n- correct_option_index (Union[int, str]): The index or ID of the correct option for quiz-type polls.\\n- explanation (str): An explanation for the correct answer in quiz-type polls.\\n- reply_to_message_id (Union[str, int]): The ID of the message to reply to.\\n\\nReturns:\\n- rubpy.types.Update: The updated information after creating the poll.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"DeleteMessages\",\n \"file\": \"rubpy/methods/messages/delete_messages.py\",\n \"doc\": \"Provides a method to delete messages.\\n\\nMethods:\\n- delete_messages: Delete specified messages associated with the given object.\\n\\nAttributes:\\n- self (rubpy.Client): The rubpy client instance.\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"delete_messages\",\n \"file\": \"rubpy/methods/messages/delete_messages.py\",\n \"doc\": \"Delete specified messages associated with the given object.\\n\\nParameters:\\n- object_guid (str): The GUID of the object associated with the messages (e.g., user, group, channel).\\n- message_ids (Union[str, list]): The ID or list of IDs of the messages to be deleted.\\n- type (str): The type of deletion, can be 'Global' or 'Local'.\\n\\nReturns:\\n- rubpy.types.Update: The updated information after deleting the messages.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"EditMessage\",\n \"file\": \"rubpy/methods/messages/edit_message.py\",\n \"doc\": \"Provides a method to edit a message.\\n\\nMethods:\\n- edit_message: Edit the specified message associated with the given object.\\n\\nAttributes:\\n- self (rubpy.Client): The rubpy client instance.\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"edit_message\",\n \"file\": \"rubpy/methods/messages/edit_message.py\",\n \"doc\": \"Edit the specified message associated with the given object.\\n\\nParameters:\\n- object_guid (str): The GUID of the object associated with the message (e.g., user, group, channel).\\n- message_id (Union[int, str]): The ID of the message to be edited.\\n- text (str): The new text content for the message.\\n- parse_mode (str): The parse mode for the text, can be 'markdown' or 'html'. Defaults to None.\\n\\nReturns:\\n- rubpy.types.Update: The updated information after editing the message.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"ForwardMessages\",\n \"file\": \"rubpy/methods/messages/forward_messages.py\",\n \"doc\": \"Provides a method to forward messages from one object to another.\\n\\nMethods:\\n- forward_messages: Forward specified messages from one object to another.\\n\\nAttributes:\\n- self (rubpy.Client): The rubpy client instance.\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"forward_messages\",\n \"file\": \"rubpy/methods/messages/forward_messages.py\",\n \"doc\": \"Forward specified messages from one object to another.\\n\\nParameters:\\n- from_object_guid (str): The GUID of the source object from which messages are forwarded.\\n- to_object_guid (str): The GUID of the destination object to which messages are forwarded.\\n- message_ids (Union[str, int, list]): The IDs of the messages to be forwarded. Can be a single ID or a list of IDs.\\n\\nReturns:\\n- rubpy.types.Update: The updated information after forwarding the messages.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"GetMessageReactions\",\n \"file\": \"rubpy/methods/messages/get_message_reactions.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_message_reactions\",\n \"file\": \"rubpy/methods/messages/get_message_reactions.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"GetMessageShareUrl\",\n \"file\": \"rubpy/methods/messages/get_message_share_url.py\",\n \"doc\": \"Provides a method to get the shareable URL of a specific message.\\n\\nMethods:\\n- get_message_url: Get the shareable URL of a specific message.\\n\\nAttributes:\\n- self (rubpy.Client): The rubpy client instance.\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_message_url\",\n \"file\": \"rubpy/methods/messages/get_message_share_url.py\",\n \"doc\": \"Get the shareable URL of a specific message.\\n\\nParameters:\\n- object_guid (str): The GUID of the object to which the message belongs.\\n- message_id (str): The ID of the message for which to retrieve the shareable URL.\\n\\nReturns:\\n- rubpy.types.Update: The shareable URL of the specified message.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"GetMessages\",\n \"file\": \"rubpy/methods/messages/get_messages.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_messages\",\n \"file\": \"rubpy/methods/messages/get_messages.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"GetMessagesByID\",\n \"file\": \"rubpy/methods/messages/get_messages_by_id.py\",\n \"doc\": \"Provides a method to retrieve messages by their IDs.\\n\\nMethods:\\n- get_messages_by_id: Retrieve messages by their IDs.\\n\\nAttributes:\\n- self (rubpy.Client): The rubpy client instance.\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_messages_by_id\",\n \"file\": \"rubpy/methods/messages/get_messages_by_id.py\",\n \"doc\": \"Retrieve messages by their IDs.\\n\\nParameters:\\n- object_guid (str): The GUID of the object to which the messages belong.\\n- message_ids (Union[str, list]): The ID or list of IDs of the messages to retrieve.\\n\\nReturns:\\n- rubpy.types.Update: The retrieved messages identified by their IDs.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"GetMessagesInterval\",\n \"file\": \"rubpy/methods/messages/get_messages_interval.py\",\n \"doc\": \"Provides a method to retrieve messages in an interval around a middle message ID.\\n\\nMethods:\\n- get_messages_interval: Retrieve messages in an interval around a middle message ID.\\n\\nAttributes:\\n- self (rubpy.Client): The rubpy client instance.\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_messages_interval\",\n \"file\": \"rubpy/methods/messages/get_messages_interval.py\",\n \"doc\": \"Retrieve messages in an interval around a middle message ID.\\n\\nParameters:\\n- object_guid (str): The GUID of the object to which the messages belong.\\n- middle_message_id (Union[int, str]): The middle message ID around which the interval is determined.\\n\\nReturns:\\n- rubpy.types.Update: The retrieved messages in the specified interval.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"GetMessagesUpdates\",\n \"file\": \"rubpy/methods/messages/get_messages_updates.py\",\n \"doc\": \"Provides a method to get message updates for a specific object.\\n\\nMethods:\\n- get_messages_updates: Get message updates for a specific object.\\n\\nAttributes:\\n- self (rubpy.Client): The rubpy client instance.\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_messages_updates\",\n \"file\": \"rubpy/methods/messages/get_messages_updates.py\",\n \"doc\": \"Get message updates for a specific object.\\n\\nParameters:\\n- object_guid (str): The GUID of the object for which updates are requested.\\n- state (int): The state at which updates are requested. Defaults to a timestamp approximately 150 seconds ago.\\n\\nReturns:\\n- rubpy.types.Update: The message updates for the specified object.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"GetPollOptionVoters\",\n \"file\": \"rubpy/methods/messages/get_poll_option_voters.py\",\n \"doc\": \"Provides a method to get voters for a specific poll option.\\n\\nMethods:\\n- get_poll_option_voters: Get voters for a specific poll option.\\n\\nAttributes:\\n- self (rubpy.Client): The rubpy client instance.\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_poll_option_voters\",\n \"file\": \"rubpy/methods/messages/get_poll_option_voters.py\",\n \"doc\": \"Get voters for a specific poll option.\\n\\nParameters:\\n- poll_id (str): The ID of the poll for which voters are requested.\\n- selection_index (Union[str, int]): The index of the poll option for which voters are requested.\\n- start_id (Optional[str]): The ID from which to start fetching voters. Defaults to None.\\n\\nReturns:\\n- rubpy.types.Update: The voters for the specified poll option.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"GetPollStatus\",\n \"file\": \"rubpy/methods/messages/get_poll_status.py\",\n \"doc\": \"Provides a method to get the status of a specific poll.\\n\\nMethods:\\n- get_poll_status: Get the status of a specific poll.\\n\\nAttributes:\\n- self (rubpy.Client): The rubpy client instance.\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_poll_status\",\n \"file\": \"rubpy/methods/messages/get_poll_status.py\",\n \"doc\": \"Get the status of a specific poll.\\n\\nParameters:\\n- poll_id (str): The ID of the poll for which the status is requested.\\n\\nReturns:\\n- rubpy.types.Update: The status of the specified poll.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"Reaction\",\n \"file\": \"rubpy/methods/messages/reaction.py\",\n \"doc\": \"Provides a method to add a reaction to a specific message.\\n\\nMethods:\\n- reaction: Add a reaction to a specific message.\\n\\nAttributes:\\n- self (rubpy.Client): The rubpy client instance.\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"reaction\",\n \"file\": \"rubpy/methods/messages/reaction.py\",\n \"doc\": \"Add a reaction to a specific message.\\n\\nParameters:\\n- object_guid (str): The GUID of the object associated with the message.\\n- message_id (str): The ID of the message to which the reaction will be added.\\n- reaction_id (int): The ID of the reaction to be added.\\n\\nReturns:\\n- rubpy.types.Update: The update indicating the success of adding the reaction.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"RemoveReaction\",\n \"file\": \"rubpy/methods/messages/remove_reaction.py\",\n \"doc\": \"Provides a method to remove a reaction from a specific message.\\n\\nMethods:\\n- remove_reaction: Remove a reaction from a specific message.\\n\\nAttributes:\\n- self (rubpy.Client): The rubpy client instance.\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"remove_reaction\",\n \"file\": \"rubpy/methods/messages/remove_reaction.py\",\n \"doc\": \"Remove a reaction from a specific message.\\n\\nParameters:\\n- object_guid (str): The GUID of the object associated with the message.\\n- message_id (str): The ID of the message from which the reaction will be removed.\\n- reaction_id (int): The ID of the reaction to be removed.\\n\\nReturns:\\n- rubpy.types.Update: The update indicating the success of removing the reaction.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"RequestSendFile\",\n \"file\": \"rubpy/methods/messages/request_send_file.py\",\n \"doc\": \"Provides a method to request sending a file.\\n\\nMethods:\\n- request_send_file: Request sending a file.\\n\\nAttributes:\\n- self (rubpy.Client): The rubpy client instance.\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"request_send_file\",\n \"file\": \"rubpy/methods/messages/request_send_file.py\",\n \"doc\": \"Request sending a file.\\n\\nParameters:\\n- file_name (str): The name of the file to be sent.\\n- size (Union[str, int, float]): The size of the file to be sent.\\n- mime (str, optional): The MIME type of the file. If None, it will be derived from the file name.\\n\\nReturns:\\n- rubpy.types.Update: The update indicating the success of the file sending request.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"SendDocument\",\n \"file\": \"rubpy/methods/messages/send_document.py\",\n \"doc\": \"Provides a method to send a document.\\n\\nMethods:\\n- send_document: Send a document.\\n\\nAttributes:\\n- self (rubpy.Client): The rubpy client instance.\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"send_document\",\n \"file\": \"rubpy/methods/messages/send_document.py\",\n \"doc\": \"Send a document.\\n\\nParameters:\\n- object_guid (str): The GUID of the recipient.\\n- document (Union[Path, bytes]): The document data.\\n- caption (Optional[str]): The caption for the document. Defaults to None.\\n- reply_to_message_id (Optional[str]): The ID of the message to which this is a reply. Defaults to None.\\n- auto_delete (Optional[int]): Auto-delete duration in seconds. Defaults to None.\\n\\nReturns:\\n- rubpy.types.Update: The update indicating the success of the document sending.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"SendGif\",\n \"file\": \"rubpy/methods/messages/send_gif.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"send_gif\",\n \"file\": \"rubpy/methods/messages/send_gif.py\",\n \"doc\": \"Send a gif.\\n\\nArgs:\\n object_guid (str):\\n The GUID of the recipient.\\n\\n gif (Path, bytes):\\n The gif data.\\n\\n caption (str, optional):\\n The caption for the gif. Defaults to None.\\n\\n reply_to_message_id (str, optional):\\n The ID of the message to which this is a reply. Defaults to None.\\n\\n auto_delete (int, optional):\\n Auto-delete duration in seconds. Defaults to None.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_mime_from_url\",\n \"file\": \"rubpy/methods/messages/send_message.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"SendMessage\",\n \"file\": \"rubpy/methods/messages/send_message.py\",\n \"doc\": \"Class to send messages with attachments.\\n\\nMethods:\\n- send_message: Send a message with various optional parameters.\\n\\nAttributes:\\n- self (rubpy.Client): The rubpy client instance.\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"send_message\",\n \"file\": \"rubpy/methods/messages/send_message.py\",\n \"doc\": \"Send a message with optional parameters.\\n\\nParameters:\\n- object_guid (str): The GUID of the recipient.\\n- text (Optional[str]): The text of the message. Defaults to None.\\n- reply_to_message_id (Optional[str]): The ID of the message to which this is a reply. Defaults to None.\\n- file_inline (Optional[Union[Update, Path, bytes]]): The file to be sent inline with the message. Defaults to None.\\n- sticker (Optional[Union[Update, dict]]): The sticker to be sent with the message. Defaults to None.\\n- type (str): The type of the message, e.g., 'File', 'Music', 'Voice', etc. Defaults to 'File'.\\n- is_spoil (bool): Whether the message should be marked as a spoiler. Defaults to False.\\n- thumb (bool): Whether to include a thumbnail. Defaults to True.\\n- auto_delete (Optional[Union[int, float]]): Auto-delete duration in seconds. Defaults to None.\\n- parse_mode (Optional[Union[ParseMode, str]]): The parse mode for the text. Defaults to None.\\n- args, kwargs: Additional arguments and keyword arguments.\\n\\nReturns:\\n- rubpy.types.Update: The update indicating the success of the message sending.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"SendMusic\",\n \"file\": \"rubpy/methods/messages/send_music.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"send_music\",\n \"file\": \"rubpy/methods/messages/send_music.py\",\n \"doc\": \"Send a music.\\n\\nArgs:\\n object_guid (str):\\n The GUID of the recipient.\\n\\n music (Path, bytes):\\n The music data.\\n\\n caption (str, optional):\\n The caption for the music. Defaults to None.\\n\\n reply_to_message_id (str, optional):\\n The ID of the message to which this is a reply. Defaults to None.\\n\\n auto_delete (int, optional):\\n Auto-delete duration in seconds. Defaults to None.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"SendPhoto\",\n \"file\": \"rubpy/methods/messages/send_photo.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"send_photo\",\n \"file\": \"rubpy/methods/messages/send_photo.py\",\n \"doc\": \"Send a photo.\\n\\nArgs:\\n object_guid (str):\\n The GUID of the recipient.\\n\\n photo (Path, bytes):\\n The photo data.\\n\\n caption (str, optional):\\n The caption for the photo. Defaults to None.\\n\\n reply_to_message_id (str, optional):\\n The ID of the message to which this is a reply. Defaults to None.\\n\\n is_spoil (bool, optional):\\n Whether the photo should be marked as a spoiler. Defaults to False.\\n\\n auto_delete (int, optional):\\n Auto-delete duration in seconds. Defaults to None.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"SendSticker\",\n \"file\": \"rubpy/methods/messages/send_sticker.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"send_sticker\",\n \"file\": \"rubpy/methods/messages/send_sticker.py\",\n \"doc\": \"Send a sticker.\\n\\nArgs:\\n - object_guid (str):\\n The GUID of the recipient.\\n\\n - emoji_character (str):\\n The emoji character associated with the sticker.\\n\\n - sticker_id (str):\\n The ID of the sticker.\\n\\n - sticker_set_id (str):\\n The ID of the sticker set.\\n\\n - file (dict):\\n The file data for the sticker.\\n\\n - w_h_ratio (str, optional):\\n The width-to-height ratio of the sticker. Defaults to '1.0'.\\n\\n - reply_to_message_id (str, optional):\\n The ID of the message to which this is a reply. Defaults to None.\\n\\n - auto_delete (int, optional):\\n Auto-delete duration in seconds. Defaults to None.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"SendVideo\",\n \"file\": \"rubpy/methods/messages/send_video.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"send_video\",\n \"file\": \"rubpy/methods/messages/send_video.py\",\n \"doc\": \"Send a video.\\n\\nArgs:\\n - object_guid (str):\\n The GUID of the recipient.\\n\\n - video (Union[Path, bytes]):\\n The video data.\\n\\n - caption (str, optional):\\n The caption for the video. Defaults to None.\\n\\n - reply_to_message_id (str, optional):\\n The ID of the message to which this is a reply. Defaults to None.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"SendVideoMessage\",\n \"file\": \"rubpy/methods/messages/send_video_message.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"send_video_message\",\n \"file\": \"rubpy/methods/messages/send_video_message.py\",\n \"doc\": \"Send a video message.\\n\\nArgs:\\n - object_guid (str):\\n The GUID of the recipient.\\n\\n - video_message (Union[Path, bytes]):\\n The video message data.\\n\\n - caption (str, optional):\\n The caption for the video message. Defaults to None.\\n\\n - reply_to_message_id (str, optional):\\n The ID of the message to which this is a reply. Defaults to None.\\n\\n - auto_delete (int, optional):\\n Auto-delete duration in seconds. Defaults to None.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"SendVoice\",\n \"file\": \"rubpy/methods/messages/send_voice.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"send_voice\",\n \"file\": \"rubpy/methods/messages/send_voice.py\",\n \"doc\": \"Send a voice.\\n\\nArgs:\\n object_guid (str):\\n The GUID of the recipient.\\n\\n voice (Union[Path, bytes]):\\n The voice data.\\n\\n caption (str, optional):\\n The caption for the voice. Defaults to None.\\n\\n reply_to_message_id (str, optional):\\n The ID of the message to which this is a reply. Defaults to None.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"SetPinMessage\",\n \"file\": \"rubpy/methods/messages/set_pin_message.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"set_pin_message\",\n \"file\": \"rubpy/methods/messages/set_pin_message.py\",\n \"doc\": \"Set or unset a pin on a message.\\n\\nArgs:\\n - object_guid (str): The GUID of the recipient.\\n - message_id (Union[str, int]): The ID of the message to pin or unpin.\\n - action (Literal['Pin', 'Unpin']): The action to perform, either 'Pin' or 'Unpin'.\\n\\nReturns:\\n - rubpy.types.Update: The update indicating the success of the operation.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"set_pin\",\n \"file\": \"rubpy/methods/messages/set_pin_message.py\",\n \"doc\": \"Set a pin on a message.\\n\\nArgs:\\n - object_guid (str): The GUID of the recipient.\\n - message_id (Union[str, int]): The ID of the message to pin.\\n\\nReturns:\\n - rubpy.types.Update: The update indicating the success of setting the pin.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"set_unpin\",\n \"file\": \"rubpy/methods/messages/set_pin_message.py\",\n \"doc\": \"Unset a pin on a message.\\n\\nArgs:\\n - object_guid (str): The GUID of the recipient.\\n - message_id (Union[str, int]): The ID of the message to unpin.\\n\\nReturns:\\n - rubpy.types.Update: The update indicating the success of unsetting the pin.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"VotePoll\",\n \"file\": \"rubpy/methods/messages/vote_poll.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"vote_poll\",\n \"file\": \"rubpy/methods/messages/vote_poll.py\",\n \"doc\": \"Vote on a poll option.\\n\\nArgs:\\n poll_id (str): The ID of the poll.\\n selection_index (Union[str, int]): The index of the option to vote for.\\n\\nReturns:\\n rubpy.types.Update: The update indicating the success of the vote.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"Settings\",\n \"file\": \"rubpy/methods/settings/__init__.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"DeleteFolder\",\n \"file\": \"rubpy/methods/settings/delete_folder.py\",\n \"doc\": \"Provides a method to delete a folder.\\n\\nMethods:\\n- delete_folder: Delete a folder.\\n\\nAttributes:\\n- self (rubpy.Client): The rubpy client instance.\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"delete_folder\",\n \"file\": \"rubpy/methods/settings/delete_folder.py\",\n \"doc\": \"Delete a folder.\\n\\nParameters:\\n- folder_id (str): The ID of the folder to be deleted.\\n\\nReturns:\\n- rubpy.types.Update: Result of the delete folder operation.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"GetBlockedUsers\",\n \"file\": \"rubpy/methods/settings/get_blocked_users.py\",\n \"doc\": \"Provides a method to get a list of blocked users.\\n\\nMethods:\\n- get_blocked_users: Get a list of blocked users.\\n\\nAttributes:\\n- self (rubpy.Client): The rubpy client instance.\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_blocked_users\",\n \"file\": \"rubpy/methods/settings/get_blocked_users.py\",\n \"doc\": \"Get a list of blocked users.\\n\\nReturns:\\n- rubpy.types.Update: List of blocked users.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"GetFolders\",\n \"file\": \"rubpy/methods/settings/get_folders.py\",\n \"doc\": \"Provides a method to get a list of folders.\\n\\nMethods:\\n- get_folders: Get a list of folders.\\n\\nAttributes:\\n- self (rubpy.Client): The rubpy client instance.\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_folders\",\n \"file\": \"rubpy/methods/settings/get_folders.py\",\n \"doc\": \"Get a list of folders.\\n\\nParameters:\\n- last_state (Union[int, str]): The last state to retrieve folders.\\n\\nReturns:\\n- rubpy.types.Update: List of folders.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"GetMySessions\",\n \"file\": \"rubpy/methods/settings/get_my_sessions.py\",\n \"doc\": \"Provides a method to get information about the current user's sessions.\\n\\nMethods:\\n- get_my_sessions: Get information about the current user's sessions.\\n\\nAttributes:\\n- self (rubpy.Client): The rubpy client instance.\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_my_sessions\",\n \"file\": \"rubpy/methods/settings/get_my_sessions.py\",\n \"doc\": \"Get information about the current user's sessions.\\n\\nReturns:\\n- rubpy.types.Update: Information about the user's sessions.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"GetPrivacySetting\",\n \"file\": \"rubpy/methods/settings/get_privacy_setting.py\",\n \"doc\": \"Provides a method to get the current user's privacy setting.\\n\\nMethods:\\n- get_privacy_setting: Get the current user's privacy setting.\\n\\nAttributes:\\n- self (rubpy.Client): The rubpy client instance.\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_privacy_setting\",\n \"file\": \"rubpy/methods/settings/get_privacy_setting.py\",\n \"doc\": \"Get the current user's privacy setting.\\n\\nReturns:\\n- rubpy.types.Update: The current user's privacy setting.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"GetSuggestedFolders\",\n \"file\": \"rubpy/methods/settings/get_suggested_folders.py\",\n \"doc\": \"Provides a method to get the suggested folders for the user.\\n\\nMethods:\\n- get_suggested_folders: Get the suggested folders for the user.\\n\\nAttributes:\\n- self (rubpy.Client): The rubpy client instance.\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_suggested_folders\",\n \"file\": \"rubpy/methods/settings/get_suggested_folders.py\",\n \"doc\": \"Get the suggested folders for the user.\\n\\nReturns:\\n- rubpy.types.Update: The suggested folders for the user.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"GetTwoPasscodeStatus\",\n \"file\": \"rubpy/methods/settings/get_two_passcode_status.py\",\n \"doc\": \"Provides a method to get the two-passcode status for the user.\\n\\nMethods:\\n- get_two_passcode_status: Get the two-passcode status for the user.\\n\\nAttributes:\\n- self (rubpy.Client): The rubpy client instance.\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_two_passcode_status\",\n \"file\": \"rubpy/methods/settings/get_two_passcode_status.py\",\n \"doc\": \"Get the two-passcode status for the user.\\n\\nReturns:\\n- rubpy.types.Update: The two-passcode status for the user.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"SetSetting\",\n \"file\": \"rubpy/methods/settings/set_setting.py\",\n \"doc\": \"Provides a method to set various privacy settings for the user.\\n\\nMethods:\\n- set_setting: Set various privacy settings for the user.\\n\\nAttributes:\\n- self (rubpy.Client): The rubpy client instance.\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"set_setting\",\n \"file\": \"rubpy/methods/settings/set_setting.py\",\n \"doc\": \"Set various privacy settings for the user.\\n\\nParameters:\\n- show_my_last_online (Optional[str]): Privacy setting for showing last online status.\\n- show_my_phone_number (Optional[str]): Privacy setting for showing phone number.\\n- show_my_profile_photo (Optional[str]): Privacy setting for showing profile photo.\\n- link_forward_message (Optional[str]): Privacy setting for link forwarding messages.\\n- can_join_chat_by (Optional[str]): Privacy setting for who can join chats.\\n\\nReturns:\\n- rubpy.types.Update: The updated privacy settings.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"SetupTwoStepVerification\",\n \"file\": \"rubpy/methods/settings/setup_two_step_verification.py\",\n \"doc\": \"Provides a method to set up two-step verification for the user.\\n\\nMethods:\\n- setup_two_step_verification: Set up two-step verification for the user.\\n\\nAttributes:\\n- self (rubpy.Client): The rubpy client instance.\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"setup_two_step_verification\",\n \"file\": \"rubpy/methods/settings/setup_two_step_verification.py\",\n \"doc\": \"Set up two-step verification for the user.\\n\\nParameters:\\n- password (Union[int, str]): The current user password.\\n- hint (str): A hint to help remember the password.\\n- recovery_email (str): The recovery email for two-step verification.\\n\\nReturns:\\n- rubpy.types.Update: The updated user information after setting up two-step verification.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"TerminateOtherSessions\",\n \"file\": \"rubpy/methods/settings/terminate_other_sessions.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"terminate_other_sessions\",\n \"file\": \"rubpy/methods/settings/terminate_other_sessions.py\",\n \"doc\": \"Terminate other account sessions.\\n\\nReturns:\\n- rubpy.types.Update: The updated user information after terminating the session.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"TerminateSession\",\n \"file\": \"rubpy/methods/settings/terminate_session.py\",\n \"doc\": \"Provides a method to terminate a user session.\\n\\nMethods:\\n- terminate_session: Terminate a user session.\\n\\nAttributes:\\n- self (rubpy.Client): The rubpy client instance.\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"terminate_session\",\n \"file\": \"rubpy/methods/settings/terminate_session.py\",\n \"doc\": \"Terminate a user session.\\n\\nParameters:\\n- session_key (str): The session key of the session to be terminated.\\n\\nReturns:\\n- rubpy.types.Update: The updated user information after terminating the session.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"UpdateProfile\",\n \"file\": \"rubpy/methods/settings/update_profile.py\",\n \"doc\": \"Provides a method to update user profile information.\\n\\nMethods:\\n- update_profile: Update user profile information.\\n\\nAttributes:\\n- self (rubpy.Client): The rubpy client instance.\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"update_profile\",\n \"file\": \"rubpy/methods/settings/update_profile.py\",\n \"doc\": \"Update user profile information.\\n\\nParameters:\\n- first_name (Optional[str]): The updated first name.\\n- last_name (Optional[str]): The updated last name.\\n- bio (Optional[str]): The updated biography.\\n\\nReturns:\\n- rubpy.types.Update: The updated user information after the profile update.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"UpdateUsername\",\n \"file\": \"rubpy/methods/settings/update_username.py\",\n \"doc\": \"Provides a method to update the username of the user.\\n\\nMethods:\\n- update_username: Update the username of the user.\\n\\nAttributes:\\n- self (rubpy.Client): The rubpy client instance.\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"update_username\",\n \"file\": \"rubpy/methods/settings/update_username.py\",\n \"doc\": \"Update the username of the user.\\n\\nParameters:\\n- username (str): The new username for the user.\\n\\nReturns:\\n- rubpy.types.Update: The updated user information after the username update.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"Stickers\",\n \"file\": \"rubpy/methods/stickers/__init__.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"ActionOnStickerSet\",\n \"file\": \"rubpy/methods/stickers/action_on_sticker_set.py\",\n \"doc\": \"Provides a method to perform actions on a sticker set.\\n\\nMethods:\\n- action_on_sticker_set: Add or remove a sticker set.\\n\\nAttributes:\\n- self (rubpy.Client): The rubpy client instance.\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"action_on_sticker_set\",\n \"file\": \"rubpy/methods/stickers/action_on_sticker_set.py\",\n \"doc\": \"Add or remove a sticker set.\\n\\nArgs:\\n- sticker_set_id (str): The ID of the sticker set.\\n- action (str, optional): The action to perform, either 'Add' or 'Remove'.\\n\\nRaises:\\n- ValueError: If the action is not 'Add' or 'Remove'.\\n\\nReturns:\\n- The result of the add/remove operation.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"GetMyStickerSets\",\n \"file\": \"rubpy/methods/stickers/get_my_sticker_sets.py\",\n \"doc\": \"Provides a method to get the sticker sets owned by the user.\\n\\nMethods:\\n- get_my_sticker_sets: Get the sticker sets owned by the user.\\n\\nAttributes:\\n- self (rubpy.Client): The rubpy client instance.\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_my_sticker_sets\",\n \"file\": \"rubpy/methods/stickers/get_my_sticker_sets.py\",\n \"doc\": \"Get the sticker sets owned by the user.\\n\\nReturns:\\n- The sticker sets owned by the user.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"GetStickerSetByID\",\n \"file\": \"rubpy/methods/stickers/get_sticker_set_by_id.py\",\n \"doc\": \"Provides a method to get a sticker set by its ID.\\n\\nMethods:\\n- get_sticker_set_by_id: Get a sticker set by its ID.\\n\\nAttributes:\\n- self (rubpy.Client): The rubpy client instance.\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_sticker_set_by_id\",\n \"file\": \"rubpy/methods/stickers/get_sticker_set_by_id.py\",\n \"doc\": \"Get a sticker set by its ID.\\n\\nParameters:\\n- sticker_set_id (str): The ID of the sticker set.\\n\\nReturns:\\n- The sticker set corresponding to the provided ID.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"GetStickersByEmoji\",\n \"file\": \"rubpy/methods/stickers/get_stickers_by_emoji.py\",\n \"doc\": \"Provides a method to get stickers by emoji.\\n\\nMethods:\\n- get_stickers_by_emoji: Get stickers by emoji.\\n\\nAttributes:\\n- self (rubpy.Client): The rubpy client instance.\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_stickers_by_emoji\",\n \"file\": \"rubpy/methods/stickers/get_stickers_by_emoji.py\",\n \"doc\": \"Get stickers by emoji.\\n\\nParameters:\\n- emoji (str): The emoji character.\\n- suggest_by (str): The type of suggestion (default is 'All').\\n\\nReturns:\\n- Stickers corresponding to the provided emoji and suggestion type.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"GetStickersBySetIDs\",\n \"file\": \"rubpy/methods/stickers/get_stickers_by_set_ids.py\",\n \"doc\": \"Provides a method to get stickers by set IDs.\\n\\nMethods:\\n- get_stickers_by_set_ids: Get stickers by set IDs.\\n\\nAttributes:\\n- self (rubpy.Client): The rubpy client instance.\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_stickers_by_set_ids\",\n \"file\": \"rubpy/methods/stickers/get_stickers_by_set_ids.py\",\n \"doc\": \"Get stickers by set IDs.\\n\\nParameters:\\n- sticker_set_ids (Union[str, list]): The sticker set ID or a list of sticker set IDs.\\n\\nReturns:\\n- Stickers corresponding to the provided set IDs.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"GetTrendStickerSets\",\n \"file\": \"rubpy/methods/stickers/get_trend_sticker_sets.py\",\n \"doc\": \"Provides a method to get trending sticker sets.\\n\\nMethods:\\n- get_trend_sticker_sets: Get trending sticker sets.\\n\\nAttributes:\\n- self (rubpy.Client): The rubpy client instance.\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_trend_sticker_sets\",\n \"file\": \"rubpy/methods/stickers/get_trend_sticker_sets.py\",\n \"doc\": \"Get trending sticker sets.\\n\\nParameters:\\n- start_id (str): The start ID for pagination.\\n\\nReturns:\\n- Trending sticker sets.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"SearchStickers\",\n \"file\": \"rubpy/methods/stickers/search_stickers.py\",\n \"doc\": \"Provides a method to search for stickers.\\n\\nMethods:\\n- search_stickers: Search for stickers.\\n\\nAttributes:\\n- self (rubpy.Client): The rubpy client instance.\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"search_stickers\",\n \"file\": \"rubpy/methods/stickers/search_stickers.py\",\n \"doc\": \"Search for stickers.\\n\\nParameters:\\n- search_text (str): The search text.\\n- start_id (str): The start ID for pagination.\\n\\nReturns:\\n- Stickers matching the search criteria.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"Users\",\n \"file\": \"rubpy/methods/users/__init__.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"CheckUserUsername\",\n \"file\": \"rubpy/methods/users/check_user_username.py\",\n \"doc\": \"Provides a method to check the availability of a username for a user.\\n\\nMethods:\\n- check_user_username: Check the availability of a username.\\n\\nAttributes:\\n- self (rubpy.Client): The rubpy client instance.\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"check_user_username\",\n \"file\": \"rubpy/methods/users/check_user_username.py\",\n \"doc\": \"Check the availability of a username for a user.\\n\\nArgs:\\n- username (str): The username to be checked.\\n\\nReturns:\\n- The result of the username availability check.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"DeleteUserChat\",\n \"file\": \"rubpy/methods/users/delete_user_chat.py\",\n \"doc\": \"Provides a method to delete a user chat.\\n\\nMethods:\\n- delete_user_chat: Delete a user chat.\\n\\nAttributes:\\n- self (rubpy.Client): The rubpy client instance.\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"delete_user_chat\",\n \"file\": \"rubpy/methods/users/delete_user_chat.py\",\n \"doc\": \"Delete a user chat.\\n\\nArgs:\\n- user_guid (str): The GUID of the user whose chat is to be deleted.\\n- last_deleted_message_id (Union[str, int]): The last deleted message ID.\\n\\nReturns:\\n- The result of the user chat deletion.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"GetMe\",\n \"file\": \"rubpy/methods/users/get_me.py\",\n \"doc\": \"Provides a method to get information about the authenticated user.\\n\\nMethods:\\n- get_me: Get information about the authenticated user.\\n\\nAttributes:\\n- self (rubpy.Client): The rubpy client instance.\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_me\",\n \"file\": \"rubpy/methods/users/get_me.py\",\n \"doc\": \"Get information about the authenticated user.\\n\\nReturns:\\n- Information about the authenticated user.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"GetUserInfo\",\n \"file\": \"rubpy/methods/users/get_user_info.py\",\n \"doc\": \"Provides a method to get information about a user.\\n\\nMethods:\\n- get_user_info: Get information about a specific user.\\n\\nAttributes:\\n- self (rubpy.Client): The rubpy client instance.\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_user_info\",\n \"file\": \"rubpy/methods/users/get_user_info.py\",\n \"doc\": \"Get information about a specific user.\\n\\nArgs:\\n- user_guid (str, optional): The GUID of the user to get information about.\\n\\nReturns:\\n- Information about the specified user.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"SetBlockUser\",\n \"file\": \"rubpy/methods/users/set_block_user.py\",\n \"doc\": \"Provides a method to block or unblock a user.\\n\\nMethods:\\n- set_block_user: Block or unblock a user.\\n\\nAttributes:\\n- self (rubpy.Client): The rubpy client instance.\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"set_block_user\",\n \"file\": \"rubpy/methods/users/set_block_user.py\",\n \"doc\": \"Block or unblock a user.\\n\\nArgs:\\n- user_guid (str): The GUID of the user to block or unblock.\\n- action (Literal['Block', 'Unblock'], optional): The action to perform, either 'Block' or 'Unblock'.\\n\\nRaises:\\n- ValueError: If the action is not 'Block' or 'Unblock'.\\n\\nReturns:\\n- The result of the block/unblock operation.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"Utilities\",\n \"file\": \"rubpy/methods/utilities/__init__.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"AddHandler\",\n \"file\": \"rubpy/methods/utilities/add_handler.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"add_handler\",\n \"file\": \"rubpy/methods/utilities/add_handler.py\",\n \"doc\": \"Add a handler function for updates.\\n\\nArgs:\\n- func (Callable): The handler function to be added.\\n- handler (rubpy.handlers.Handler): The handler object.\\n\\nReturns:\\n- None\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"AudioResult\",\n \"file\": \"rubpy/methods/utilities/audio.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"Audio\",\n \"file\": \"rubpy/methods/utilities/audio.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__init__\",\n \"file\": \"rubpy/methods/utilities/audio.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_audio_info\",\n \"file\": \"rubpy/methods/utilities/audio.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"Connect\",\n \"file\": \"rubpy/methods/utilities/connect.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"connect\",\n \"file\": \"rubpy/methods/utilities/connect.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"Disconnect\",\n \"file\": \"rubpy/methods/utilities/disconnect.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"disconnect\",\n \"file\": \"rubpy/methods/utilities/disconnect.py\",\n \"doc\": \"Disconnect from the Rubpy server.\\n\\nRaises:\\n- exceptions.NoConnection: If the client is not connected.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"Download\",\n \"file\": \"rubpy/methods/utilities/download.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"download\",\n \"file\": \"rubpy/methods/utilities/download.py\",\n \"doc\": \"Download a file using its file_inline information.\\n\\nArgs:\\n- file_inline (rubpy.types.Results): The file information used for downloading.\\n- save_as (str, optional): The path to save the downloaded file. If None, the file will not be saved.\\n- chunk_size (int, optional): The size of each chunk to download.\\n- callback (callable, optional): A callback function to monitor the download progress.\\n- *args, **kwargs: Additional parameters to pass to the download method.\\n\\nReturns:\\n- bytes: The binary data of the downloaded file.\\n\\nRaises:\\n- aiofiles.errors.OSFError: If there is an issue with file I/O (when saving the file).\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"DownloadProfilePicture\",\n \"file\": \"rubpy/methods/utilities/download_profile_picture.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"download_profile_picture\",\n \"file\": \"rubpy/methods/utilities/download_profile_picture.py\",\n \"doc\": \"Download the profile picture of a user, group, or channel.\\n\\nArgs:\\n- object_guid (str): The GUID of the user, group, channel or other chats.\\n\\nReturns:\\n- bytes: The binary data of the profile picture.\\n\\nRaises:\\n- rubpy.errors.ApiError: If there is an issue with the Rubpy API.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"GetMembers\",\n \"file\": \"rubpy/methods/utilities/get_members.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_members\",\n \"file\": \"rubpy/methods/utilities/get_members.py\",\n \"doc\": \"Get members of a group or channel.\\n\\nArgs:\\n- object_guid (str): The GUID of the group or channel.\\n- start_id (int, optional): The starting ID for fetching members.\\n- search_text (str, optional): The text to search for among members.\\n\\nReturns:\\n- rubpy.types.Update: An Update object containing information about the members.\\n\\nRaises:\\n- ValueError: If the object_guid does not start with 'c0' or 'g0'.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"GetUpdates\",\n \"file\": \"rubpy/methods/utilities/get_updates.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_updates\",\n \"file\": \"rubpy/methods/utilities/get_updates.py\",\n \"doc\": \"Get updates from the server.\\n\\nReturns:\\n- rubpy.types.Update: An Update object containing information about the updates.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"RemoveHandler\",\n \"file\": \"rubpy/methods/utilities/remove_handler.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"remove_handler\",\n \"file\": \"rubpy/methods/utilities/remove_handler.py\",\n \"doc\": \"Remove a handler function.\\n\\nArgs:\\n- func: The handler function to be removed.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"Run\",\n \"file\": \"rubpy/methods/utilities/run.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"run\",\n \"file\": \"rubpy/methods/utilities/run.py\",\n \"doc\": \"Run the client in either synchronous or asynchronous mode.\\n\\nArgs:\\n- coroutine (Optional[Coroutine]): An optional coroutine to run asynchronously.\\n- phone_number (str): The phone number to use for starting the client.\\n\\nReturns:\\n- If running synchronously, returns the initialized client.\\n- If running asynchronously, returns None.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"main_runner\",\n \"file\": \"rubpy/methods/utilities/run.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"convert_farsi_digits\",\n \"file\": \"rubpy/methods/utilities/start.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"normalize_phone_number\",\n \"file\": \"rubpy/methods/utilities/start.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"Start\",\n \"file\": \"rubpy/methods/utilities/start.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"start\",\n \"file\": \"rubpy/methods/utilities/start.py\",\n \"doc\": \"Start the RubPy client, handling user registration if necessary.\\n\\nArgs:\\n- phone_number (str): The phone number to use for starting the client.\\n\\nReturns:\\n- The initialized client.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"ResultMedia\",\n \"file\": \"rubpy/methods/utilities/thumbnail.py\",\n \"doc\": \"Represents media data along with its metadata.\\n\\nAttributes:\\n- image (bytes): The raw image data.\\n- width (int): The width of the media.\\n- height (int): The height of the media.\\n- seconds (int): The duration of the media in seconds.\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"MediaThumbnail\",\n \"file\": \"rubpy/methods/utilities/thumbnail.py\",\n \"doc\": \"Provides methods to generate media thumbnails.\\n\\nMethods:\\n- from_image: Generate a thumbnail from image data.\\n- from_video: Generate a thumbnail from video data.\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__repr__\",\n \"file\": \"rubpy/methods/utilities/thumbnail.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__init__\",\n \"file\": \"rubpy/methods/utilities/thumbnail.py\",\n \"doc\": \"Initialize ResultMedia with image data and metadata.\\n\\nArgs:\\n- image (bytes): The raw image data.\\n- width (int): The width of the media.\\n- height (int): The height of the media.\\n- seconds (int): The duration of the media in seconds.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"ndarray_to_bytes\",\n \"file\": \"rubpy/methods/utilities/thumbnail.py\",\n \"doc\": \"Convert NumPy array to bytes.\\n\\nArgs:\\n- image: NumPy array representing the image.\\n\\nReturns:\\n- bytes: The image data in bytes.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"to_base64\",\n \"file\": \"rubpy/methods/utilities/thumbnail.py\",\n \"doc\": \"Convert media data to base64.\\n\\nReturns:\\n- str: Base64-encoded media data.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"from_image\",\n \"file\": \"rubpy/methods/utilities/thumbnail.py\",\n \"doc\": \"Generate a thumbnail from image data.\\n\\nArgs:\\n- image (bytes): The raw image data.\\n\\nReturns:\\n- ResultMedia: ResultMedia object containing the thumbnail and metadata.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"from_video\",\n \"file\": \"rubpy/methods/utilities/thumbnail.py\",\n \"doc\": \"Generate a thumbnail from video data.\\n\\nArgs:\\n- video (bytes): The raw video data.\\n\\nReturns:\\n- ResultMedia: ResultMedia object containing the thumbnail and metadata.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"UploadFile\",\n \"file\": \"rubpy/methods/utilities/upload.py\",\n \"doc\": \"Provides a method to upload a file.\\n\\nMethods:\\n- upload: Upload a file.\\n\\nAttributes:\\n- self (rubpy.Client): The rubpy client instance.\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"upload\",\n \"file\": \"rubpy/methods/utilities/upload.py\",\n \"doc\": \"Upload a file.\\n\\nArgs:\\n- file: The file to be uploaded.\\n- *args: Additional positional arguments.\\n- **kwargs: Additional keyword arguments.\\n\\nReturns:\\n- The result of the file upload operation.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"VoiceCall\",\n \"file\": \"rubpy/methods/voice_chat/__init__.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"DiscardChatVoiceChat\",\n \"file\": \"rubpy/methods/voice_chat/discard_voice_chat.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"discard_voice_chat\",\n \"file\": \"rubpy/methods/voice_chat/discard_voice_chat.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"JoinVoiceChat\",\n \"file\": \"rubpy/methods/voice_chat/join_voice_chat.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"join_voice_chat\",\n \"file\": \"rubpy/methods/voice_chat/join_voice_chat.py\",\n \"doc\": \"Join to the group | channel voice chat.\\n\\nArgs:\\n- chat_guid (str): The GUID of the Chat.\\n- voice_chat_id (str): The voice chat ID.\\n- sdp_offer_data (str): SDP offer data.\\n\\nReturns:\\n- rubpy.types.Update: Update object confirming the change in default access.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"SendGroupVoiceChatActivity\",\n \"file\": \"rubpy/methods/voice_chat/send_group_voice_chat_activity.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"send_group_voice_chat_activity\",\n \"file\": \"rubpy/methods/voice_chat/send_group_voice_chat_activity.py\",\n \"doc\": \"Set group voice chat activity.\\n\\nArgs:\\n- chat_guid (str): The GUID of the Chat.\\n- voice_chat_id (str): The voice chat ID.\\n- participant_object_guid (str): Participant object guid, Defualt is `self.guid`.\\n- activity (str): Literal['Speaking'] and Defualt is `Speaking`.\\n\\nReturns:\\n- rubpy.types.Update: Update object confirming the change in default access.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"SetVoiceChatState\",\n \"file\": \"rubpy/methods/voice_chat/set_voice_chat_state.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"set_voice_chat_state\",\n \"file\": \"rubpy/methods/voice_chat/set_voice_chat_state.py\",\n \"doc\": \"Set group or channel voice chat state.\\n\\nArgs:\\n- chat_guid (str): The GUID of the Chat.\\n- voice_chat_id (str): The voice chat ID.\\n- participant_object_guid (str): Participant object guid, Defualt is `self.guid`.\\n- action (str): Literal['Mute', 'Unmute'] and Defualt is `Unmute`.\\n\\nReturns:\\n- rubpy.types.Update: Update object confirming the change in default access.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"_build_utf16_prefix_lengths\",\n \"file\": \"rubpy/parser/markdown.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"Markdown\",\n \"file\": \"rubpy/parser/markdown.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"to_markdown\",\n \"file\": \"rubpy/parser/markdown.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"to_metadata\",\n \"file\": \"rubpy/parser/markdown.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"PluginMeta\",\n \"file\": \"rubpy/plugins/base.py\",\n \"doc\": \"Metadata describing a plugin package.\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"Plugin\",\n \"file\": \"rubpy/plugins/base.py\",\n \"doc\": \"Base class that every Rubpy plugin must inherit from.\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__init__\",\n \"file\": \"rubpy/plugins/base.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"setup\",\n \"file\": \"rubpy/plugins/base.py\",\n \"doc\": \"Hook executed when the plugin is enabled. Can be sync or async.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"teardown\",\n \"file\": \"rubpy/plugins/base.py\",\n \"doc\": \"Hook executed when the plugin is disabled. Can be sync or async.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"configure\",\n \"file\": \"rubpy/plugins/base.py\",\n \"doc\": \"Override to validate/extend merged configuration before it is stored.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_config\",\n \"file\": \"rubpy/plugins/base.py\",\n \"doc\": \"Convenience access to the resolved configuration mapping.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"_merge_config\",\n \"file\": \"rubpy/plugins/base.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"identifier\",\n \"file\": \"rubpy/plugins/base.py\",\n \"doc\": \"Return the registry identifier for this plugin.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"PluginDefinitionError\",\n \"file\": \"rubpy/plugins/manager.py\",\n \"doc\": \"Raised when a plugin definition is invalid.\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"PluginLoadError\",\n \"file\": \"rubpy/plugins/manager.py\",\n \"doc\": \"Raised when a plugin fails to load or run hooks.\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"PluginManager\",\n \"file\": \"rubpy/plugins/manager.py\",\n \"doc\": \"Registers, discovers, and manages Rubpy plugins.\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__init__\",\n \"file\": \"rubpy/plugins/manager.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"discover_entrypoint_plugins\",\n \"file\": \"rubpy/plugins/manager.py\",\n \"doc\": \"Discover and register plugins advertised via entry points.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"register_plugin\",\n \"file\": \"rubpy/plugins/manager.py\",\n \"doc\": \"Register a Plugin subclass for later usage.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"unregister_plugin\",\n \"file\": \"rubpy/plugins/manager.py\",\n \"doc\": \"Remove a plugin registration. Does not teardown active instances.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"enable\",\n \"file\": \"rubpy/plugins/manager.py\",\n \"doc\": \"Instantiate (if necessary) and run setup for a plugin.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"enable_many\",\n \"file\": \"rubpy/plugins/manager.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"enable_all\",\n \"file\": \"rubpy/plugins/manager.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"disable\",\n \"file\": \"rubpy/plugins/manager.py\",\n \"doc\": \"Run teardown for an enabled plugin.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"disable_all\",\n \"file\": \"rubpy/plugins/manager.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"reload\",\n \"file\": \"rubpy/plugins/manager.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"registered_plugins\",\n \"file\": \"rubpy/plugins/manager.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"enabled_plugins\",\n \"file\": \"rubpy/plugins/manager.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_instance\",\n \"file\": \"rubpy/plugins/manager.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"is_registered\",\n \"file\": \"rubpy/plugins/manager.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"is_enabled\",\n \"file\": \"rubpy/plugins/manager.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"configure\",\n \"file\": \"rubpy/plugins/manager.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_config\",\n \"file\": \"rubpy/plugins/manager.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"_normalize\",\n \"file\": \"rubpy/plugins/manager.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"_enable_dependencies\",\n \"file\": \"rubpy/plugins/manager.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"_run_hook\",\n \"file\": \"rubpy/plugins/manager.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"_iter_entry_points\",\n \"file\": \"rubpy/plugins/manager.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"Rubino\",\n \"file\": \"rubpy/rubino/client.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__init__\",\n \"file\": \"rubpy/rubino/client.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__aenter__\",\n \"file\": \"rubpy/rubino/client.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__aexit__\",\n \"file\": \"rubpy/rubino/client.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"_execute_request\",\n \"file\": \"rubpy/rubino/client.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"_follow_unfollow_helper\",\n \"file\": \"rubpy/rubino/client.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_profile_list\",\n \"file\": \"rubpy/rubino/client.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"follow\",\n \"file\": \"rubpy/rubino/client.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"unfollow\",\n \"file\": \"rubpy/rubino/client.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_my_profile_info\",\n \"file\": \"rubpy/rubino/client.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"create_page\",\n \"file\": \"rubpy/rubino/client.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"update_profile\",\n \"file\": \"rubpy/rubino/client.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"is_exist_username\",\n \"file\": \"rubpy/rubino/client.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_post_by_share_link\",\n \"file\": \"rubpy/rubino/client.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"add_comment\",\n \"file\": \"rubpy/rubino/client.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"_like_unlike_helper\",\n \"file\": \"rubpy/rubino/client.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"like\",\n \"file\": \"rubpy/rubino/client.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"unlike\",\n \"file\": \"rubpy/rubino/client.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"view\",\n \"file\": \"rubpy/rubino/client.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_comments\",\n \"file\": \"rubpy/rubino/client.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_recent_following_posts\",\n \"file\": \"rubpy/rubino/client.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_profile_posts\",\n \"file\": \"rubpy/rubino/client.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_profiles_stories\",\n \"file\": \"rubpy/rubino/client.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"request_upload_file\",\n \"file\": \"rubpy/rubino/client.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_profile_highlights\",\n \"file\": \"rubpy/rubino/client.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_bookmarked_posts\",\n \"file\": \"rubpy/rubino/client.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_explore_posts\",\n \"file\": \"rubpy/rubino/client.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_blocked_profiles\",\n \"file\": \"rubpy/rubino/client.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_profile_followers\",\n \"file\": \"rubpy/rubino/client.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_profile_followings\",\n \"file\": \"rubpy/rubino/client.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_profile_info\",\n \"file\": \"rubpy/rubino/client.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"block_profile\",\n \"file\": \"rubpy/rubino/client.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"unblock_profile\",\n \"file\": \"rubpy/rubino/client.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_my_archive_stories\",\n \"file\": \"rubpy/rubino/client.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"remove_page\",\n \"file\": \"rubpy/rubino/client.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"upload_file\",\n \"file\": \"rubpy/rubino/client.py\",\n \"doc\": \"Upload a file to Rubino.\\n\\nParameters:\\n- file: File path or bytes.\\n- mime: MIME type of the file.\\n- file_name: Name of the file.\\n- chunk: Chunk size for uploading.\\n- callback: Progress callback.\\n\\nReturns:\\nResults object.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"add_post\",\n \"file\": \"rubpy/rubino/client.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"add_picture\",\n \"file\": \"rubpy/rubino/client.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"add_video\",\n \"file\": \"rubpy/rubino/client.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"ResultMedia\",\n \"file\": \"rubpy/rubino/thumbnail.py\",\n \"doc\": \"Represents media data along with its metadata.\\n\\nAttributes:\\n- image (bytes): The raw image data.\\n- width (int): The width of the media.\\n- height (int): The height of the media.\\n- seconds (int): The duration of the media in seconds.\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"MediaThumbnail\",\n \"file\": \"rubpy/rubino/thumbnail.py\",\n \"doc\": \"Provides methods to generate media thumbnails.\\n\\nMethods:\\n- from_image: Generate a thumbnail from image data.\\n- from_video: Generate a thumbnail from video data.\"\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__repr__\",\n \"file\": \"rubpy/rubino/thumbnail.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__init__\",\n \"file\": \"rubpy/rubino/thumbnail.py\",\n \"doc\": \"Initialize ResultMedia with image data and metadata.\\n\\nArgs:\\n- image (bytes): The raw image data.\\n- width (int): The width of the media.\\n- height (int): The height of the media.\\n- seconds (int): The duration of the media in seconds.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"ndarray_to_bytes\",\n \"file\": \"rubpy/rubino/thumbnail.py\",\n \"doc\": \"Convert NumPy array to bytes.\\n\\nArgs:\\n- image: NumPy array representing the image.\\n\\nReturns:\\n- bytes: The image data in bytes.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"to_base64\",\n \"file\": \"rubpy/rubino/thumbnail.py\",\n \"doc\": \"Convert media data to base64.\\n\\nReturns:\\n- str: Base64-encoded media data.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"from_image\",\n \"file\": \"rubpy/rubino/thumbnail.py\",\n \"doc\": \"Generate a thumbnail from image data.\\n\\nArgs:\\n- image (bytes): The raw image data.\\n\\nReturns:\\n- ResultMedia: ResultMedia object containing the thumbnail and metadata.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"from_video\",\n \"file\": \"rubpy/rubino/thumbnail.py\",\n \"doc\": \"Generate a thumbnail from video data.\\n\\nArgs:\\n- video (bytes): The raw video data.\\n\\nReturns:\\n- ResultMedia: ResultMedia object containing the thumbnail and metadata.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"_from_video_opencv\",\n \"file\": \"rubpy/rubino/thumbnail.py\",\n \"doc\": \"Generate a thumbnail from video data using OpenCV.\\n\\nArgs:\\n- video (bytes): The raw video data.\\n\\nReturns:\\n- ResultMedia: ResultMedia object containing the thumbnail and metadata.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"_from_video_moviepy\",\n \"file\": \"rubpy/rubino/thumbnail.py\",\n \"doc\": \"Generate a thumbnail from video data using MoviePy.\\n\\nArgs:\\n- video (bytes): The raw video data.\\n\\nReturns:\\n- ResultMedia: ResultMedia object containing the thumbnail and metadata.\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"SQLiteSession\",\n \"file\": \"rubpy/sessions/sqliteSession.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__init__\",\n \"file\": \"rubpy/sessions/sqliteSession.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"upgrade_database\",\n \"file\": \"rubpy/sessions/sqliteSession.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"information\",\n \"file\": \"rubpy/sessions/sqliteSession.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"insert\",\n \"file\": \"rubpy/sessions/sqliteSession.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"from_string\",\n \"file\": \"rubpy/sessions/sqliteSession.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"StringSession\",\n \"file\": \"rubpy/sessions/stringSession.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__init__\",\n \"file\": \"rubpy/sessions/stringSession.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"load\",\n \"file\": \"rubpy/sessions/stringSession.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"dump\",\n \"file\": \"rubpy/sessions/stringSession.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"from_sqlite\",\n \"file\": \"rubpy/sessions/stringSession.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"insert\",\n \"file\": \"rubpy/sessions/stringSession.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"information\",\n \"file\": \"rubpy/sessions/stringSession.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"save\",\n \"file\": \"rubpy/sessions/stringSession.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"class\",\n \"name\": \"Update\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": null\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__str__\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__getattr__\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__setitem__\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__getitem__\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__lts__\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"__init__\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"jsonify\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"find_keys\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"command\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"to_dict\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": \"Return the update as dict\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"message\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"is_me\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"status\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"action\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"is_edited\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"type\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"title\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"is_forward\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"forward_type_from\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"is_event\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"event_data\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"is_file_inline\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"file_inline\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"music\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"file\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"photo\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"video\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"voice\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"contact\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"location\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"poll\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"gif\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"sticker\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"text\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"message_id\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"reply_message_id\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"is_group\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"is_channel\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"is_private\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"object_guid\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"author_guid\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"is_text\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": null,\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"guid_type\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": \"Determine the type of the object based on its GUID.\\n\\nArgs:\\n - object_guid (str): The GUID of the object.\\n\\nReturns:\\n - str: The type of the object ('Channel', 'Group', or 'User').\",\n \"async\": false\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"pin\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": \"Pin a message.\\n\\nArgs:\\n - object_guid (str, optional): Custom object GUID. Defaults to update.object_guid if not provided.\\n - message_id (str, optional): Custom message ID. Defaults to update.message_id if not provided.\\n - action (str, optional): Pin or unpin action. Defaults to 'Pin'.\\n\\nReturns:\\n - BaseResults: Result of the pin or unpin operation.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"unpin\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": \"Unpin a message.\\n\\nArgs:\\n - object_guid (str, optional): Custom object GUID. Defaults to update.object_guid if not provided.\\n - message_id (str, optional): Custom message ID. Defaults to update.message_id if not provided.\\n - action (str, optional): Pin or unpin action. Defaults to 'Pin'.\\n\\nReturns:\\n - BaseResults: Result of the pin or unpin operation.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"edit\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": \"Edit a message.\\n\\nArgs:\\n - text (str): The new message text.\\n - object_guid (str, optional): Custom object GUID. Defaults to update.object_guid if not provided.\\n - message_id (str, optional): Custom message ID. Defaults to update.message_id if not provided.\\n\\nReturns:\\n - dict: Result of the edit operation.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"copy\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": \"Copy messages to another object.\\n\\nArgs:\\n - to_object_guid (str): To object guid.\\n - from_object_guid (str, optional): From object guid. Defaults to update.object_guid.\\n - message_ids (Union[str, int, List[str]], optional): Message ids. Defaults to update.message_id.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"seen\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": \"Mark chats as seen.\\n\\nArgs:\\n - seen_list (dict, optional): Dictionary containing object GUIDs and corresponding message IDs.\\n Defaults to {update.object_guid: update.message_id} if not provided.\\n\\nReturns:\\n - dict: Result of the operation.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"reply\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": \"Reply to a message.\\n\\nArgs:\\n - text (str, optional): Text content of the reply. Defaults to None.\\n - object_guid (str, optional): Custom object GUID. Defaults to update.object_guid.\\n - reply_to_message_id (str, optional): Reply to message ID. Defaults to None.\\n - file_inline (Union[pathlib.Path, bytes], optional): File to send with the reply. Defaults to None.\\n - auto_delete (int, optional): Auto-delete timer for the message. Defaults to None.\\n - *args, **kwargs: Additional arguments.\\n\\nReturns:\\n - dict: Result of the reply operation.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"reply_document\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": \"Reply with a document.\\n\\nArgs:\\n - document (Union[str, bytes, Path]): Document to reply with.\\n - caption (str, optional): Caption for the document. Defaults to None.\\n - auto_delete (int, optional): Auto-delete timer for the message. Defaults to None.\\n - object_guid (str, optional): Custom object GUID. Defaults to update.object_guid.\\n - reply_to_message_id (str, optional): Reply to message ID. Defaults to None.\\n - *args, **kwargs: Additional arguments.\\n\\nReturns:\\n - dict: Result of the reply operation.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"reply_photo\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": \"Reply with a photo.\\n\\nArgs:\\n - photo (Union[str, bytes, Path]): Photo to reply with.\\n - caption (str, optional): Caption for the photo. Defaults to None.\\n - auto_delete (int, optional): Auto-delete timer for the message. Defaults to None.\\n - object_guid (str, optional): Custom object GUID. Defaults to update.object_guid.\\n - reply_to_message_id (str, optional): Reply to message ID. Defaults to None.\\n - *args, **kwargs: Additional arguments.\\n\\nReturns:\\n - dict: Result of the reply operation.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"reply_video\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": \"Reply with a video.\\n\\nArgs:\\n - video (Union[str, bytes, Path]): Video to reply with.\\n - caption (str, optional): Caption for the Video. Defaults to None.\\n - auto_delete (int, optional): Auto-delete timer for the message. Defaults to None.\\n - object_guid (str, optional): Custom object GUID. Defaults to update.object_guid.\\n - reply_to_message_id (str, optional): Reply to message ID. Defaults to None.\\n - *args, **kwargs: Additional arguments.\\n\\nReturns:\\n - dict: Result of the reply operation.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"reply_music\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": \"Reply with a music.\\n\\nArgs:\\n - music (Union[str, bytes, Path]): Music to reply with.\\n - caption (str, optional): Caption for the Music. Defaults to None.\\n - auto_delete (int, optional): Auto-delete timer for the message. Defaults to None.\\n - object_guid (str, optional): Custom object GUID. Defaults to update.object_guid.\\n - reply_to_message_id (str, optional): Reply to message ID. Defaults to None.\\n - *args, **kwargs: Additional arguments.\\n\\nReturns:\\n - dict: Result of the reply operation.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"reply_voice\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": \"Reply with a voice.\\n\\nArgs:\\n - voice (Union[str, bytes, Path]): Voice to reply with.\\n - caption (str, optional): Caption for the Voice. Defaults to None.\\n - auto_delete (int, optional): Auto-delete timer for the message. Defaults to None.\\n - object_guid (str, optional): Custom object GUID. Defaults to update.object_guid.\\n - reply_to_message_id (str, optional): Reply to message ID. Defaults to None.\\n - *args, **kwargs: Additional arguments.\\n\\nReturns:\\n - dict: Result of the reply operation.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"reply_gif\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": \"Reply with a gif.\\n\\nArgs:\\n - gif (Union[str, bytes, Path]): Gif to reply with.\\n - caption (str, optional): Caption for the Gif. Defaults to None.\\n - auto_delete (int, optional): Auto-delete timer for the message. Defaults to None.\\n - object_guid (str, optional): Custom object GUID. Defaults to update.object_guid.\\n - reply_to_message_id (str, optional): Reply to message ID. Defaults to None.\\n - *args, **kwargs: Additional arguments.\\n\\nReturns:\\n - dict: Result of the reply operation.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"reply_video_message\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": \"Reply with a video.\\n\\nArgs:\\n - video (Union[str, bytes, Path]): VideoMessage to reply with.\\n - caption (str, optional): Caption for the VideoMessage. Defaults to None.\\n - auto_delete (int, optional): Auto-delete timer for the message. Defaults to None.\\n - object_guid (str, optional): Custom object GUID. Defaults to update.object_guid.\\n - reply_to_message_id (str, optional): Reply to message ID. Defaults to None.\\n - *args, **kwargs: Additional arguments.\\n\\nReturns:\\n - dict: Result of the reply operation.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"forward\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": \"Forward message.\\n\\nArgs:\\n - to_object_guid (str): Destination object GUID.\\n\\nReturns:\\n - dict: Result of the forward operation.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"forwards\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": \"Forward messages.\\n\\nArgs:\\n - to_object_guid (str): Destination object GUID.\\n - from_object_guid (str, optional): Source object GUID. Defaults to update.object_guid.\\n - message_ids (Union[str, int, List[str]], optional): Message IDs to forward. Defaults to update.message_id.\\n\\nReturns:\\n - dict: Result of the forward operation.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"download\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": \"Download a file.\\n\\nArgs:\\n- file_inline (dict, optional): File information. Defaults to update.file_inline.\\n- save_as (str, optional): The path to save the downloaded file. If None, the file will not be saved.\\n- chunk_size (int, optional): The size of each chunk to download.\\n- callback (callable, optional): A callback function to monitor the download progress.\\n- *args, **kwargs: Additional parameters to pass to the download method.\\n\\nReturns:\\n- bytes: The binary data of the downloaded file.\\n\\nRaises:\\n- aiofiles.errors.OSFError: If there is an issue with file I/O (when saving the file).\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_author\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": \"Get user or author information.\\n\\nArgs:\\n - author_guid (str, optional): Custom author GUID. Defaults to update.author_guid.\\n\\nReturns:\\n - dict: User or author information.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_object\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": \"Get object information.\\n\\nArgs:\\n - object_guid (str, optional): Custom object GUID. Defaults to update.object_guid.\\n\\nReturns:\\n - dict: Object information.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_messages\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": \"Get messages.\\n\\nArgs:\\n - object_guid (str, optional): Custom object GUID. Defaults to update.object_guid.\\n - message_ids (Union[str, int, List[str]], optional): Message IDs. Defaults to update.message_id.\\n\\nReturns:\\n - dict: Retrieved messages.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"delete\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": \"Delete message.\\n\\nReturns:\\n - dict: Result of the message deletion operation.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"delete_messages\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": \"Delete messages.\\n\\nArgs:\\n - object_guid (str, optional): Custom object GUID. Defaults to update.object_guid.\\n - message_ids (list, optional): Custom message IDs. Defaults to update.message_id.\\n\\nReturns:\\n - dict: Result of the message deletion operation.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"reaction\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": \"Add a reaction to a message.\\n\\nArgs:\\n - reaction_id (int): Reaction ID.\\n - object_guid (str, optional): Custom object GUID. Defaults to update.object_guid.\\n - message_id (str, optional): Custom message ID. Defaults to update.message_id.\\n\\nReturns:\\n - dict: Result of the reaction operation.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"ban_member\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": \"Ban a member.\\n\\nArgs:\\n - object_guid (str, optional): Custom object GUID. Defaults to update.object_guid.\\n - user_guid (str, optional): User GUID. Defaults to None.\\n\\nReturns:\\n - dict: Result of the ban operation.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"unban_member\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": \"Unban a member.\\n\\nArgs:\\n - object_guid (str, optional): Custom object GUID. Defaults to update.object_guid.\\n - user_guid (str, optional): User GUID. Defaults to None.\\n\\nReturns:\\n - dict: Result of the unban operation.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"send_activity\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": \"Send chat activity.\\n\\nArgs:\\n - activity (Literal['Typing', 'Uploading', 'Recording'], optional): Chat activity type. Defaults to 'Typing'.\\n - object_guid (str, optional): Custom object GUID. Defaults to update.object_guid.\\n\\nReturns:\\n - dict: Result of the activity sending operation.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"is_admin\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": \"Check if a user is an admin.\\n\\nArgs:\\n - object_guid (str, optional): Custom object GUID. Defaults to update.object_guid.\\n - user_guid (str, optional): User GUID. Defaults to update.object_guid.\\n\\nReturns:\\n - dict: Result of the admin check operation.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"block\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": \"Block a user.\\n\\nArgs:\\n - user_guid (str, optional): User GUID. Defaults to update.object_guid.\\n\\nReturns:\\n - dict: Result of the admin check operation.\",\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_reply_author\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": null,\n \"async\": true\n}" }, { "instruction": "کد زیر را تحلیل کن و توضیح بده", "input": "", "output": "{\n \"type\": \"function\",\n \"name\": \"get_reply_message\",\n \"file\": \"rubpy/types/update.py\",\n \"doc\": null,\n \"async\": true\n}" } ]