Update chatbot/plugins/chat.py
Browse files- chatbot/plugins/chat.py +46 -0
chatbot/plugins/chat.py
CHANGED
@@ -63,6 +63,51 @@ You are my name Akeno AI and python language powered by @xtdevs on telegram supp
|
|
63 |
{datetime.datetime.now()}
|
64 |
"""
|
65 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
@Client.on_message(
|
67 |
~filters.scheduled
|
68 |
& filters.command(["offchat"])
|
@@ -79,6 +124,7 @@ async def rmchatbot_user(client: Client, message: Message):
|
|
79 |
| filters.regex(r"\b(Randy|Rendi)\b(.*)", flags=re.IGNORECASE)
|
80 |
)
|
81 |
& (filters.private | filters.group)
|
|
|
82 |
& ~filters.bot
|
83 |
& ~filters.via_bot
|
84 |
& ~filters.forwarded,
|
|
|
63 |
{datetime.datetime.now()}
|
64 |
"""
|
65 |
|
66 |
+
DISABLE_COMMAND = [
|
67 |
+
"start",
|
68 |
+
"offchat",
|
69 |
+
"onchat"
|
70 |
+
]
|
71 |
+
|
72 |
+
GEMINI_START_TEXT = """
|
73 |
+
Hey! {name}
|
74 |
+
|
75 |
+
I am ready to be a GPT-4 bot developer
|
76 |
+
|
77 |
+
- Command: /onchat (pm or group)
|
78 |
+
- Command: /offchat (pm or group)
|
79 |
+
"""
|
80 |
+
|
81 |
+
@Client.on_message(
|
82 |
+
~filters.scheduled
|
83 |
+
& filters.command(["start"])
|
84 |
+
& ~filters.forwarded
|
85 |
+
)
|
86 |
+
async def startbot(client: Client, message: Message):
|
87 |
+
buttons = [
|
88 |
+
[
|
89 |
+
InlineKeyboardButton(
|
90 |
+
text="Developer",
|
91 |
+
url=f"https://t.me/xtdevs"
|
92 |
+
),
|
93 |
+
InlineKeyboardButton(
|
94 |
+
text="Channel",
|
95 |
+
url='https://t.me/RendyProjects'
|
96 |
+
),
|
97 |
+
],
|
98 |
+
[
|
99 |
+
InlineKeyboardButton(
|
100 |
+
text="Donate Via Web",
|
101 |
+
web_app=WebAppInfo(url="https://sociabuzz.com/randydev99/tribe")
|
102 |
+
)
|
103 |
+
]
|
104 |
+
]
|
105 |
+
await message.reply_text(
|
106 |
+
text=GEMINI_START_TEXT.format(name=message.from_user.mention),
|
107 |
+
disable_web_page_preview=True,
|
108 |
+
reply_markup=InlineKeyboardMarkup(buttons)
|
109 |
+
)
|
110 |
+
|
111 |
@Client.on_message(
|
112 |
~filters.scheduled
|
113 |
& filters.command(["offchat"])
|
|
|
124 |
| filters.regex(r"\b(Randy|Rendi)\b(.*)", flags=re.IGNORECASE)
|
125 |
)
|
126 |
& (filters.private | filters.group)
|
127 |
+
& filters.command(DISABLE_COMMAND)
|
128 |
& ~filters.bot
|
129 |
& ~filters.via_bot
|
130 |
& ~filters.forwarded,
|