Пример #1
0
async def purge_notes(prg):
    try:
        from userbot.modules.sql_helper.notes_sql import rm_all_notes
    except:
        await prg.edit("`Running on Non-SQL mode!`")
        return
    if not prg.text[0].isalpha():
        await prg.edit("```Purging all notes.```")
        rm_all_notes(str(prg.chat_id))
        if LOGGER:
            await bot.send_message(
                LOGGER_GROUP, "I cleaned all notes at " + str(prg.chat_id))
Пример #2
0
async def purge_notes(prg):
    """ For .rmnotes command, remove every note in the chat at once. """
    if not prg.text[0].isalpha() and prg.text[0] not in ("/", "#", "@", "!"):
        try:
            from userbot.modules.sql_helper.notes_sql import rm_all_notes
        except AttributeError:
            await prg.edit("`Running on Non-SQL mode!`")
            return
        if not prg.text[0].isalpha():
            await prg.edit("```Purging all notes.```")
            rm_all_notes(str(prg.chat_id))
            if LOGGER:
                await prg.client.send_message(
                    LOGGER_GROUP, "I cleaned all notes at " + str(prg.chat_id))