sticker-captcha-bot/plugins/start.py
2023-09-11 21:05:50 +08:00

32 lines
1021 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

from pyrogram import filters
from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton
from sticker.single_utils import Message, Client
from sticker import bot
@bot.on_message(filters=filters.private & filters.command("start"))
async def start(client: Client, message: Message):
me = await client.get_me()
await message.reply(
f"""你好,我是 <b>{me.first_name}</b>
我可以主动私聊申请加入群组的新成员进行贴纸验证。""",
quote=True,
reply_markup=InlineKeyboardMarkup(
[
[
InlineKeyboardButton(
"Github", url="https://github.com/Xtao-Labs/sticker-captcha-bot"
)
],
[
InlineKeyboardButton(
"邀请入群",
url=f"https://t.me/{me.username}?startgroup=start&admin=can_invite_users",
)
],
]
),
)