Example #1
0
async def stats(_client, message):
    text = "**Here is your current stats**\n"
    if DB_AVAILABLE:
        text += "<b>Notes:</b> `{} notes`\n".format(
            len(get_all_selfnotes(message.from_user.id)))
        text += "<b>Group joined:</b> `{} groups`\n".format(
            len(get_all_chats()))
    text += "<b>Message received:</b> `{} messages`\n".format(get_msgc())
    uptime = get_readable_time((time.time() - StartTime))
    text += ("<b>Nana uptime:</b> <code>{}</code>".format(uptime))
    await message.reply_text(text, quote=True)
Example #2
0
async def stats(_client, message):
    text = ""
    if DB_AVAILABLE:
        text += "<b>Notes:</b> `{} notes`\n".format(len(get_all_selfnotes(message.from_user.id)))
        text += "<b>Group joined:</b> `{} groups`\n".format(len(get_all_chats()))
    text += "<b>Message received:</b> `{} messages`\n".format(get_msgc())

    uptime = get_readable_time((time.time() - StartTime))
    text += ("<b>Nana uptime:</b> <code>{}</code>".format(uptime))
    img = await get_theme("Nana-Official", "stats")
    await setbot.send_photo(Owner, img, caption=text)
Example #3
0
async def local_notes(client, message):
	getnotes = db.get_all_selfnotes(message.from_user.id)
	if not getnotes:
		await message.edit("There are no notes in local notes!")
		return
	rply = "**Local notes:**\n"
	for x in getnotes:
		if len(rply) >= 1800:
			await message.reply(rply)
			rply = "**Local notes:**\n"
		rply += "- `{}`\n".format(x)

	await message.edit(rply)
Example #4
0
async def stats(_client, message):
    text = "**Here is your current stats**\n"
    if DB_AVAILABLE:
        text += "<b>Notes:</b> `{} notes`\n".format(
            len(get_all_selfnotes(message.from_user.id)))
        text += "<b>Group joined:</b> `{} groups`\n".format(
            len(get_all_chats()))
    stk = await app.send(functions.messages.GetAllStickers(hash=0))
    all_sets = stk.sets
    count = sum(x.count for x in all_sets)
    text += f"<b>Stickers Count:</b> <code>{count} across {len(all_sets)} sets</code>\n"
    text += "<b>Message received:</b> `{} messages`\n".format(get_msgc())
    uptime = get_readable_time((time.time() - BOT_RUNTIME))
    text += ("<b>Nana uptime:</b> <code>{}</code>".format(uptime))
    await message.reply_text(text, quote=True)
Example #5
0
async def local_notes(_, message):
    if not DB_AVAILABLE:
        await message.edit("Your database is not avaiable!")
        return
    getnotes = db.get_all_selfnotes(message.from_user.id)
    if not getnotes:
        await message.edit("There are no notes in local notes!")
        return
    rply = "**Local notes:**\n"
    for x in getnotes:
        if len(rply) >= 1800:
            await edit_or_reply(message, text=rply)
            rply = "**Local notes:**\n"
        rply += f"- `{x}`\n"

    await message.edit(rply)
Example #6
0
async def local_notes(_client, message):
    if not DB_AVAILABLE:
        await message.edit("Your database is not avaiable!")
        return
    getnotes = db.get_all_selfnotes(message.from_user.id)
    if not getnotes:
        await message.edit("There are no notes in local notes!")
        return
    rply = "**Local notes:**\n"
    for x in getnotes:
        if len(rply) >= 1800:
            await message.reply(rply)
            rply = "**Local notes:**\n"
        rply += "- `{}`\n".format(x)

    await message.edit(rply)