Rubka 7.1.6__py3-none-any.whl → 7.1.8__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- rubka/asynco.py +72 -27
- rubka/rubino.py +126 -99
- {rubka-7.1.6.dist-info → rubka-7.1.8.dist-info}/METADATA +1 -1
- {rubka-7.1.6.dist-info → rubka-7.1.8.dist-info}/RECORD +7 -7
- {rubka-7.1.6.dist-info → rubka-7.1.8.dist-info}/WHEEL +0 -0
- {rubka-7.1.6.dist-info → rubka-7.1.8.dist-info}/entry_points.txt +0 -0
- {rubka-7.1.6.dist-info → rubka-7.1.8.dist-info}/top_level.txt +0 -0
rubka/asynco.py
CHANGED
|
@@ -2171,6 +2171,51 @@ max_cache_size and max_msg_age help manage duplicate message processing efficien
|
|
|
2171
2171
|
async def get_username(self, chat_id: str) -> str:
|
|
2172
2172
|
chat_info = await self.get_chat(chat_id)
|
|
2173
2173
|
return chat_info.get("data", {}).get("chat", {}).get("username", "None")
|
|
2174
|
+
async def send_bulk_message(
|
|
2175
|
+
self,
|
|
2176
|
+
chat_ids: List[str],
|
|
2177
|
+
text: str,
|
|
2178
|
+
concurrency: int = 5,
|
|
2179
|
+
delay_between: float = 0.0,
|
|
2180
|
+
log_errors: bool = True,
|
|
2181
|
+
**kwargs
|
|
2182
|
+
) -> Dict[str, Optional[Dict]]:
|
|
2183
|
+
if not chat_ids:return {}
|
|
2184
|
+
semaphore = asyncio.Semaphore(concurrency)
|
|
2185
|
+
results: Dict[str, Optional[Dict]] = {}
|
|
2186
|
+
async def _send(chat_id: str):
|
|
2187
|
+
async with semaphore:
|
|
2188
|
+
try:
|
|
2189
|
+
res = await self.send_message(chat_id, text, **kwargs)
|
|
2190
|
+
results[chat_id] = res
|
|
2191
|
+
except Exception as e:
|
|
2192
|
+
results[chat_id] = None
|
|
2193
|
+
if log_errors:print(f"[send_bulk_message] Error {chat_id} : {e}")
|
|
2194
|
+
if delay_between > 0:await asyncio.sleep(delay_between)
|
|
2195
|
+
await asyncio.gather(*[_send(cid) for cid in chat_ids])
|
|
2196
|
+
return results
|
|
2197
|
+
async def delete_bulk_message(self, chat_id: str, message_ids: list[str]):
|
|
2198
|
+
tasks = [self.delete_message(chat_id, mid) for mid in message_ids]
|
|
2199
|
+
return await asyncio.gather(*tasks, return_exceptions=True)
|
|
2200
|
+
async def edit_bulk_message(self, chat_id: str, messages: dict[str, str]):
|
|
2201
|
+
tasks = [self.edit_message_text(chat_id, mid, new_text) for mid, new_text in messages.items()]
|
|
2202
|
+
return await asyncio.gather(*tasks, return_exceptions=True)
|
|
2203
|
+
async def send_scheduled_message(self, chat_id: str, text: str, delay: int, **kwargs):
|
|
2204
|
+
await asyncio.sleep(delay)
|
|
2205
|
+
return await self.send_message(chat_id, text, **kwargs)
|
|
2206
|
+
async def disable_inline_keyboard(
|
|
2207
|
+
self,
|
|
2208
|
+
chat_id: str,
|
|
2209
|
+
message_id: str,
|
|
2210
|
+
text: Optional[str] = "~",
|
|
2211
|
+
delay: float = 5.0,
|
|
2212
|
+
) -> Dict[str, any]:
|
|
2213
|
+
if text is not None:await self.edit_inline_keypad(chat_id, message_id, inline_keypad={}, text=text)
|
|
2214
|
+
if delay > 0:
|
|
2215
|
+
await asyncio.sleep(delay)
|
|
2216
|
+
response = await self.edit_inline_keypad(chat_id, message_id, inline_keypad={})
|
|
2217
|
+
return response
|
|
2218
|
+
else:return await self.edit_inline_keypad(chat_id, message_id, inline_keypad={})
|
|
2174
2219
|
async def get_chat_admins(self, chat_id: str) -> Dict[str, Any]:
|
|
2175
2220
|
return await self._post("getChatAdmins", {"chat_id": chat_id})
|
|
2176
2221
|
async def get_chat_members(self, chat_id: str, start_id: str = "") -> Dict[str, Any]:
|
|
@@ -2236,8 +2281,8 @@ max_cache_size and max_msg_age help manage duplicate message processing efficien
|
|
|
2236
2281
|
return await self._post("editChatKeypad", {"chat_id": chat_id, "chat_keypad_type": "Remove"})
|
|
2237
2282
|
async def edit_chat_keypad(self, chat_id: str, chat_keypad: Dict[str, Any]) -> Dict[str, Any]:
|
|
2238
2283
|
return await self._post("editChatKeypad", {"chat_id": chat_id, "chat_keypad_type": "New", "chat_keypad": chat_keypad})
|
|
2239
|
-
async def send_contact(self, chat_id: str, first_name: str, last_name: str, phone_number: str) -> Dict[str, Any]:
|
|
2240
|
-
return await self._post("sendContact", {"chat_id": chat_id, "first_name": first_name, "last_name": last_name, "phone_number": phone_number})
|
|
2284
|
+
async def send_contact(self, chat_id: str, first_name: str, last_name: str, phone_number: str,inline_keypad: Optional[Dict[str, Any]] = None,chat_keypad: Optional[Dict[str, Any]] = None,chat_keypad_type: Optional[Literal["New", "Remove", "None"]] = None,) -> Dict[str, Any]:
|
|
2285
|
+
return await self._post("sendContact", {"chat_id": chat_id, "first_name": first_name, "last_name": last_name, "phone_number": phone_number,"inline_keypad": inline_keypad,"chat_keypad": chat_keypad,"chat_keypad_type": chat_keypad_type})
|
|
2241
2286
|
async def get_chat(self, chat_id: str) -> Dict[str, Any]:
|
|
2242
2287
|
return await self._post("getChat", {"chat_id": chat_id})
|
|
2243
2288
|
async def send_video(self, chat_id: str, path: Optional[Union[str, Path]] = None, file_id: Optional[str] = None, text: Optional[str] = None, file_name: Optional[str] = None, inline_keypad: Optional[Dict[str, Any]] = None, chat_keypad: Optional[Dict[str, Any]] = None, reply_to_message_id: Optional[str] = None, disable_notification: bool = False, chat_keypad_type: Optional[Literal["New", "Remove", "None"]] = "None") -> Dict[str, Any]:
|
|
@@ -2261,42 +2306,42 @@ max_cache_size and max_msg_age help manage duplicate message processing efficien
|
|
|
2261
2306
|
hint: Optional[str] = None,
|
|
2262
2307
|
reply_to_message_id: Optional[str] = None,
|
|
2263
2308
|
disable_notification: bool = False,
|
|
2264
|
-
|
|
2265
|
-
inline_keypad : Optional[Dict[str, Any]] = None,
|
|
2309
|
+
inline_keypad: Optional[Dict[str, Any]] = None,
|
|
2266
2310
|
chat_keypad: Optional[Dict[str, Any]] = None,
|
|
2267
2311
|
chat_keypad_type: Optional[Literal["New", "Remove", "None"]] = None,
|
|
2268
|
-
|
|
2269
2312
|
) -> AttrDict:
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
)
|
|
2313
|
+
|
|
2314
|
+
payload = {
|
|
2315
|
+
"chat_id": chat_id,
|
|
2316
|
+
"question": question,
|
|
2317
|
+
"options": options,
|
|
2318
|
+
"type": type,
|
|
2319
|
+
"allows_multiple_answers": allows_multiple_answers,
|
|
2320
|
+
"is_anonymous": is_anonymous,
|
|
2321
|
+
"correct_option_index": correct_option_index,
|
|
2322
|
+
"explanation": hint,
|
|
2323
|
+
"reply_to_message_id": reply_to_message_id,
|
|
2324
|
+
"disable_notification": disable_notification,
|
|
2325
|
+
"inline_keypad": inline_keypad,
|
|
2326
|
+
"chat_keypad": chat_keypad,
|
|
2327
|
+
"chat_keypad_type": chat_keypad_type,
|
|
2328
|
+
}
|
|
2329
|
+
payload = {k: v for k, v in payload.items() if v is not None or (k in ["is_anonymous", "disable_notification"] and v is False)}
|
|
2330
|
+
return await self._post("sendPoll", payload)
|
|
2331
|
+
|
|
2288
2332
|
async def check_join(self, channel_guid: str, chat_id: str = None) -> Union[bool, list[str]]:
|
|
2289
2333
|
client = self._get_client()
|
|
2290
2334
|
if chat_id:
|
|
2291
2335
|
chat_info_data = await self.get_chat(chat_id)
|
|
2292
2336
|
chat_info = chat_info_data.get('data', {}).get('chat', {})
|
|
2293
2337
|
username = chat_info.get('username')
|
|
2294
|
-
|
|
2338
|
+
first_name = chat_info.get("first_name", "")
|
|
2295
2339
|
if username:
|
|
2296
2340
|
result = await asyncio.to_thread(self.get_all_member, channel_guid, search_text=username)
|
|
2297
2341
|
members = result.get('in_chat_members', [])
|
|
2298
2342
|
return any(m.get('username') == username for m in members)
|
|
2299
|
-
elif
|
|
2300
|
-
|
|
2301
|
-
|
|
2343
|
+
elif first_name:
|
|
2344
|
+
result = await asyncio.to_thread(self.get_all_member, channel_guid, search_text=first_name)
|
|
2345
|
+
members = result.get('in_chat_members', [])
|
|
2346
|
+
return any(m.get('first_name') == first_name for m in members)
|
|
2302
2347
|
return False
|
rubka/rubino.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import urllib3
|
|
2
|
-
import json
|
|
3
|
-
from typing import Any, Dict
|
|
2
|
+
import json,random
|
|
3
|
+
from typing import Any, Dict,List
|
|
4
4
|
from tempfile import NamedTemporaryFile
|
|
5
5
|
from os import system, chmod, remove
|
|
6
6
|
from base64 import b64encode
|
|
@@ -417,24 +417,7 @@ class api:
|
|
|
417
417
|
response_data = json.loads(response.data.decode('utf-8'))
|
|
418
418
|
if 'result' in response_data:
|
|
419
419
|
return response_data['result']
|
|
420
|
-
|
|
421
|
-
resp = get(
|
|
422
|
-
url="https://www.google.com/search",
|
|
423
|
-
headers={
|
|
424
|
-
"User-Agent": get_useragent()
|
|
425
|
-
},
|
|
426
|
-
params={
|
|
427
|
-
"q": term,
|
|
428
|
-
"num": results + 2, # Prevents multiple requests
|
|
429
|
-
"hl": lang,
|
|
430
|
-
"start": start,
|
|
431
|
-
},
|
|
432
|
-
proxies=proxies,
|
|
433
|
-
timeout=timeout,
|
|
434
|
-
)
|
|
435
|
-
resp.raise_for_status()
|
|
436
|
-
return resp
|
|
437
|
-
import random
|
|
420
|
+
|
|
438
421
|
|
|
439
422
|
class Bot():
|
|
440
423
|
"""rubino class Regester m.rubika.ir"""
|
|
@@ -675,6 +658,49 @@ class Bot():
|
|
|
675
658
|
return [668,789]
|
|
676
659
|
except Exception as e:
|
|
677
660
|
return [668,789]
|
|
661
|
+
def add_Story(self,post_file:str,duration:int=27,size:list=[668,798],thumbnail_file:str=None,profile_id:str=None):
|
|
662
|
+
|
|
663
|
+
if post_file.split(".")[-1] == "mp4" or post_file.split(".")[-1] == "mov" or post_file.split(".")[-1] == "mkv" or "https://":
|
|
664
|
+
try:
|
|
665
|
+
if "https://" in post_file:
|
|
666
|
+
tumb_res , post_res = req(self.auth).upload(image_to_bytes(thumbnail_file) if type(thumbnail_file) is str else confing.th,"Picture",profile_id) , req(self.auth).upload(requests.get(post_file).content,"Video",profile_id)
|
|
667
|
+
else :
|
|
668
|
+
tumb_res , post_res = req(self.auth).upload(image_to_bytes(thumbnail_file) if type(thumbnail_file) is str else confing.th,"Picture",profile_id) , req(self.auth).upload(post_file,"Video",profile_id)
|
|
669
|
+
except ModuleNotFoundError:
|
|
670
|
+
print("pip install moviepy")
|
|
671
|
+
tumb_res , post_res = req(self.auth).upload(confing.th,"Picture",profile_id) , req(self.auth).upload(post_file,"Video",profile_id)
|
|
672
|
+
data = {
|
|
673
|
+
"duration": str(duration),
|
|
674
|
+
"file_id": post_res[0]["file_id"],
|
|
675
|
+
"hash_file_receive": post_res[1],
|
|
676
|
+
"height": 1280 if size[1] > 1280 else size[1],
|
|
677
|
+
"story_type": "Video",
|
|
678
|
+
"rnd": random.randint(100000, 999999999),
|
|
679
|
+
"snapshot_file_id": tumb_res[0]["file_id"],
|
|
680
|
+
"snapshot_hash_file_receive": tumb_res[1],
|
|
681
|
+
"thumbnail_file_id": tumb_res[0]["file_id"],
|
|
682
|
+
"thumbnail_hash_file_receive": tumb_res[1],
|
|
683
|
+
"width": 720 if size[0] > 720 else size[0],
|
|
684
|
+
"profile_id": profile_id
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
elif post_file.split(".")[-1] == "jpg" or post_file.split(".")[-1] == "png":
|
|
688
|
+
post_res = req(self.auth).upload(post_file,"Picture",profile_id)
|
|
689
|
+
|
|
690
|
+
data = {
|
|
691
|
+
"file_id": post_res[0]["file_id"],
|
|
692
|
+
"hash_file_receive": post_res[1],
|
|
693
|
+
"height": 1280 if size[1] > 1280 else size[1],
|
|
694
|
+
"story_type": "Picture",
|
|
695
|
+
"rnd": random.randint(100000, 999999999),
|
|
696
|
+
"thumbnail_file_id": post_res[0]["file_id"],
|
|
697
|
+
"thumbnail_hash_file_receive": post_res[1],
|
|
698
|
+
"width": 720 if size[0] > 720 else size[0],
|
|
699
|
+
"profile_id": profile_id
|
|
700
|
+
}
|
|
701
|
+
else:
|
|
702
|
+
return "file address eror"
|
|
703
|
+
return req(self.auth).send_request(data,"addStory")['data']
|
|
678
704
|
def add_Post(self,post_file: str, caption: str = None, time: int = 1, size: Any = [668, 798], thumbnail_file: str = None, profile_id: str = None):
|
|
679
705
|
from concurrent.futures import ThreadPoolExecutor
|
|
680
706
|
if size == "Auto" or size =="auto":
|
|
@@ -980,28 +1006,6 @@ class Bot():
|
|
|
980
1006
|
"target_profile_id": target_profile_id,
|
|
981
1007
|
"story_ids":story_ids
|
|
982
1008
|
},methode="getHighlightStories")
|
|
983
|
-
|
|
984
|
-
def get_NewFollow_Requests(self,sort:str="FromMax",limit:int=50,equal:bool=False,profile_id:str=None):
|
|
985
|
-
return self._reuests_post(data={
|
|
986
|
-
"equal": equal,
|
|
987
|
-
"limit": limit,
|
|
988
|
-
"sort": sort,
|
|
989
|
-
"profile_id": profile_id
|
|
990
|
-
},methode="getNewFollowRequests")
|
|
991
|
-
|
|
992
|
-
def accept_Request_Follow(self,request_id:str,profile_id:str=None):
|
|
993
|
-
return self._reuests_post(data={
|
|
994
|
-
"action": "Accept",
|
|
995
|
-
"request_id": request_id,
|
|
996
|
-
"profile_id": profile_id
|
|
997
|
-
},methode="actionOnRequest")
|
|
998
|
-
|
|
999
|
-
def decline_Request_Follow(self,request_id:str,profile_id:str=None):
|
|
1000
|
-
return self._reuests_post(data={
|
|
1001
|
-
"action": "Decline",
|
|
1002
|
-
"request_id": request_id,
|
|
1003
|
-
"profile_id": profile_id
|
|
1004
|
-
},methode="actionOnRequest")
|
|
1005
1009
|
def un_save_Post(self,post_profile_id:str,post_id:str,profile_id:str=None):
|
|
1006
1010
|
return self._reuests_post(data={
|
|
1007
1011
|
"action_type": "Unbookmark",
|
|
@@ -1016,24 +1020,11 @@ class Bot():
|
|
|
1016
1020
|
limit: int = 20,
|
|
1017
1021
|
profile_id: Optional[str] = None,
|
|
1018
1022
|
sort: str = "FromMax") -> Dict[str, Any]:
|
|
1019
|
-
"""
|
|
1020
|
-
دریافت پستهای ذخیرهشده (بوکمارکشده)
|
|
1021
|
-
|
|
1022
|
-
Args:
|
|
1023
|
-
max_id (str): شناسه آخرین پست برای صفحهبندی.
|
|
1024
|
-
limit (int, optional): تعداد پستها در هر درخواست. پیشفرض 20.
|
|
1025
|
-
profile_id (str, optional): شناسه پروفایل (در صورت نیاز).
|
|
1026
|
-
sort (str, optional): نوع مرتبسازی. پیشفرض "FromMax".
|
|
1027
|
-
|
|
1028
|
-
Returns:
|
|
1029
|
-
Dict[str, Any]: پاسخ سرور شامل لیست پستهای ذخیرهشده.
|
|
1030
|
-
"""
|
|
1031
1023
|
payload = {
|
|
1032
1024
|
"limit": limit,
|
|
1033
1025
|
"max_id": max_id,
|
|
1034
1026
|
"sort": sort
|
|
1035
1027
|
}
|
|
1036
|
-
|
|
1037
1028
|
if profile_id is not None:
|
|
1038
1029
|
payload["profile_id"] = profile_id
|
|
1039
1030
|
|
|
@@ -1127,49 +1118,7 @@ class Bot():
|
|
|
1127
1118
|
"thumbnail_hash_file_receive": prof_res[1],
|
|
1128
1119
|
"profile_id": profile_id
|
|
1129
1120
|
},methode="updateProfilePhoto")
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
if post_file.split(".")[-1] == "mp4" or post_file.split(".")[-1] == "mov" or post_file.split(".")[-1] == "mkv" or "https://":
|
|
1133
|
-
try:
|
|
1134
|
-
if "https://" in post_file:
|
|
1135
|
-
tumb_res , post_res = req(self.auth).upload(image_to_bytes(thumbnail_file) if type(thumbnail_file) is str else confing.th,"Picture",profile_id) , req(self.auth).upload(requests.get(post_file).content,"Video",profile_id)
|
|
1136
|
-
else :
|
|
1137
|
-
tumb_res , post_res = req(self.auth).upload(image_to_bytes(thumbnail_file) if type(thumbnail_file) is str else confing.th,"Picture",profile_id) , req(self.auth).upload(post_file,"Video",profile_id)
|
|
1138
|
-
except ModuleNotFoundError:
|
|
1139
|
-
print("pip install moviepy")
|
|
1140
|
-
tumb_res , post_res = req(self.auth).upload(confing.th,"Picture",profile_id) , req(self.auth).upload(post_file,"Video",profile_id)
|
|
1141
|
-
data = {
|
|
1142
|
-
"duration": str(duration),
|
|
1143
|
-
"file_id": post_res[0]["file_id"],
|
|
1144
|
-
"hash_file_receive": post_res[1],
|
|
1145
|
-
"height": 1280 if size[1] > 1280 else size[1],
|
|
1146
|
-
"story_type": "Video",
|
|
1147
|
-
"rnd": random.randint(100000, 999999999),
|
|
1148
|
-
"snapshot_file_id": tumb_res[0]["file_id"],
|
|
1149
|
-
"snapshot_hash_file_receive": tumb_res[1],
|
|
1150
|
-
"thumbnail_file_id": tumb_res[0]["file_id"],
|
|
1151
|
-
"thumbnail_hash_file_receive": tumb_res[1],
|
|
1152
|
-
"width": 720 if size[0] > 720 else size[0],
|
|
1153
|
-
"profile_id": profile_id
|
|
1154
|
-
}
|
|
1155
|
-
|
|
1156
|
-
elif post_file.split(".")[-1] == "jpg" or post_file.split(".")[-1] == "png":
|
|
1157
|
-
post_res = req(self.auth).upload(post_file,"Picture",profile_id)
|
|
1158
|
-
|
|
1159
|
-
data = {
|
|
1160
|
-
"file_id": post_res[0]["file_id"],
|
|
1161
|
-
"hash_file_receive": post_res[1],
|
|
1162
|
-
"height": 1280 if size[1] > 1280 else size[1],
|
|
1163
|
-
"story_type": "Picture",
|
|
1164
|
-
"rnd": random.randint(100000, 999999999),
|
|
1165
|
-
"thumbnail_file_id": post_res[0]["file_id"],
|
|
1166
|
-
"thumbnail_hash_file_receive": post_res[1],
|
|
1167
|
-
"width": 720 if size[0] > 720 else size[0],
|
|
1168
|
-
"profile_id": profile_id
|
|
1169
|
-
}
|
|
1170
|
-
else:
|
|
1171
|
-
return "file address eror"
|
|
1172
|
-
return req(self.auth).send_request(data,"addStory")['data']
|
|
1121
|
+
|
|
1173
1122
|
def delete_Page(self,page_profile_id:str):
|
|
1174
1123
|
return self._reuests_post(data={
|
|
1175
1124
|
"model": "Profile",
|
|
@@ -1201,4 +1150,82 @@ class Bot():
|
|
|
1201
1150
|
return self._reuests_post(data={
|
|
1202
1151
|
"share_string": url_post,
|
|
1203
1152
|
"profile_id": profile_id,
|
|
1204
|
-
},methode="getPostByShareLink")['data']
|
|
1153
|
+
},methode="getPostByShareLink")['data']
|
|
1154
|
+
def search_HashTag(
|
|
1155
|
+
self,
|
|
1156
|
+
content: str,
|
|
1157
|
+
profile_id:str,
|
|
1158
|
+
limit: int = 20,
|
|
1159
|
+
) -> Dict[str, Any]:
|
|
1160
|
+
|
|
1161
|
+
payload = {
|
|
1162
|
+
"profile_id": profile_id,
|
|
1163
|
+
"content": content,
|
|
1164
|
+
"limit": limit
|
|
1165
|
+
}
|
|
1166
|
+
return self._reuests_post("reportProfile", data=payload)
|
|
1167
|
+
def accept_Follow_Request(
|
|
1168
|
+
self,
|
|
1169
|
+
request_id: str,
|
|
1170
|
+
profile_id: Optional[str] = None
|
|
1171
|
+
) -> Dict[str, Any]:
|
|
1172
|
+
"""
|
|
1173
|
+
Accept a follow request from a user.
|
|
1174
|
+
|
|
1175
|
+
Args:
|
|
1176
|
+
request_id (str): The ID of the follow request.
|
|
1177
|
+
profile_id (Optional[str]): The profile ID of the current user (if available).
|
|
1178
|
+
|
|
1179
|
+
Returns:
|
|
1180
|
+
Dict[str, Any]: The server's response, including action status.
|
|
1181
|
+
"""
|
|
1182
|
+
payload = {
|
|
1183
|
+
"action": "Accept",
|
|
1184
|
+
"request_id": request_id,
|
|
1185
|
+
"profile_id": profile_id
|
|
1186
|
+
}
|
|
1187
|
+
return self._reuests_post("actionOnRequest", data=payload)
|
|
1188
|
+
def decline_Follow_Request(
|
|
1189
|
+
self,
|
|
1190
|
+
request_id: str,
|
|
1191
|
+
profile_id: Optional[str] = None
|
|
1192
|
+
) -> Dict[str, Any]:
|
|
1193
|
+
"""
|
|
1194
|
+
Decline a follow request from a user.
|
|
1195
|
+
|
|
1196
|
+
Args:
|
|
1197
|
+
request_id (str): The ID of the follow request.
|
|
1198
|
+
profile_id (Optional[str]): The profile ID of the current user (if available).
|
|
1199
|
+
|
|
1200
|
+
Returns:
|
|
1201
|
+
Dict[str, Any]: The server's response, including action status.
|
|
1202
|
+
"""
|
|
1203
|
+
payload = {
|
|
1204
|
+
"action": "Decline",
|
|
1205
|
+
"request_id": request_id,
|
|
1206
|
+
"profile_id": profile_id
|
|
1207
|
+
}
|
|
1208
|
+
return self._reuests_post("actionOnRequest", data=payload)
|
|
1209
|
+
def get_New_Follow_Requests(
|
|
1210
|
+
self,
|
|
1211
|
+
profile_id: Optional[str] = None ,
|
|
1212
|
+
limit: int = 20,
|
|
1213
|
+
sort: str = "FromMax"
|
|
1214
|
+
) -> Dict[str, Any]:
|
|
1215
|
+
"""
|
|
1216
|
+
Retrieve new follow requests for a given profile.
|
|
1217
|
+
|
|
1218
|
+
Args:
|
|
1219
|
+
profile_id (str): The profile ID of the current user.
|
|
1220
|
+
limit (int): The number of requests to fetch. Default is 20.
|
|
1221
|
+
sort (str): The sorting order for the requests. Default is "FromMax".
|
|
1222
|
+
|
|
1223
|
+
Returns:
|
|
1224
|
+
Dict[str, Any]: The server's response containing new follow requests.
|
|
1225
|
+
"""
|
|
1226
|
+
payload = {
|
|
1227
|
+
"profile_id": profile_id,
|
|
1228
|
+
"limit": limit,
|
|
1229
|
+
"sort": sort
|
|
1230
|
+
}
|
|
1231
|
+
return self._reuests_post("getNewFollowRequests", data=payload)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: Rubka
|
|
3
|
-
Version: 7.1.
|
|
3
|
+
Version: 7.1.8
|
|
4
4
|
Summary: Rubika: A Python library for interacting with the Rubika Bot API. This library provides an easy-to-use interface to send messages, polls, stickers, media files, manage groups and channels, handle inline keyboards, and implement advanced bot features like subscription management, user authentication, and message handling. Ideal for developers looking to automate and extend their Rubika bots with Python.
|
|
5
5
|
Home-page: https://github.com/Mahdy-Ahmadi/Rubka
|
|
6
6
|
Download-URL: https://github.com/Mahdy-Ahmadi/rubka/archive/refs/tags/v6.6.4.zip
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
rubka/__init__.py,sha256=P6IBiORfp-GqKHe5LZ-5lldWyG7tnrUYUcAQDUgwXmY,1973
|
|
2
2
|
rubka/api.py,sha256=wa1gQj7NDc7QEbmNNRz-TIOdVqfMWFC362tndRKdqig,68449
|
|
3
|
-
rubka/asynco.py,sha256=
|
|
3
|
+
rubka/asynco.py,sha256=uuqhWLPrhPVIlb4l7umwryYFD_x2tDFfcYxo-Yb49Uc,112784
|
|
4
4
|
rubka/button.py,sha256=woSzZVd5MtTqOrP-YgkH5b0GS9y4DuKBsFSc9-KuLnk,13320
|
|
5
5
|
rubka/config.py,sha256=Bck59xkOiqioLv0GkQ1qPGnBXVctz1hKk6LT4h2EPx0,78
|
|
6
6
|
rubka/context.py,sha256=OowmsvqkThzB1NDhK5629Jm4ExdaWcjUo4rsBjpTtjA,38536
|
|
@@ -12,7 +12,7 @@ rubka/jobs.py,sha256=GvLMLsVhcSEzRTgkvnPISPEBN71suW2xXI0hUaUZPTo,378
|
|
|
12
12
|
rubka/keyboards.py,sha256=7nr-dT2bQJVQnQ6RMWPTSjML6EEk6dsBx-4d8pab8xk,488
|
|
13
13
|
rubka/keypad.py,sha256=yGsNt8W5HtUFBzVF1m_p7GySlu1hwIcSvXZ4BTdrlvg,9558
|
|
14
14
|
rubka/logger.py,sha256=J2I6NiK1z32lrAzC4H1Et6WPMBXxXGCVUsW4jgcAofs,289
|
|
15
|
-
rubka/rubino.py,sha256=
|
|
15
|
+
rubka/rubino.py,sha256=HOILsm2zOIRe9EW1hxhLinhjwE_TvFrOAxBsg9T_L5E,61701
|
|
16
16
|
rubka/tv.py,sha256=rBoyCadCH3I3YqQGrQYv_dLtTg1I63AzVf1orn-hbko,5724
|
|
17
17
|
rubka/update.py,sha256=-oC9h7U_H3CrtqUCDCnFXAvC7zdSmwxlc0CNwL1XLxM,34314
|
|
18
18
|
rubka/utils.py,sha256=XUQUZxQt9J2f0X5hmAH_MH1kibTAfdT1T4AaBkBhBBs,148
|
|
@@ -37,8 +37,8 @@ rubka/adaptorrubka/types/socket/message.py,sha256=0WgLMZh4eow8Zn7AiSX4C3GZjQTkIg
|
|
|
37
37
|
rubka/adaptorrubka/utils/__init__.py,sha256=OgCFkXdNFh379quNwIVOAWY2NP5cIOxU5gDRRALTk4o,54
|
|
38
38
|
rubka/adaptorrubka/utils/configs.py,sha256=nMUEOJh1NqDJsf9W9PurkN_DLYjO6kKPMm923i4Jj_A,492
|
|
39
39
|
rubka/adaptorrubka/utils/utils.py,sha256=5-LioLNYX_TIbQGDeT50j7Sg9nAWH2LJUUs-iEXpsUY,8816
|
|
40
|
-
rubka-7.1.
|
|
41
|
-
rubka-7.1.
|
|
42
|
-
rubka-7.1.
|
|
43
|
-
rubka-7.1.
|
|
44
|
-
rubka-7.1.
|
|
40
|
+
rubka-7.1.8.dist-info/METADATA,sha256=IABsRdDfilIc89k98H66SE0qz9jfcNP6MGv8wBaHn5M,34667
|
|
41
|
+
rubka-7.1.8.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
42
|
+
rubka-7.1.8.dist-info/entry_points.txt,sha256=4aESuUmuUOALMUy7Kucv_Gb5YlqhsJmTmdXLlZU9sJ0,46
|
|
43
|
+
rubka-7.1.8.dist-info/top_level.txt,sha256=vy2A4lot11cRMdQS-F4HDCIXL3JK8RKfu7HMDkezJW4,6
|
|
44
|
+
rubka-7.1.8.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|