randydev commited on
Commit
559bba5
·
verified ·
1 Parent(s): 0fbb32a

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +77 -59
main.py CHANGED
@@ -16,16 +16,6 @@ logging.basicConfig(
16
  )
17
  logging.getLogger("pyrogram").setLevel(logging.WARNING)
18
 
19
- NOT_ALLOWED_NON_PROGRAMMER = [
20
- 466019692, # @myexcid,
21
- 1423479724, # tonic,
22
- 883761960, # ari
23
- 6824458358, # None
24
- 1982318761, # paman
25
- 6477856957, # test
26
- 5575183435, #suku
27
- 948247711, # akay
28
- ]
29
 
30
  WELCOME_TEXT = """
31
  Hey! {first_name}
@@ -42,65 +32,93 @@ Saya adalah bot untuk mengunduh video PornoHub di telegram.
42
  Powered by @xtdevs
43
  """
44
 
45
- USER_TRACK = """
46
- • AkenoHUB
47
-
48
- UserID: {user_id}
49
- First Name: {first_name}
50
- Username: @{username}
51
- Check DB: {user_db}
52
- """
53
-
54
- USER_LOGS = """
55
- • AkenoHUB
56
-
57
- UserID: {user_id}
58
- First Name: {first_name}
59
- Username: @{username}
60
-
61
- Text Log: {type_text}
62
- """
63
-
64
  client = Client(
65
- "AkenoHub",
66
  api_id=API_ID,
67
  api_hash=API_HASH,
68
  bot_token=BOT_TOKEN
69
  )
70
 
71
- api = ak.PornoHub(key=API_KEY)
 
72
 
73
- not_allowed = ["hi", "hello", "hey", "hai", "help"]
74
 
75
- def set_user_update_in_db(user_id: int, first_name: str, username: str):
76
- url = "https://private-akeno.randydev.my.id/api/v2/update_in_db"
77
- params = {
78
- "user_id": user_id,
79
- "first_name": first_name,
80
- "username": username
81
- }
82
- response = requests.post(url, params=params)
83
- if response.status_code != 200:
84
- return None
85
- return response.json()
86
 
87
- def toggle_free_mode(user_id):
88
- try:
89
- response = requests.post(f"https://private-akeno.randydev.my.id/api/v2/akenohub/freemode?user_id={user_id}")
90
- return response.json()
91
- except requests.RequestException as e:
92
- return {"message": "Error toggling free mode: ok", "free_mode_enabled": False}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
93
 
94
- def check_user_expiration(user_id: int):
95
- url = f"https://private-akeno.randydev.my.id/api/v2/akenohub/check?user_id={user_id}"
96
- try:
97
- response = requests.get(url)
98
- if response.status_code == 200:
99
- return response.json()
100
- else:
101
- return {"expired": True, "free_mode": False}
102
- except requests.RequestException as e:
103
- return {"expired": True, "free_mode": False, "error": "ok"}
104
 
105
  @client.on_message(
106
  filters.incoming
 
16
  )
17
  logging.getLogger("pyrogram").setLevel(logging.WARNING)
18
 
 
 
 
 
 
 
 
 
 
 
19
 
20
  WELCOME_TEXT = """
21
  Hey! {first_name}
 
32
  Powered by @xtdevs
33
  """
34
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
  client = Client(
36
+ "Ryzenth",
37
  api_id=API_ID,
38
  api_hash=API_HASH,
39
  bot_token=BOT_TOKEN
40
  )
41
 
42
+ CUSTOM_KEY = """
43
+ **Welcome to Ryzenth API!**
44
 
45
+ We’re excited to have you here! Here’s what you can enjoy:
46
 
47
+ **Features**:
48
+ - **V1**: Free and unlimited access for all users.
49
+ - **V2**: Premium features with a 30-day free trial.
 
 
 
 
 
 
 
 
50
 
51
+ 🚨 **Important Rules**:
52
+ To ensure a safe and fair environment for everyone, please adhere to the following rules:
53
+ 1. **Prohibited Actions**:
54
+ - Exploiting or abusing the API for malicious purposes.
55
+ - Sharing API keys or credentials with unauthorized users.
56
+ - Violating any applicable laws or regulations.
57
+
58
+ 2. **Consequences**:
59
+ - Breaking the rules will result in immediate suspension or banning.
60
+ - Harassment or misuse of the API will not be tolerated.
61
+
62
+ 🔒 **Your Safety Matters**:
63
+ If you encounter any issues or feel harassed, please contact our support team immediately.
64
+ """
65
+
66
+ @client.on_callback_query(filters.regex("^custom_ban"))
67
+ async def cb_custom_bans(client, query):
68
+ keyboard_back = InlineKeyboardMarkup(
69
+ [
70
+ [
71
+ InlineKeyboardButton(
72
+ text="Delete key Permanent",
73
+ callback_data="banyes_yes"
74
+ )
75
+ ],
76
+ [
77
+ InlineKeyboardButton(
78
+ text="NO, Back",
79
+ callback_data="custom_key"
80
+ )
81
+ ]
82
+ ]
83
+ )
84
+ await query.edit_message_text(
85
+ text="You choose one can delete api key permanently or back",
86
+ reply_markup=keyboard_back
87
+ )
88
+
89
+ @client.on_callback_query(filters.regex("^custom_key"))
90
+ async def cb_custom_key(client, query):
91
+ keyboard_back = InlineKeyboardMarkup(
92
+ [
93
+ [
94
+ InlineKeyboardButton(
95
+ "API key V1",
96
+ callback_data="createkey"
97
+ ),
98
+ InlineKeyboardButton(
99
+ "API key V2",
100
+ callback_data="createkeyprem"
101
+ ),
102
+ ],
103
+ [
104
+ InlineKeyboardButton(
105
+ "Delete API Key",
106
+ callback_data="custom_ban"
107
+ ),
108
+ ],
109
+ [
110
+ InlineKeyboardButton(
111
+ "❌ Close",
112
+ callback_data="close"
113
+ )
114
+ ]
115
+ ]
116
+ )
117
+ return await query.edit_message_text(
118
+ text=CUSTOM_KEY,
119
+ reply_markup=keyboard_back
120
+ )
121
 
 
 
 
 
 
 
 
 
 
 
122
 
123
  @client.on_message(
124
  filters.incoming