diff --git a/Makefile b/Makefile index 92a8228..ee84442 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,10 @@ +ENV=./.venv/bin/activate + all: ensure_env format build install test format: - ./.venv/bin/python -m pip install black - ./.venv/bin/python -m black . + ./.venv/bin/python -m pip install shed + . $(ENV) && python -m shed ensure_env: -@python3 -m venv .venv @@ -18,4 +20,4 @@ run: python -m ragnar.run test: - ./.venv/bin/python -m unittest ragnar.tests \ No newline at end of file + ./.venv/bin/python -m unittest ragnar.tests diff --git a/dist/Ragnar-1.3.37-py3-none-any.whl b/dist/Ragnar-1.3.37-py3-none-any.whl index e865cd7..86c0e9c 100644 Binary files a/dist/Ragnar-1.3.37-py3-none-any.whl and b/dist/Ragnar-1.3.37-py3-none-any.whl differ diff --git a/dist/ragnar-1.3.37.tar.gz b/dist/ragnar-1.3.37.tar.gz index cf45f3d..af2ed4d 100644 Binary files a/dist/ragnar-1.3.37.tar.gz and b/dist/ragnar-1.3.37.tar.gz differ diff --git a/src/ragnar/bot.py b/src/ragnar/bot.py index 5da9753..434c15b 100644 --- a/src/ragnar/bot.py +++ b/src/ragnar/bot.py @@ -16,14 +16,15 @@ class Bot: self.name = self.username.split("@")[0] self.rant_history = [] self.amount_of_rants_to_check = 15 - names = { + self.sus_users = ["Buffon"] + self.names = { "no-spam": "Anna", "no-spam1": "Ira", "no-spam2": "Katya", "no-spam3": "Nastya", "no-spam4": "Vira", } - self.name = names.get(self.name, "everyone") + self.name = self.names.get(self.name, "everyone") self.mark_text = f"I am {self.name} and downvoted this post because post is considered spam. Your message will be removed from this community site due too much downvotes. See my profile for more information. Read my source code mentioned on my profile to see what you did wrong. Should be no problem for a developer.\n\nHave a nice day!\n\n\nIf the post is not spam, please mention @retoor in the comments of this rant." self.auth = None self.triggers = [ @@ -48,6 +49,10 @@ class Bot: "quality", "unqiue", "@ragnar", + "brides", + "singles", + "course", + "dating", ] self.api = Api(username=self.username, password=self.password) @@ -97,6 +102,8 @@ class Bot: @method_cache def is_user_sus(self, username): + if username in self.sus_users: + return True user_id = self.api.get_user_id(username) profile = self.api.get_profile(user_id) score = profile["score"]