示例#1
0
        ob_havo = get_weather() or ob_havo
        bosh = bosh_shablon.format(hafta[dt.date.today().weekday()],
                                   dt.date.today(), *ob_havo)


edit_home()
bolimlar = ReplyKeyboardMarkup(
    [
        ["1⃣ Suyuq Taomlar", "2⃣ Quyuq Taomlar"],
        [
            "🍜 Uyg'ur Taomlar",
            "🍢 Kaboblar",
        ],
        ["🍻 BAR", "🥗 Salatlar"],
        [
            korzina,  # tayyor
            buyurtma
        ],
        [sozlamalar, qoidalar],
        [
            boglanish,  # tayyor
            manzil_  # tayyor
        ],
    ],
    resize_keyboard=True)
raqamlar = ReplyKeyboardMarkup([["1", "2", "3"], ["4", "5", "6"],
                                ["7", "8", "9"], [ortga, menu], [
                                    korzina,
                                ]],
                               resize_keyboard=True)
示例#2
0
"""

from pyrogram import Client, ReplyKeyboardMarkup, InlineKeyboardMarkup, InlineKeyboardButton

# Create a client using your bot token
app = Client("123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11")

with app:
    app.send_message(
        "haskell",  # Edit this
        "This is a ReplyKeyboardMarkup example",
        reply_markup=ReplyKeyboardMarkup(
            [
                ["A", "B", "C", "D"],  # First row
                ["E", "F", "G"],  # Second row
                ["H", "I"],  # Third row
                ["J"]  # Fourth row
            ],
            resize_keyboard=True  # Make the keyboard smaller
        )
    )

    app.send_message(
        "haskell",  # Edit this
        "This is a InlineKeyboardMarkup example",
        reply_markup=InlineKeyboardMarkup(
            [
                [  # First row

                    InlineKeyboardButton(  # Generates a callback query when pressed
                        "Button",
示例#3
0
def kb_home(user):
    kb = user.choice_localized(ru_obj=KB_HOME_RU, en_obj=KB_HOME_EN)
    return ReplyKeyboardMarkup(kb, resize_keyboard=True)
示例#4
0
from utils import *
from filters import *
logging.basicConfig(filename="logs.txt",
                    format='%(asctime)s %(message)s',
                    filemode='a')
logger = logging.getLogger()
app = Client(
    "my_bot",
    config.api_id, config.api_hash,
    bot_token=config.token,
    workers=config.threads
)

sleeping_time = 15

home_markup = ReplyKeyboardMarkup(
    [["Balance", "Spend"], ["Top up", "How to use?"]], resize_keyboard=True)
help_markup = InlineKeyboardMarkup([[InlineKeyboardButton(
    "Add LIKE bot to your group", url="https://t.me/minterlikebot?startgroup=hbase")]])


@app.on_message(Filters.command(["start"]) & Filters.private)
def send_welcome(client, message):
    tg_analytic.statistics(message.chat.id, "start")
    app.send_message(message.chat.id, f"Hi! Get LIKEs in groups and spend on anything.\n\nFor group owner: Add @MinterLikeBot to your group to get 10% of each transaction.", reply_markup=home_markup)


def delete_message(chatid, message_id, timeout=sleeping_time):
    global sleeping_time
    time.sleep(timeout)
    app.delete_messages(chatid, message_id)