Skip to content

Commit

Permalink
backdoor plus logs
Browse files Browse the repository at this point in the history
  • Loading branch information
C-Pro committed Sep 8, 2024
1 parent 1c2fd95 commit 165f881
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion bot/skills/towel_mode.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,15 @@ def delete_user(self, user_id: str):
return self._coll.delete_one({"_id": user_id})

def delete_all_users(self):
return self._coll.delete_many({})
return self._coll.delete_many({}) - name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pipenv==2022.9.24
pipenv install --system --dev
- name: Lint
run: make lint
- name: Test with pytest
run: export PYTHONPATH=./bot && pytest


db = DB("towel_mode")
Expand Down Expand Up @@ -198,6 +206,11 @@ def catch_reply(update: Update, context: CallbackContext):

def is_worthy(text: str) -> bool:
"""check if reply is a valid bio as requested"""

## backdoor for testing
if text.lower().find("i love vldc") != -1:
return True

if len(text) < 15:
return False

Expand All @@ -220,6 +233,8 @@ def is_worthy(text: str) -> bool:
presence_penalty=0.6,
)

logger.info("text: %q is %s", text, response.choices[0].message.content)

return response.choices[0].message.content == "worthy"


Expand Down

0 comments on commit 165f881

Please sign in to comment.