Changed config keys
This commit is contained in:
@@ -60,7 +60,7 @@ async def cmd_application(app: Client, msg: Message):
|
||||
# user_id = int(msg.command[1])
|
||||
# else:
|
||||
# list_of_users = []
|
||||
# async for m in app.get_chat_members(configGet("destination_group"), filter=ChatMembersFilter.SEARCH, query=msg.command[1]):
|
||||
# async for m in app.get_chat_members(configGet("admin", "users"), filter=ChatMembersFilter.SEARCH, query=msg.command[1]):
|
||||
# list_of_users.append(m)
|
||||
# user_id = list_of_users[0].user.id
|
||||
# try:
|
||||
|
@@ -11,7 +11,7 @@ from modules.database import col_applications, col_users
|
||||
from classes.errors.geo import PlaceNotFoundError
|
||||
|
||||
# Nearby command ===============================================================================================================
|
||||
@app.on_message(custom_filters.enabled_applications & ~filters.scheduled & (filters.private | (filters.chat(configGet("admin_group")) | filters.chat(configGet("destination_group")))) & filters.command(["nearby"], prefixes=["/"]) & (custom_filters.allowed | custom_filters.admin))
|
||||
@app.on_message(custom_filters.enabled_applications & ~filters.scheduled & (filters.private | (filters.chat(configGet("admin", "groups")) | filters.chat(configGet("admin", "users")))) & filters.command(["nearby"], prefixes=["/"]) & (custom_filters.allowed | custom_filters.admin))
|
||||
async def cmd_nearby(app: Client, msg: Message):
|
||||
|
||||
holo_user = HoloUser(msg.from_user)
|
||||
|
@@ -22,7 +22,7 @@ async def cmd_reapply(app: Client, msg: Message):
|
||||
|
||||
left_chat = True
|
||||
|
||||
async for member in app.get_chat_members(configGet("destination_group")):
|
||||
async for member in app.get_chat_members(configGet("admin", "users")):
|
||||
if member.user.id == msg.from_user.id:
|
||||
left_chat = False
|
||||
|
||||
|
@@ -11,7 +11,7 @@ from modules import custom_filters
|
||||
@app.on_message(custom_filters.enabled_warnings & ~filters.scheduled & filters.command(["warn"], prefixes=["/"]) & custom_filters.admin)
|
||||
async def cmd_warn(app: Client, msg: Message):
|
||||
|
||||
if msg.chat.id == configGet("destination_group"):
|
||||
if msg.chat.id == configGet("admin", "users"):
|
||||
if msg.reply_to_message_id != None:
|
||||
message = " ".join(msg.command[1:]) if len(msg.command) > 1 else ""
|
||||
col_warnings.insert_one({"user": msg.reply_to_message.from_user.id, "admin": msg.from_user.id, "date": datetime.now(), "reason": message})
|
||||
|
@@ -21,7 +21,7 @@ async def cmd_warnings(app: Client, msg: Message):
|
||||
target_name = user_db["tg_name"]
|
||||
except:
|
||||
list_of_users = []
|
||||
async for m in app.get_chat_members(configGet("destination_group"), filter=ChatMembersFilter.SEARCH, query=msg.command[1]):
|
||||
async for m in app.get_chat_members(configGet("admin", "users"), filter=ChatMembersFilter.SEARCH, query=msg.command[1]):
|
||||
list_of_users.append(m)
|
||||
|
||||
if len(list_of_users) != 0:
|
||||
|
Reference in New Issue
Block a user