Example #1
0
async def _(svd):
    if svd.fwd_from:
        return
    notes = get_notes(svd.chat_id)
    message = "```There are no saved notes in this chat.```"
    if notes:
        message = "**Notes saved in this chat:** \n\n"
        for note in notes:
            message = message + "🔸 " + note.keyword + "\n"
    await svd.edit(message)
Example #2
0
async def _(getnt):
    if getnt.fwd_from:
        return
    notename = getnt.pattern_match.group(1)
    notes = get_notes(getnt.chat_id)
    for note in notes:
        if notename == note.keyword:
            await getnt.reply(note.reply)
            await getnt.delete()
        else:
            await getnt.edit(f"**Note** ```{notename}``` **not found!**")
Example #3
0
async def _(clr):
    if clr.fwd_from:
        return
    notes = get_notes(clr.chat_id)
    notelist = ""
    for note in notes:
        notelist = note.keyword
    notename = clr.pattern_match.group(1)
    status = f"**Note {notename} not found.**"
    if notename in notelist:
        rm_note(clr.chat_id, notename)
        status = f"**Note** ```{notename}``` **cleared successfully**"
    await clr.edit(status)