This commit closes #27
This commit is contained in:
parent
0c78f21c96
commit
ed2361638a
@ -1,3 +1,4 @@
|
|||||||
|
from os import path
|
||||||
from traceback import print_exc
|
from traceback import print_exc
|
||||||
from app import app
|
from app import app
|
||||||
from pyrogram import filters
|
from pyrogram import filters
|
||||||
@ -6,7 +7,7 @@ from pyrogram.client import Client
|
|||||||
from classes.holo_user import HoloUser
|
from classes.holo_user import HoloUser
|
||||||
from modules import custom_filters
|
from modules import custom_filters
|
||||||
from modules.logging import logWrite
|
from modules.logging import logWrite
|
||||||
from modules.utils import configGet, locale, should_quote, find_location
|
from modules.utils import configGet, jsonLoad, locale, should_quote, find_location
|
||||||
from modules.database import col_applications, col_users
|
from modules.database import col_applications, col_users
|
||||||
from classes.errors.geo import PlaceNotFoundError
|
from classes.errors.geo import PlaceNotFoundError
|
||||||
|
|
||||||
@ -43,6 +44,7 @@ async def cmd_nearby(app: Client, msg: Message):
|
|||||||
if not entry["user"] == msg.from_user.id:
|
if not entry["user"] == msg.from_user.id:
|
||||||
user = col_users.find_one( {"user": entry["user"]} )
|
user = col_users.find_one( {"user": entry["user"]} )
|
||||||
if user is not None:
|
if user is not None:
|
||||||
|
if entry["user"] in jsonLoad(path.join(configGet("cache", "locations"), "group_members")):
|
||||||
if user["tg_username"] not in [None, "None", ""]: # Check if user has any name
|
if user["tg_username"] not in [None, "None", ""]: # Check if user has any name
|
||||||
output.append(f'• **{user["tg_name"]}** (@{user["tg_username"]}):\n - {entry["application"]["3"]["name"]}, {entry["application"]["3"]["adminName1"]}')
|
output.append(f'• **{user["tg_name"]}** (@{user["tg_username"]}):\n - {entry["application"]["3"]["name"]}, {entry["application"]["3"]["adminName1"]}')
|
||||||
else:
|
else:
|
||||||
|
Reference in New Issue
Block a user