Spaces:
Sleeping
Sleeping
Captain Ezio
commited on
Commit
ยท
82a6804
1
Parent(s):
bea7164
...
Browse files- Powers/plugins/approve.py +1 -1
- Powers/plugins/info.py +1 -3
- Powers/plugins/utils.py +4 -4
Powers/plugins/approve.py
CHANGED
@@ -137,7 +137,7 @@ async def check_approved(_, m: Message):
|
|
137 |
await m.reply_text(f"No users are approved in {chat_title}.")
|
138 |
return
|
139 |
|
140 |
-
for user_id, user_name in approved_people
|
141 |
try:
|
142 |
await chat.get_member(user_id) # Check if user is in chat or not
|
143 |
except UserNotParticipant:
|
|
|
137 |
await m.reply_text(f"No users are approved in {chat_title}.")
|
138 |
return
|
139 |
|
140 |
+
for user_id, user_name in approved_people:
|
141 |
try:
|
142 |
await chat.get_member(user_id) # Check if user is in chat or not
|
143 |
except UserNotParticipant:
|
Powers/plugins/info.py
CHANGED
@@ -52,9 +52,7 @@ async def count(c: Gojo, chat):
|
|
52 |
total_banned = len(total_banned)
|
53 |
return total_bot, total_admin, bot_admin, total_banned
|
54 |
except Exception as e:
|
55 |
-
total_bot =
|
56 |
-
total_admin
|
57 |
-
) = bot_admin = total_banned = "Can't fetch because I am not part of the chat."
|
58 |
|
59 |
return total_bot, total_admin, bot_admin, total_banned
|
60 |
|
|
|
52 |
total_banned = len(total_banned)
|
53 |
return total_bot, total_admin, bot_admin, total_banned
|
54 |
except Exception as e:
|
55 |
+
total_bot = total_admin = bot_admin = total_banned = "`Can't fetch because I am not part of the chat.`"
|
|
|
|
|
56 |
|
57 |
return total_bot, total_admin, bot_admin, total_banned
|
58 |
|
Powers/plugins/utils.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
-
import re
|
2 |
import json
|
|
|
3 |
from io import BytesIO
|
4 |
from os import remove
|
5 |
|
@@ -331,17 +331,17 @@ async def paste_func(_, message: Message):
|
|
331 |
content = {'content':fdata}
|
332 |
|
333 |
remove(doc)
|
334 |
-
link = paste(content)
|
335 |
if not link:
|
336 |
await m.reply_text("Failed to post!")
|
337 |
return
|
338 |
-
kb = [[InlineKeyboardButton(text="๐ Paste ๐", url=link)]]
|
339 |
await m.delete()
|
340 |
try:
|
341 |
await message.reply_text("Here's your paste", reply_markup=InlineKeyboardMarkup(kb))
|
342 |
except Exception as e:
|
343 |
if link:
|
344 |
-
return await message.reply_text(f"Here's your paste:\n [link]({link})",)
|
345 |
return await message.reply_text(f"Failed to post. Due to following error:\n{e}")
|
346 |
|
347 |
|
|
|
|
|
1 |
import json
|
2 |
+
import re
|
3 |
from io import BytesIO
|
4 |
from os import remove
|
5 |
|
|
|
331 |
content = {'content':fdata}
|
332 |
|
333 |
remove(doc)
|
334 |
+
link = paste(content)
|
335 |
if not link:
|
336 |
await m.reply_text("Failed to post!")
|
337 |
return
|
338 |
+
kb = [[InlineKeyboardButton(text="๐ Paste ๐", url=link + f".{exe}")]]
|
339 |
await m.delete()
|
340 |
try:
|
341 |
await message.reply_text("Here's your paste", reply_markup=InlineKeyboardMarkup(kb))
|
342 |
except Exception as e:
|
343 |
if link:
|
344 |
+
return await message.reply_text(f"Here's your paste:\n [link]({link + f'.{exe}'})",)
|
345 |
return await message.reply_text(f"Failed to post. Due to following error:\n{e}")
|
346 |
|
347 |
|