Spaces:
Running
Running
Captain Ezio
commited on
Commit
·
9272463
1
Parent(s):
dc07485
Update start.py
Browse files- Powers/plugins/start.py +11 -14
Powers/plugins/start.py
CHANGED
@@ -35,10 +35,10 @@ async def donate(_, m: Message):
|
|
35 |
|
36 |
You can donate by contacting my owner: [Captain Ezio](http://t.me/iamgojoof6eyes)
|
37 |
"""
|
38 |
-
|
39 |
|
40 |
LOGGER.info(f"{m.from_user.id} fetched donation text in {m.chat.id}")
|
41 |
-
await m.reply_photo(photo=StartPic,
|
42 |
caption=cpt)
|
43 |
return
|
44 |
|
@@ -67,9 +67,8 @@ async def close_admin_callback(_, q: CallbackQuery):
|
|
67 |
@Gojo.on_message(
|
68 |
command("start") & (filters.group | filters.private),
|
69 |
)
|
70 |
-
|
71 |
async def start(c: Gojo, m: Message):
|
72 |
-
global StartPic
|
73 |
chat_type = await chattype(m)
|
74 |
if chat_type == "private":
|
75 |
if len(m.text.split()) > 1:
|
@@ -93,7 +92,7 @@ async def start(c: Gojo, m: Message):
|
|
93 |
|
94 |
|
95 |
await m.reply_photo(
|
96 |
-
photo=StartPic,
|
97 |
caption=help_msg,
|
98 |
parse_mode="markdown",
|
99 |
reply_markup=ikb(help_kb),
|
@@ -109,10 +108,10 @@ async def start(c: Gojo, m: Message):
|
|
109 |
|
110 |
Join my [News Channel](https://t.me/gojo_updates) to get information on all the latest updates."""
|
111 |
|
112 |
-
|
113 |
|
114 |
await m.reply_photo(
|
115 |
-
photo=StartPic,
|
116 |
caption=cpt,
|
117 |
reply_markup=(await gen_start_kb(m)),
|
118 |
quote=True,
|
@@ -173,7 +172,7 @@ async def commands_menu(_, q: CallbackQuery):
|
|
173 |
pass
|
174 |
except QueryIdInvalid:
|
175 |
await q.message.reply_photo(
|
176 |
-
photo=StartPic,
|
177 |
caption=cpt,
|
178 |
reply_markup=keyboard)
|
179 |
|
@@ -182,9 +181,7 @@ async def commands_menu(_, q: CallbackQuery):
|
|
182 |
|
183 |
|
184 |
@Gojo.on_message(command("help"))
|
185 |
-
StartPic = choice(StartPic)
|
186 |
async def help_menu(_, m: Message):
|
187 |
-
global StartPic
|
188 |
if len(m.text.split()) >= 2:
|
189 |
help_option = (m.text.split(None, 1)[1]).lower()
|
190 |
help_msg, help_kb = await get_help_msg(m, help_option)
|
@@ -200,7 +197,7 @@ async def help_menu(_, m: Message):
|
|
200 |
if chat_type == "private":
|
201 |
|
202 |
await m.reply_photo(
|
203 |
-
photo=StartPic,
|
204 |
caption=help_msg,
|
205 |
parse_mode="markdown",
|
206 |
reply_markup=ikb(help_kb),
|
@@ -210,7 +207,7 @@ async def help_menu(_, m: Message):
|
|
210 |
else:
|
211 |
|
212 |
await m.reply_photo(
|
213 |
-
photo=StartPic,
|
214 |
caption=f"Press the button below to get help for <i>{help_option}</i>",
|
215 |
reply_markup=ikb(
|
216 |
[
|
@@ -244,9 +241,9 @@ async def help_menu(_, m: Message):
|
|
244 |
[[("Help", f"t.me/{Config.BOT_USERNAME}?start=help", "url")]],
|
245 |
)
|
246 |
msg = "Contact me in PM to get the list of possible commands."
|
247 |
-
|
248 |
await m.reply_photo(
|
249 |
-
photo=StartPic,
|
250 |
caption=msg,
|
251 |
reply_markup=keyboard,
|
252 |
)
|
|
|
35 |
|
36 |
You can donate by contacting my owner: [Captain Ezio](http://t.me/iamgojoof6eyes)
|
37 |
"""
|
38 |
+
|
39 |
|
40 |
LOGGER.info(f"{m.from_user.id} fetched donation text in {m.chat.id}")
|
41 |
+
await m.reply_photo(photo=choice(StartPic),
|
42 |
caption=cpt)
|
43 |
return
|
44 |
|
|
|
67 |
@Gojo.on_message(
|
68 |
command("start") & (filters.group | filters.private),
|
69 |
)
|
70 |
+
|
71 |
async def start(c: Gojo, m: Message):
|
|
|
72 |
chat_type = await chattype(m)
|
73 |
if chat_type == "private":
|
74 |
if len(m.text.split()) > 1:
|
|
|
92 |
|
93 |
|
94 |
await m.reply_photo(
|
95 |
+
photo=choice(StartPic),
|
96 |
caption=help_msg,
|
97 |
parse_mode="markdown",
|
98 |
reply_markup=ikb(help_kb),
|
|
|
108 |
|
109 |
Join my [News Channel](https://t.me/gojo_updates) to get information on all the latest updates."""
|
110 |
|
111 |
+
|
112 |
|
113 |
await m.reply_photo(
|
114 |
+
photo=choice(StartPic),
|
115 |
caption=cpt,
|
116 |
reply_markup=(await gen_start_kb(m)),
|
117 |
quote=True,
|
|
|
172 |
pass
|
173 |
except QueryIdInvalid:
|
174 |
await q.message.reply_photo(
|
175 |
+
photo=choice(StartPic),
|
176 |
caption=cpt,
|
177 |
reply_markup=keyboard)
|
178 |
|
|
|
181 |
|
182 |
|
183 |
@Gojo.on_message(command("help"))
|
|
|
184 |
async def help_menu(_, m: Message):
|
|
|
185 |
if len(m.text.split()) >= 2:
|
186 |
help_option = (m.text.split(None, 1)[1]).lower()
|
187 |
help_msg, help_kb = await get_help_msg(m, help_option)
|
|
|
197 |
if chat_type == "private":
|
198 |
|
199 |
await m.reply_photo(
|
200 |
+
photo=choice(StartPic),
|
201 |
caption=help_msg,
|
202 |
parse_mode="markdown",
|
203 |
reply_markup=ikb(help_kb),
|
|
|
207 |
else:
|
208 |
|
209 |
await m.reply_photo(
|
210 |
+
photo=choice(StartPic),
|
211 |
caption=f"Press the button below to get help for <i>{help_option}</i>",
|
212 |
reply_markup=ikb(
|
213 |
[
|
|
|
241 |
[[("Help", f"t.me/{Config.BOT_USERNAME}?start=help", "url")]],
|
242 |
)
|
243 |
msg = "Contact me in PM to get the list of possible commands."
|
244 |
+
|
245 |
await m.reply_photo(
|
246 |
+
photo=choice(StartPic),
|
247 |
caption=msg,
|
248 |
reply_markup=keyboard,
|
249 |
)
|