Explorar el Código

Removed more follower points remnants

deadtom hace 2 semanas
padre
commit
5f16ff0071
Se han modificado 2 ficheros con 1 adiciones y 17 borrados
  1. 1 2
      ownchatbot/reward_handlers.py
  2. 0 15
      ownchatbot/user_handlers.py

+ 1 - 2
ownchatbot/reward_handlers.py

@@ -322,8 +322,7 @@ POINTS_AWARD = {config_dict['POINTS_AWARD']}  # How many points awarded each int
 GUNICORN = {config_dict['GUNICORN']}  # Integrate OwnchatBot logging into Gunicorn\n\
 PREFIX = '{config_dict['PREFIX']}'  # Preceeds commands, so OwnchatBot knows what is a command\n\
 KOFI_TOKEN = '{config_dict['KOFI_TOKEN']}'  # Needed to validate Ko-fi with OCB webhook. Get from Ko-fi Settings -> More -> API -> Webhooks -> Advanced - Verification Token.\n\
-KOFI_INTEGRATION = {config_dict['KOFI_INTEGRATION']}  # Integrate OwnchatBot with Ko-fi\n\
-FOLLOW_POINTS = {config_dict['FOLLOW_POINTS']}  # How many points to award viewers for following"
+KOFI_INTEGRATION = {config_dict['KOFI_INTEGRATION']}  # Integrate OwnchatBot with Ko-fi"
 
     try:
         with open(settings_file, 'w') as f:

+ 0 - 15
ownchatbot/user_handlers.py

@@ -266,18 +266,3 @@ def remove_duplicates(db, user_id, username):  # Remove duplicate usernames
         db.commit()
     except Error as rderror:
         current_app.logger.error(f'Couldn\'t remove duplicate username {username} for {user_id}: {rderror.args[0]}')
-
-
-def mark_followed(db, user_id):  # Mark a user as a follower by entering the date in the followed column
-    try:
-        follow_date = time.localtime()
-        follow_date = time.strftime("%m/%d/%Y", follow_date)
-        db.execute(
-            "UPDATE points SET followed = ? WHERE id = ?",
-            (follow_date, user_id)
-        )
-        db.commit()
-        return True
-    except Error as mferror:
-        current_app.logger.error(f'Couldn\'t mark {user_id} as followed in the points database: {mferror.args[0]}')
-        return False