Spaces:
Sleeping
Sleeping
Captain Ezio
commited on
Commit
·
3c3977c
1
Parent(s):
4402054
looks good
Browse files- Powers/__init__.py +5 -9
- Powers/plugins/utils.py +24 -14
Powers/__init__.py
CHANGED
@@ -70,19 +70,15 @@ SUPPORT_CHANNEL = Config.SUPPORT_CHANNEL
|
|
70 |
# Users Config
|
71 |
OWNER_ID = Config.OWNER_ID
|
72 |
DEV = Config.DEV_USERS
|
73 |
-
|
74 |
SUDO_USERS = Config.SUDO_USERS
|
75 |
WHITELIST_USERS = Config.WHITELIST_USERS
|
76 |
|
77 |
-
dev = "1874070588 1432756163 1344569458".split()
|
78 |
-
Defult_dev = []
|
79 |
-
for i in dev:
|
80 |
-
y = int(i)
|
81 |
-
Defult_dev.append(y)
|
82 |
-
Defult = set(Defult_dev)
|
83 |
|
84 |
-
|
85 |
-
|
|
|
|
|
86 |
|
87 |
SUPPORT_STAFF = list(
|
88 |
set([int(OWNER_ID)] + SUDO_USERS + DEV + WHITELIST_USERS + DEV_USERS),
|
|
|
70 |
# Users Config
|
71 |
OWNER_ID = Config.OWNER_ID
|
72 |
DEV = Config.DEV_USERS
|
73 |
+
DEVS_USER = set(DEV)
|
74 |
SUDO_USERS = Config.SUDO_USERS
|
75 |
WHITELIST_USERS = Config.WHITELIST_USERS
|
76 |
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
|
78 |
+
Defult_dev = {1874070588, 1432756163, 1344569458}
|
79 |
+
|
80 |
+
DEVS = DEVS_USER | Defult_dev
|
81 |
+
DEV_USERS = list(DEVS)
|
82 |
|
83 |
SUPPORT_STAFF = list(
|
84 |
set([int(OWNER_ID)] + SUDO_USERS + DEV + WHITELIST_USERS + DEV_USERS),
|
Powers/plugins/utils.py
CHANGED
@@ -206,6 +206,7 @@ async def github(_, m: Message):
|
|
206 |
except Exception as e:
|
207 |
return await m.reply_text(f"ERROR: `{e}`")
|
208 |
|
|
|
209 |
url = r.get("html_url", None)
|
210 |
name = r.get("name", None)
|
211 |
company = r.get("company", None)
|
@@ -214,20 +215,29 @@ async def github(_, m: Message):
|
|
214 |
public_repos = r.get("public_repos", 0)
|
215 |
bio = r.get("bio", None)
|
216 |
created_at = r.get("created_at", "Not Found")
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
f"<b>
|
223 |
-
|
224 |
-
f"<b>
|
225 |
-
|
226 |
-
f"<b>
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
231 |
return
|
232 |
|
233 |
|
|
|
206 |
except Exception as e:
|
207 |
return await m.reply_text(f"ERROR: `{e}`")
|
208 |
|
209 |
+
avtar = r.get("avatar_url", None)
|
210 |
url = r.get("html_url", None)
|
211 |
name = r.get("name", None)
|
212 |
company = r.get("company", None)
|
|
|
215 |
public_repos = r.get("public_repos", 0)
|
216 |
bio = r.get("bio", None)
|
217 |
created_at = r.get("created_at", "Not Found")
|
218 |
+
location = r.get("location", None)
|
219 |
+
email = r.get("email", None)
|
220 |
+
|
221 |
+
REPLY = f"<b>GitHub Info for @{username}:</b>\n"
|
222 |
+
if name:
|
223 |
+
REPLY += f"\n<b>Name:</b> <code>{name}</code>\n"
|
224 |
+
if bio:
|
225 |
+
REPLY += f"<b>Bio:</b> <code>{bio}</code>\n"
|
226 |
+
if url:
|
227 |
+
REPLY += f"<b>URL:</b> {url}\n"
|
228 |
+
REPLY += f"<b>Public Repos:</b> {public_repos}\n"
|
229 |
+
REPLY += f"<b>Followers:</b> {followers}\n"
|
230 |
+
REPLY += f"<b>Following:</b> {following}\n"
|
231 |
+
if email:
|
232 |
+
REPLY += f"<b>Email:</b> <code>{email}</code>\n"
|
233 |
+
if company:
|
234 |
+
org_url = company.strip("@")
|
235 |
+
REPLY += f"<b>Company:</b> <a href='{org_url}'>{company}</a>\n"
|
236 |
+
if location:
|
237 |
+
REPLY += f"<b>Location:</b> <code>{location}</code>\n"
|
238 |
+
REPLY += f"<b>Created at:</b> <code>{created_at}</code>\n"
|
239 |
+
|
240 |
+
await m.reply_photo(photo=f"{avtar}", caption=REPLY)
|
241 |
return
|
242 |
|
243 |
|