Exemplo n.º 1
0
async def clear_all_notes(c: TelePyroBot, m: Message):
    getnotes = db.get_all_notes(m.from_user.id)
    if not getnotes:
        await m.edit_text("`There are no notes!`")
        return
    for x in getnotes:
        rmnote = db.rm_note(m.from_user.id, x)
    await m.edit_text("`Cleared All Notes`")
    return
Exemplo n.º 2
0
async def clear_note(c: TelePyroBot, m: Message):
    if len(m.text.split()) <= 1:
        await m.edit_text(
            f"**What do you want to clear?**\n**Use** `{COMMAND_HAND_LER}help notes` **to check how to use!**"
        )
        return

    note = m.text.split()[1]
    getnote = db.rm_note(m.from_user.id, note)
    if not getnote:
        await m.edit_text("`This note does not exist!`")
        return

    await m.edit_text(f"**Deleted note** `{note}`!")