Changed config keys
This commit is contained in:
@@ -57,7 +57,7 @@ async def confirm_yes(app: Client, msg: Message, kind: Literal["application", "s
|
||||
i += 1
|
||||
|
||||
if tmp_application["reapply"]:
|
||||
await app.send_message(chat_id=configGet("admin_group"), text=(locale("reapply_got", "message")).format(str(holo_user.id), msg.from_user.first_name, msg.from_user.username, "\n".join(application_content)), parse_mode=ParseMode.MARKDOWN, reply_markup=InlineKeyboardMarkup(
|
||||
await app.send_message(chat_id=configGet("admin", "groups"), text=(locale("reapply_got", "message")).format(str(holo_user.id), msg.from_user.first_name, msg.from_user.username, "\n".join(application_content)), parse_mode=ParseMode.MARKDOWN, reply_markup=InlineKeyboardMarkup(
|
||||
[
|
||||
[
|
||||
InlineKeyboardButton(text=str(locale("reapply_yes", "button")), callback_data=f"reapply_yes_{holo_user.id}")
|
||||
@@ -69,7 +69,7 @@ async def confirm_yes(app: Client, msg: Message, kind: Literal["application", "s
|
||||
)
|
||||
)
|
||||
else:
|
||||
await app.send_message(chat_id=configGet("admin_group"), text=(locale("application_got", "message")).format(str(holo_user.id), msg.from_user.first_name, msg.from_user.username, "\n".join(application_content)), parse_mode=ParseMode.MARKDOWN, reply_markup=InlineKeyboardMarkup(
|
||||
await app.send_message(chat_id=configGet("admin", "groups"), text=(locale("application_got", "message")).format(str(holo_user.id), msg.from_user.first_name, msg.from_user.username, "\n".join(application_content)), parse_mode=ParseMode.MARKDOWN, reply_markup=InlineKeyboardMarkup(
|
||||
[
|
||||
[
|
||||
InlineKeyboardButton(text=str(locale("sub_yes", "button")), callback_data=f"sub_yes_{holo_user.id}")
|
||||
@@ -124,7 +124,7 @@ async def confirm_yes(app: Client, msg: Message, kind: Literal["application", "s
|
||||
else:
|
||||
sponsorship_content.append(f"{locale(f'question_{question}', 'message', 'sponsor_titles')} {tmp_sponsorship['sponsorship'][question]}")
|
||||
|
||||
await app.send_photo(chat_id=configGet("admin_group"), photo=f"tmp{sep}{filename}.jpg", caption=(locale("sponsor_got", "message")).format(str(holo_user.id), msg.from_user.first_name, msg.from_user.username, "\n".join(sponsorship_content)), parse_mode=ParseMode.MARKDOWN, reply_markup=InlineKeyboardMarkup(
|
||||
await app.send_photo(chat_id=configGet("admin", "groups"), photo=f"tmp{sep}{filename}.jpg", caption=(locale("sponsor_got", "message")).format(str(holo_user.id), msg.from_user.first_name, msg.from_user.username, "\n".join(sponsorship_content)), parse_mode=ParseMode.MARKDOWN, reply_markup=InlineKeyboardMarkup(
|
||||
[
|
||||
[
|
||||
InlineKeyboardButton(text=str(locale("sponsor_yes", "button")), callback_data=f"sponsor_yes_{holo_user.id}")
|
||||
|
@@ -120,7 +120,7 @@ async def any_stage(app: Client, msg: Message):
|
||||
@app.on_message(~ filters.scheduled & filters.group)
|
||||
async def message_in_group(app: Client, msg: Message):
|
||||
if (msg.chat is not None) and (msg.via_bot is not None):
|
||||
if (msg.via_bot.id == (await app.get_me()).id) and (msg.chat.id == configGet("destination_group")):
|
||||
if (msg.via_bot.id == (await app.get_me()).id) and (msg.chat.id == configGet("admin", "users")):
|
||||
if configGet("remove_application_time") > 0:
|
||||
logWrite(f"User {msg.from_user.id} requested application in destination group, removing in {configGet('remove_application_time')} minutes")
|
||||
await asyncio.sleep(configGet("remove_application_time")*60)
|
||||
|
@@ -7,8 +7,8 @@ from classes.holo_user import HoloUser
|
||||
from modules import custom_filters
|
||||
|
||||
# Filter users on join =========================================================================================================
|
||||
@app.on_chat_member_updated(custom_filters.enabled_invites_check, group=configGet("destination_group"))
|
||||
#@app.on_message(filters.new_chat_members, group=configGet("destination_group"))
|
||||
@app.on_chat_member_updated(custom_filters.enabled_invites_check, group=configGet("admin", "users"))
|
||||
#@app.on_message(filters.new_chat_members, group=configGet("admin", "users"))
|
||||
async def filter_join(app: Client, member: ChatMemberUpdated):
|
||||
|
||||
if member.invite_link != None:
|
||||
@@ -25,7 +25,7 @@ async def filter_join(app: Client, member: ChatMemberUpdated):
|
||||
|
||||
logWrite(f"User {holo_user.id} joined destination group with stolen/unapproved link {holo_user.link}")
|
||||
|
||||
await app.send_message(configGet("admin_group"), locale("joined_false_link", "message").format(member.from_user.first_name, member.from_user.id), reply_markup=InlineKeyboardMarkup(
|
||||
await app.send_message(configGet("admin", "groups"), locale("joined_false_link", "message").format(member.from_user.first_name, member.from_user.id), reply_markup=InlineKeyboardMarkup(
|
||||
[
|
||||
[
|
||||
InlineKeyboardButton(text=str(locale("sus_allow", "button")), callback_data=f"sus_allow_{member.from_user.id}")
|
||||
|
@@ -7,7 +7,7 @@ from modules.logging import logWrite
|
||||
from modules.utils import configGet, locale
|
||||
from modules import custom_filters
|
||||
|
||||
@app.on_message(custom_filters.enabled_dinovoice & ~filters.scheduled & filters.voice & filters.chat(configGet("destination_group")))
|
||||
@app.on_message(custom_filters.enabled_dinovoice & ~filters.scheduled & filters.voice & filters.chat(configGet("admin", "users")))
|
||||
async def voice_message(app: Client, msg: Message):
|
||||
logWrite(f"User {msg.from_user.id} sent voice message in destination group")
|
||||
await msg.reply_text(choice(locale("voice_message", "message")))
|
Reference in New Issue
Block a user