Exemple #1
0
 def get():
     '''Count all users from database'''
     key = request.args.get('api_key')
     if not key:
         abort(HTTPStatus.UNAUTHORIZED, "Unauthorized")
         return
     user_id = sql.verify_key(key)
     isowner = user_id is OWNER_ID
     iscowoner = user_id is CO_OWNER_ID
     isudo = user_id in SUDO_USERS
     isadmin = isowner or iscowoner or isudo
     if not isadmin:
         abort(HTTPStatus.FORBIDDEN, "User is not bot admin.")
     else:
         data = {'number': num_users()}
         return data, HTTPStatus.OK
Exemple #2
0
def __stats__():
    return "{} users, across {} chats".format(sql.num_users(), sql.num_chats())
Exemple #3
0
def __stats__():
    return "{} المستخدمين، عبر {} دردشات".format(sql.num_users(),
                                                 sql.num_chats())
Exemple #4
0
def __stats__():
    return "{} Sohbette, {} Kullanıcı Bulunuyor.".format(
        sql.num_chats(), sql.num_users())
Exemple #5
0
def __stats__():
    return "{} ədəd istifadəçi, ümumi {} ədəd qrupda".format(sql.num_users(), sql.num_chats())
def __stats__():
    return "{} futrzaków sposród {} czatów.".format(sql.num_users(),
                                                    sql.num_chats())
Exemple #7
0
def __stats__():
    return "{} kullanıcları {} sohbetinde".format(sql.num_users(),
                                                  sql.num_chats())
Exemple #8
0
def __stats__():
    return "{} utenti, in {} chats".format(sql.num_users(), sql.num_chats())