Spaces:
Running
Running
Update chatbot/plugins/chat.py
Browse files- chatbot/plugins/chat.py +8 -7
chatbot/plugins/chat.py
CHANGED
@@ -51,15 +51,13 @@ async def geni_files_delete(name: str):
|
|
51 |
|
52 |
FREE_GEMINI_TEXT = """
|
53 |
• User Free : {name}
|
54 |
-
- Text: `
|
55 |
-
- Image: `
|
56 |
-
- Video: `
|
57 |
-
- Voice: `
|
58 |
- Document: `{check_status}`
|
59 |
|
60 |
{info}
|
61 |
-
|
62 |
-
- contact : @hellozdev
|
63 |
"""
|
64 |
|
65 |
@Client.on_message(
|
@@ -69,10 +67,12 @@ FREE_GEMINI_TEXT = """
|
|
69 |
)
|
70 |
async def userstatus(client: Client, message: Message):
|
71 |
is_check_plan = await db.is_gemini_plan(user_id=message.from_user.id)
|
72 |
-
|
|
|
73 |
return await message.reply_text(
|
74 |
FREE_GEMINI_TEXT.format(
|
75 |
name=message.from_user.first_name,
|
|
|
76 |
check_status="Unlimited" if is_check_plan else "Stopped",
|
77 |
info="You need email business: [register](https://forms.gle/egRciGY39mmhNyScA)\nRemember: **can't ownership**"
|
78 |
),
|
@@ -81,6 +81,7 @@ async def userstatus(client: Client, message: Message):
|
|
81 |
return await message.reply_text(
|
82 |
FREE_GEMINI_TEXT.format(
|
83 |
name=message.from_user.first_name,
|
|
|
84 |
check_status="Unlimited" if is_check_plan else "Stopped",
|
85 |
info="**All unlimited good!**"
|
86 |
)
|
|
|
51 |
|
52 |
FREE_GEMINI_TEXT = """
|
53 |
• User Free : {name}
|
54 |
+
- Text: `{check_enable}`
|
55 |
+
- Image: `{check_enable}`
|
56 |
+
- Video: `{check_enable}`
|
57 |
+
- Voice: `{check_enable}`
|
58 |
- Document: `{check_status}`
|
59 |
|
60 |
{info}
|
|
|
|
|
61 |
"""
|
62 |
|
63 |
@Client.on_message(
|
|
|
67 |
)
|
68 |
async def userstatus(client: Client, message: Message):
|
69 |
is_check_plan = await db.is_gemini_plan(user_id=message.from_user.id)
|
70 |
+
chat_user = await db.get_chatbot(message.chat.id)
|
71 |
+
if not is_check_plan and not chat_user:
|
72 |
return await message.reply_text(
|
73 |
FREE_GEMINI_TEXT.format(
|
74 |
name=message.from_user.first_name,
|
75 |
+
check_enable="Unlimited" if chat_user else "Stopped",
|
76 |
check_status="Unlimited" if is_check_plan else "Stopped",
|
77 |
info="You need email business: [register](https://forms.gle/egRciGY39mmhNyScA)\nRemember: **can't ownership**"
|
78 |
),
|
|
|
81 |
return await message.reply_text(
|
82 |
FREE_GEMINI_TEXT.format(
|
83 |
name=message.from_user.first_name,
|
84 |
+
check_enable="Unlimited" if chat_user else "Stopped",
|
85 |
check_status="Unlimited" if is_check_plan else "Stopped",
|
86 |
info="**All unlimited good!**"
|
87 |
)
|