Update main.py
Browse files
main.py
CHANGED
@@ -54,7 +54,7 @@ Before making a fuss, make sure you understand the situation first. Answer prope
|
|
54 |
"""
|
55 |
|
56 |
YOU_KEY_TEXT = """
|
57 |
-
|
58 |
|
59 |
π **API Key:** <spoiler>{api_key}</spoiler>
|
60 |
|
@@ -173,8 +173,8 @@ async def cb_custom_key(client, query):
|
|
173 |
],
|
174 |
[
|
175 |
InlineKeyboardButton(
|
176 |
-
"
|
177 |
-
callback_data="
|
178 |
)
|
179 |
]
|
180 |
]
|
@@ -202,8 +202,8 @@ async def cb_banned_and_key(client, query):
|
|
202 |
[
|
203 |
[
|
204 |
InlineKeyboardButton(
|
205 |
-
"
|
206 |
-
callback_data="
|
207 |
)
|
208 |
]
|
209 |
]
|
@@ -342,8 +342,8 @@ async def cb_new_revokekey(client, query):
|
|
342 |
],
|
343 |
[
|
344 |
InlineKeyboardButton(
|
345 |
-
"
|
346 |
-
callback_data="
|
347 |
)
|
348 |
]
|
349 |
]
|
@@ -513,6 +513,33 @@ async def cb_new_key(client, query):
|
|
513 |
)
|
514 |
return await query.answer("Error: API key not generated, please try again.", True)
|
515 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
516 |
@client.on_message(
|
517 |
filters.incoming
|
518 |
& filters.command("start")
|
@@ -526,6 +553,12 @@ async def welcome_start(client: Client, message: Message):
|
|
526 |
text="π Get API Key",
|
527 |
callback_data="custom_key"
|
528 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
529 |
]
|
530 |
]
|
531 |
)
|
|
|
54 |
"""
|
55 |
|
56 |
YOU_KEY_TEXT = """
|
57 |
+
API Key Generated
|
58 |
|
59 |
π **API Key:** <spoiler>{api_key}</spoiler>
|
60 |
|
|
|
173 |
],
|
174 |
[
|
175 |
InlineKeyboardButton(
|
176 |
+
"βοΈ Back",
|
177 |
+
callback_data="back"
|
178 |
)
|
179 |
]
|
180 |
]
|
|
|
202 |
[
|
203 |
[
|
204 |
InlineKeyboardButton(
|
205 |
+
"βοΈ Back",
|
206 |
+
callback_data="back"
|
207 |
)
|
208 |
]
|
209 |
]
|
|
|
342 |
],
|
343 |
[
|
344 |
InlineKeyboardButton(
|
345 |
+
"βοΈ Back",
|
346 |
+
callback_data="back"
|
347 |
)
|
348 |
]
|
349 |
]
|
|
|
513 |
)
|
514 |
return await query.answer("Error: API key not generated, please try again.", True)
|
515 |
|
516 |
+
@client.on_callback_query(filters.regex("close"))
|
517 |
+
async def closed_button(client, query):
|
518 |
+
await query.message.delete()
|
519 |
+
|
520 |
+
@client.on_callback_query(filters.regex("back"))
|
521 |
+
async def back_menu(client, query):
|
522 |
+
keyboard = InlineKeyboardMarkup(
|
523 |
+
[
|
524 |
+
[
|
525 |
+
InlineKeyboardButton(
|
526 |
+
text="π Get API Key",
|
527 |
+
callback_data="custom_key"
|
528 |
+
)
|
529 |
+
],
|
530 |
+
[
|
531 |
+
InlineKeyboardButton(
|
532 |
+
text="π Documentation",
|
533 |
+
url="https://github.com/TeamKillerX/Ryzenth"
|
534 |
+
)
|
535 |
+
]
|
536 |
+
]
|
537 |
+
)
|
538 |
+
return await query.edit_message_text(
|
539 |
+
f"Welcome {query.from_user.mention} to Ryzenth API.",
|
540 |
+
reply_markup=keyboard
|
541 |
+
)
|
542 |
+
|
543 |
@client.on_message(
|
544 |
filters.incoming
|
545 |
& filters.command("start")
|
|
|
553 |
text="π Get API Key",
|
554 |
callback_data="custom_key"
|
555 |
)
|
556 |
+
],
|
557 |
+
[
|
558 |
+
InlineKeyboardButton(
|
559 |
+
text="π Documentation",
|
560 |
+
url="https://github.com/TeamKillerX/Ryzenth"
|
561 |
+
)
|
562 |
]
|
563 |
]
|
564 |
)
|