async def stats(client, message): try: me = await app.get_me() except ConnectionError: me = None text = "**Here is your current stats**\n" text += "Notes: `0 notes`\n" text += "Group joined: `{} groups`\n".format(len(get_all_chats())) text += "Message received: `{} messages`\n".format(get_msgc()) a = await get_runtime() b = int(time.time()) c = b - a month = c // 2678400 days = c // 86400 hours = c // 3600 % 24 minutes = c // 60 % 60 seconds = c % 60 alivetext = "" if month: alivetext += "{} month, ".format(month) if days: alivetext += "{} days, ".format(days) if hours: alivetext += "{} hours, ".format(hours) if minutes: alivetext += "{} minutes, ".format(minutes) if seconds: alivetext += "{} seconds".format(seconds) text += "\nBot was alive for `{}`".format(alivetext) await message.reply(text)
async def stats(_client, message): text = "**Here is your current stats**\n" text += "Notes: `0 notes`\n" if DB_AVAILABLE: text += "Group joined: `{} groups`\n".format(len(get_all_chats())) text += "Message received: `{} 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)
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)
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)