Spaces:
Sleeping
Sleeping
Captain Ezio
commited on
Commit
·
191552d
1
Parent(s):
56357c6
minor changes
Browse files- Powers/plugins/start.py +52 -48
Powers/plugins/start.py
CHANGED
@@ -20,16 +20,19 @@ from Powers.vars import Config
|
|
20 |
command("donate") & (filters.group | filters.private),
|
21 |
)
|
22 |
async def donate(_, m: Message):
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
|
30 |
-
|
|
|
31 |
|
32 |
-
|
|
|
|
|
33 |
return
|
34 |
|
35 |
|
@@ -77,8 +80,8 @@ async def start(c: Gojo, m: Message):
|
|
77 |
if not help_msg:
|
78 |
return
|
79 |
|
80 |
-
await m.
|
81 |
-
|
82 |
caption=help_msg,
|
83 |
parse_mode="markdown",
|
84 |
reply_markup=ikb(help_kb),
|
@@ -87,14 +90,16 @@ async def start(c: Gojo, m: Message):
|
|
87 |
)
|
88 |
return
|
89 |
try:
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
|
|
|
|
98 |
reply_markup=(await gen_start_kb(m)),
|
99 |
quote=True,
|
100 |
|
@@ -112,13 +117,15 @@ async def start(c: Gojo, m: Message):
|
|
112 |
@Gojo.on_callback_query(filters.regex("^start_back$"))
|
113 |
async def start_back(_, q: CallbackQuery):
|
114 |
try:
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
|
|
120 |
|
121 |
-
|
|
|
122 |
reply_markup=(await gen_start_kb(q.message)),
|
123 |
|
124 |
)
|
@@ -137,28 +144,25 @@ async def commands_menu(_, q: CallbackQuery):
|
|
137 |
],
|
138 |
)
|
139 |
try:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
140 |
await q.message.edit_caption(
|
141 |
-
caption=
|
142 |
-
Hey There! My name is Gojo.
|
143 |
-
I'm here to help you manage your groups!
|
144 |
-
Commands available:
|
145 |
-
× /start: Start the bot
|
146 |
-
× /help: Give's you this message.""",
|
147 |
reply_markup=keyboard,
|
148 |
)
|
149 |
except MessageNotModified:
|
150 |
pass
|
151 |
except QueryIdInvalid:
|
152 |
-
await q.message.
|
153 |
-
|
154 |
-
caption=
|
155 |
-
|
156 |
-
|
157 |
-
Commands available:
|
158 |
-
× /start: Start the bot
|
159 |
-
× /help: Give's you this message.""",
|
160 |
-
reply_markup=keyboard,
|
161 |
-
)
|
162 |
await q.answer()
|
163 |
return
|
164 |
|
@@ -177,8 +181,8 @@ async def help_menu(_, m: Message):
|
|
177 |
f"{m.from_user.id} fetched help for '{help_option}' text in {m.chat.id}",
|
178 |
)
|
179 |
if m.chat.type == "private":
|
180 |
-
await m.
|
181 |
-
|
182 |
caption=help_msg,
|
183 |
parse_mode="markdown",
|
184 |
reply_markup=ikb(help_kb),
|
@@ -186,8 +190,8 @@ async def help_menu(_, m: Message):
|
|
186 |
|
187 |
)
|
188 |
else:
|
189 |
-
await m.
|
190 |
-
|
191 |
caption=f"Press the button below to get help for <i>{help_option}</i>",
|
192 |
reply_markup=ikb(
|
193 |
[
|
@@ -213,15 +217,15 @@ async def help_menu(_, m: Message):
|
|
213 |
Hey There! My name is Gojo.
|
214 |
I'm here to help you manage your groups!
|
215 |
Commands available:
|
216 |
-
|
217 |
-
|
218 |
else:
|
219 |
keyboard = ikb(
|
220 |
[[("Help", f"t.me/{Config.BOT_USERNAME}?start=help", "url")]],
|
221 |
)
|
222 |
msg = "Contact me in PM to get the list of possible commands."
|
223 |
-
await m.
|
224 |
-
|
225 |
caption=msg,
|
226 |
reply_markup=keyboard,
|
227 |
)
|
|
|
20 |
command("donate") & (filters.group | filters.private),
|
21 |
)
|
22 |
async def donate(_, m: Message):
|
23 |
+
cpt="""
|
24 |
+
Hey Thanks for your thought of donating me!
|
25 |
+
When you donate, all the fund goes towards my development which makes on fast and responsive.
|
26 |
+
Your donation might also me get me a new feature or two, which I wasn't able to get due to server limitations.
|
27 |
+
|
28 |
+
All the fund would be put into my services such as database, storage and hosting!
|
29 |
|
30 |
+
You can donate by contacting my owner: [Captain Ezio](@iamgojoof6eyes)
|
31 |
+
"""
|
32 |
|
33 |
+
LOGGER.info(f"{m.from_user.id} fetched donation text in {m.chat.id}")
|
34 |
+
await m.reply_photo(photo="https://te.legra.ph/file/4bf3b88115068d41efadd.jpg",
|
35 |
+
caption=cpt)
|
36 |
return
|
37 |
|
38 |
|
|
|
80 |
if not help_msg:
|
81 |
return
|
82 |
|
83 |
+
await m.reply_photo(
|
84 |
+
photo="https://te.legra.ph/file/4bf3b88115068d41efadd.jpg",
|
85 |
caption=help_msg,
|
86 |
parse_mode="markdown",
|
87 |
reply_markup=ikb(help_kb),
|
|
|
90 |
)
|
91 |
return
|
92 |
try:
|
93 |
+
cpt=f"""
|
94 |
+
Hey {m.from_user.first_name}! My self Gojo 😎.
|
95 |
+
I'm here to help you manage your groups!
|
96 |
+
Hit /help to find out more about how to use me in my full potential!
|
97 |
+
|
98 |
+
Join my [News Channel](https://t.me/gojo_updates) to get information on all the latest updates."""
|
99 |
+
|
100 |
+
await m.reply_photo(
|
101 |
+
photo="https://te.legra.ph/file/4bf3b88115068d41efadd.jpg",
|
102 |
+
caption=cpt,
|
103 |
reply_markup=(await gen_start_kb(m)),
|
104 |
quote=True,
|
105 |
|
|
|
117 |
@Gojo.on_callback_query(filters.regex("^start_back$"))
|
118 |
async def start_back(_, q: CallbackQuery):
|
119 |
try:
|
120 |
+
cpt="""
|
121 |
+
Hey there! My name is Gojo ✨.
|
122 |
+
I'm here to help you manage your groups!
|
123 |
+
Hit /help to find out more about how to use me in my full potential!
|
124 |
+
|
125 |
+
Join my [News Channel](http://t.me/gojo_updates) to get information on all the latest updates."""
|
126 |
|
127 |
+
await q.message.edit_caption(
|
128 |
+
caption=cpt,
|
129 |
reply_markup=(await gen_start_kb(q.message)),
|
130 |
|
131 |
)
|
|
|
144 |
],
|
145 |
)
|
146 |
try:
|
147 |
+
cpt="""
|
148 |
+
Hey There! My name is Gojo.
|
149 |
+
I'm here to help you manage your groups!
|
150 |
+
Commands available:
|
151 |
+
* /start: Start the bot
|
152 |
+
* /help: Give's you this message."""
|
153 |
+
|
154 |
await q.message.edit_caption(
|
155 |
+
caption=cpt,
|
|
|
|
|
|
|
|
|
|
|
156 |
reply_markup=keyboard,
|
157 |
)
|
158 |
except MessageNotModified:
|
159 |
pass
|
160 |
except QueryIdInvalid:
|
161 |
+
await q.message.reply_photo(
|
162 |
+
photo="https://te.legra.ph/file/4bf3b88115068d41efadd.jpg",
|
163 |
+
caption=cpt,
|
164 |
+
reply_markup=keyboard)
|
165 |
+
|
|
|
|
|
|
|
|
|
|
|
166 |
await q.answer()
|
167 |
return
|
168 |
|
|
|
181 |
f"{m.from_user.id} fetched help for '{help_option}' text in {m.chat.id}",
|
182 |
)
|
183 |
if m.chat.type == "private":
|
184 |
+
await m.reply_photo(
|
185 |
+
photo="https://te.legra.ph/file/4bf3b88115068d41efadd.jpg",
|
186 |
caption=help_msg,
|
187 |
parse_mode="markdown",
|
188 |
reply_markup=ikb(help_kb),
|
|
|
190 |
|
191 |
)
|
192 |
else:
|
193 |
+
await m.reply_photo(
|
194 |
+
photo="https://te.legra.ph/file/4bf3b88115068d41efadd.jpg",
|
195 |
caption=f"Press the button below to get help for <i>{help_option}</i>",
|
196 |
reply_markup=ikb(
|
197 |
[
|
|
|
217 |
Hey There! My name is Gojo.
|
218 |
I'm here to help you manage your groups!
|
219 |
Commands available:
|
220 |
+
* /start: Start the bot
|
221 |
+
* /help: Give's you this message."""
|
222 |
else:
|
223 |
keyboard = ikb(
|
224 |
[[("Help", f"t.me/{Config.BOT_USERNAME}?start=help", "url")]],
|
225 |
)
|
226 |
msg = "Contact me in PM to get the list of possible commands."
|
227 |
+
await m.reply_photo(
|
228 |
+
photo="https://te.legra.ph/file/4bf3b88115068d41efadd.jpg",
|
229 |
caption=msg,
|
230 |
reply_markup=keyboard,
|
231 |
)
|