Merge Beta with Stable releases #1
@ -1,11 +1,13 @@
|
|||||||
from app import app
|
from app import app, isAnAdmin
|
||||||
from pyrogram import filters
|
from pyrogram import filters
|
||||||
from modules.utils import configGet, should_quote
|
from modules.utils import configGet, should_quote
|
||||||
|
from modules.database import col_applications
|
||||||
|
|
||||||
# Nearby command ===============================================================================================================
|
# Nearby command ===============================================================================================================
|
||||||
@app.on_message(~ filters.scheduled & filters.private & filters.chat(configGet("admin_group")) & filters.chat(configGet("destination_group")) & filters.command(["nearby"], prefixes=["/"]))
|
@app.on_message(~ filters.scheduled & (filters.private | (filters.chat(configGet("admin_group")) | filters.chat(configGet("destination_group")))) & filters.command(["nearby"], prefixes=["/"]))
|
||||||
async def cmd_nearby(app, msg):
|
async def cmd_nearby(app, msg):
|
||||||
await msg.reply_text("Yes, I exist.", quote=should_quote(msg))
|
if (await isAnAdmin(msg) is True) or (col_applications.find_one({"user": msg.from_user.id}) is not None):
|
||||||
|
await msg.reply_text("Yes, I exist.", quote=should_quote(msg))
|
||||||
# if not path.exists(f"{configGet('data', 'locations')}{sep}sponsors{sep}{msg.from_user.id}.json"):
|
# if not path.exists(f"{configGet('data', 'locations')}{sep}sponsors{sep}{msg.from_user.id}.json"):
|
||||||
# jsonSave(jsonLoad(f"{configGet('data', 'locations')}{sep}sponsor_default.json"), f"{configGet('data', 'locations')}{sep}sponsors{sep}{msg.from_user.id}.json")
|
# jsonSave(jsonLoad(f"{configGet('data', 'locations')}{sep}sponsor_default.json"), f"{configGet('data', 'locations')}{sep}sponsors{sep}{msg.from_user.id}.json")
|
||||||
# sponsor = jsonLoad(f"{configGet('data', 'locations')}{sep}sponsors{sep}{msg.from_user.id}.json")
|
# sponsor = jsonLoad(f"{configGet('data', 'locations')}{sep}sponsors{sep}{msg.from_user.id}.json")
|
||||||
|
@ -1,12 +1,14 @@
|
|||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from app import app
|
from app import app, isAnAdmin
|
||||||
from pyrogram import filters
|
from pyrogram import filters
|
||||||
from modules.utils import should_quote
|
from modules.utils import should_quote
|
||||||
|
from modules.database import col_applications
|
||||||
|
|
||||||
# Sponsorship command ==========================================================================================================
|
# Sponsorship command ==========================================================================================================
|
||||||
@app.on_message(~ filters.scheduled & filters.command(["sponsorship"], prefixes=["/"]))
|
@app.on_message(~ filters.scheduled & filters.command(["sponsorship"], prefixes=["/"]))
|
||||||
async def cmd_sponsorship(app, msg):
|
async def cmd_sponsorship(app, msg):
|
||||||
await msg.reply_text("Yes, I exist.", quote=should_quote(msg))
|
if (await isAnAdmin(msg) is True) or (col_applications.find_one({"user": msg.from_user.id}) is not None):
|
||||||
|
await msg.reply_text("Yes, I exist.", quote=should_quote(msg))
|
||||||
# if not path.exists(f"{configGet('data', 'locations')}{sep}sponsors{sep}{msg.from_user.id}.json"):
|
# if not path.exists(f"{configGet('data', 'locations')}{sep}sponsors{sep}{msg.from_user.id}.json"):
|
||||||
# jsonSave(jsonLoad(f"{configGet('data', 'locations')}{sep}sponsor_default.json"), f"{configGet('data', 'locations')}{sep}sponsors{sep}{msg.from_user.id}.json")
|
# jsonSave(jsonLoad(f"{configGet('data', 'locations')}{sep}sponsor_default.json"), f"{configGet('data', 'locations')}{sep}sponsors{sep}{msg.from_user.id}.json")
|
||||||
# sponsor = jsonLoad(f"{configGet('data', 'locations')}{sep}sponsors{sep}{msg.from_user.id}.json")
|
# sponsor = jsonLoad(f"{configGet('data', 'locations')}{sep}sponsors{sep}{msg.from_user.id}.json")
|
||||||
|
Reference in New Issue
Block a user