Added rules command
This commit is contained in:
parent
a867c4f4b7
commit
49e9927ba1
@ -24,6 +24,7 @@
|
||||
"locale": "locale"
|
||||
},
|
||||
"commands": {
|
||||
"rules": "Check out the rules",
|
||||
"reapply": "Fill the application again"
|
||||
},
|
||||
"commands_admin": {
|
||||
|
File diff suppressed because one or more lines are too long
13
main.py
13
main.py
@ -60,6 +60,14 @@ async def cmd_kill(app, msg):
|
||||
# ==============================================================================================================================
|
||||
|
||||
|
||||
# Rules command =============================================================================================================
|
||||
@app.on_message(~ filters.scheduled & filters.private & filters.command(["rules"], prefixes=["", "/"]))
|
||||
async def cmd_rules(app, msg):
|
||||
for rule_msg in locale("rules"):
|
||||
await msg.reply_text(rule_msg)
|
||||
# ==============================================================================================================================
|
||||
|
||||
|
||||
# Applications command =========================================================================================================
|
||||
@app.on_message(~ filters.scheduled & filters.private & filters.command(["applications"], prefixes=["", "/"]))
|
||||
async def cmd_applications(app, msg):
|
||||
@ -217,6 +225,11 @@ async def callback_query_accept(app, clb):
|
||||
if need_link:
|
||||
link = await app.create_chat_invite_link(configGet("destination_group"), name=f"Invite for {fullclb[2]}", member_limit=1) #, expire_date=datetime.now()+timedelta(days=1))
|
||||
|
||||
await app.send_message(int(fullclb[2]), locale("read_rules", "message"))
|
||||
|
||||
for rule_msg in locale("rules"):
|
||||
await app.send_message(int(fullclb[2]), rule_msg)
|
||||
|
||||
await app.send_message(int(fullclb[2]), locale("approved", "message"), reply_markup=InlineKeyboardMarkup(
|
||||
[[
|
||||
InlineKeyboardButton(str(locale("join", "button")), url=link.invite_link)
|
||||
|
Reference in New Issue
Block a user