Compare commits
3
Commits
320d1bae79
...
06c2f8ffd0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
06c2f8ffd0 | ||
|
|
016135cf8b | ||
|
|
136124c0ae |
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
config.py
|
config.py
|
||||||
.venv
|
.venv
|
||||||
.history
|
.history
|
||||||
src/ragnar/__pycache__
|
__pycache__/
|
||||||
.build-trigger-2024-12-02 14:26
|
.build-trigger-2024-12-02 14:26
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
|
ENV=./.venv/bin/activate
|
||||||
|
|
||||||
all: ensure_env format build install test
|
all: ensure_env format build install test
|
||||||
|
|
||||||
format:
|
format:
|
||||||
./.venv/bin/python -m pip install black
|
./.venv/bin/python -m pip install shed
|
||||||
./.venv/bin/python -m black .
|
. $(ENV) && python -m shed
|
||||||
|
|
||||||
ensure_env:
|
ensure_env:
|
||||||
-@python3 -m venv .venv
|
-@python3 -m venv .venv
|
||||||
|
|||||||
Vendored
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
+9
-2
@@ -16,14 +16,15 @@ class Bot:
|
|||||||
self.name = self.username.split("@")[0]
|
self.name = self.username.split("@")[0]
|
||||||
self.rant_history = []
|
self.rant_history = []
|
||||||
self.amount_of_rants_to_check = 15
|
self.amount_of_rants_to_check = 15
|
||||||
names = {
|
self.sus_users = ["Buffon"]
|
||||||
|
self.names = {
|
||||||
"no-spam": "Anna",
|
"no-spam": "Anna",
|
||||||
"no-spam1": "Ira",
|
"no-spam1": "Ira",
|
||||||
"no-spam2": "Katya",
|
"no-spam2": "Katya",
|
||||||
"no-spam3": "Nastya",
|
"no-spam3": "Nastya",
|
||||||
"no-spam4": "Vira",
|
"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.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.auth = None
|
||||||
self.triggers = [
|
self.triggers = [
|
||||||
@@ -48,6 +49,10 @@ class Bot:
|
|||||||
"quality",
|
"quality",
|
||||||
"unqiue",
|
"unqiue",
|
||||||
"@ragnar",
|
"@ragnar",
|
||||||
|
"brides",
|
||||||
|
"singles",
|
||||||
|
"course",
|
||||||
|
"dating",
|
||||||
]
|
]
|
||||||
self.api = Api(username=self.username, password=self.password)
|
self.api = Api(username=self.username, password=self.password)
|
||||||
|
|
||||||
@@ -97,6 +102,8 @@ class Bot:
|
|||||||
|
|
||||||
@method_cache
|
@method_cache
|
||||||
def is_user_sus(self, username):
|
def is_user_sus(self, username):
|
||||||
|
if username in self.sus_users:
|
||||||
|
return True
|
||||||
user_id = self.api.get_user_id(username)
|
user_id = self.api.get_user_id(username)
|
||||||
profile = self.api.get_profile(user_id)
|
profile = self.api.get_profile(user_id)
|
||||||
score = profile["score"]
|
score = profile["score"]
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user