Beispiel #1
0
async def local_notes(_, m: Message):
    getnotes = db.get_all_notes(m.chat.id)
    if not getnotes:
        await m.reply_text(f"There are no notes in <b>{m.chat.title}</b>.")
        return
    rply = f"**Notes in <b>{m.chat.title}</b>:**\n"
    for x in getnotes:
        if len(rply) >= 1800:
            await m.reply(rply)
            rply = f"**Notes in <b>{m.chat.title}</b>:**\n"
        rply += f"- `{x}`\n"

    await m.reply_text(rply)
    return
Beispiel #2
0
async def clear_allnote(_, m: Message):

    all_notes = db.get_all_notes(m.chat.id)
    if not all_notes:
        await m.reply_text("No notes are there in this chat")
        return

    await m.reply_text(
        "Are you sure you want to clear all notes?",
        reply_markup=InlineKeyboardMarkup([
            [
                InlineKeyboardButton("⚠️ Confirm",
                                     callback_data="clear.notes"),
                InlineKeyboardButton("❌ Cancel", callback_data="close"),
            ],
        ], ),
    )
    return