Spaces:
Running
Running
Update akn/manage/parameter.py
Browse files- akn/manage/parameter.py +1 -19
akn/manage/parameter.py
CHANGED
@@ -889,24 +889,6 @@ def keyboardback():
|
|
889 |
[[InlineKeyboardButton(text="Bᴀᴄᴋ", callback_data="back")]]
|
890 |
)
|
891 |
|
892 |
-
|
893 |
-
def get_expired_date(user_id):
|
894 |
-
user = collection.find_one({"user_id": user_id})
|
895 |
-
if user:
|
896 |
-
return user.get("expire_date")
|
897 |
-
else:
|
898 |
-
return None
|
899 |
-
|
900 |
-
def set_expired_date(user_id, expire_date):
|
901 |
-
add_expired = {"expire_date": expire_date}
|
902 |
-
return collection.update_one({"user_id": user_id}, {"$set": add_expired}, upsert=True)
|
903 |
-
|
904 |
-
def expired_date_remove(user_id):
|
905 |
-
remove_filter = {"expire_date": None}
|
906 |
-
already = collection.update_one({"user_id": user_id}, {"$unset": remove_filter})
|
907 |
-
return already
|
908 |
-
|
909 |
-
|
910 |
def get_expired_chatgpt(user_id):
|
911 |
user = collection.find_one({"user_id": user_id})
|
912 |
if user:
|
@@ -931,4 +913,4 @@ def get_balance(user_id):
|
|
931 |
return 0
|
932 |
|
933 |
def update_balance(user_id, new_balance):
|
934 |
-
collection.update_one({"user_id": user_id}, {"$set": {"balance": new_balance}}, upsert=True)
|
|
|
889 |
[[InlineKeyboardButton(text="Bᴀᴄᴋ", callback_data="back")]]
|
890 |
)
|
891 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
892 |
def get_expired_chatgpt(user_id):
|
893 |
user = collection.find_one({"user_id": user_id})
|
894 |
if user:
|
|
|
913 |
return 0
|
914 |
|
915 |
def update_balance(user_id, new_balance):
|
916 |
+
collection.update_one({"user_id": user_id}, {"$set": {"balance": new_balance}}, upsert=True)
|