Compare commits
No commits in common. "06c2f8ffd0e09f24d0ddd6c2c4710ee12732abb6" and "320d1bae7998d3b34257f5106ef78cd6a1e26b21" have entirely different histories.
06c2f8ffd0
...
320d1bae79
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,5 +1,5 @@
|
||||
config.py
|
||||
.venv
|
||||
.history
|
||||
__pycache__/
|
||||
src/ragnar/__pycache__
|
||||
.build-trigger-2024-12-02 14:26
|
||||
|
8
Makefile
8
Makefile
@ -1,10 +1,8 @@
|
||||
ENV=./.venv/bin/activate
|
||||
|
||||
all: ensure_env format build install test
|
||||
|
||||
format:
|
||||
./.venv/bin/python -m pip install shed
|
||||
. $(ENV) && python -m shed
|
||||
./.venv/bin/python -m pip install black
|
||||
./.venv/bin/python -m black .
|
||||
|
||||
ensure_env:
|
||||
-@python3 -m venv .venv
|
||||
@ -20,4 +18,4 @@ run:
|
||||
python -m ragnar.run
|
||||
|
||||
test:
|
||||
./.venv/bin/python -m unittest ragnar.tests
|
||||
./.venv/bin/python -m unittest ragnar.tests
|
BIN
dist/Ragnar-1.3.37-py3-none-any.whl
vendored
BIN
dist/Ragnar-1.3.37-py3-none-any.whl
vendored
Binary file not shown.
BIN
dist/ragnar-1.3.37.tar.gz
vendored
BIN
dist/ragnar-1.3.37.tar.gz
vendored
Binary file not shown.
@ -16,15 +16,14 @@ class Bot:
|
||||
self.name = self.username.split("@")[0]
|
||||
self.rant_history = []
|
||||
self.amount_of_rants_to_check = 15
|
||||
self.sus_users = ["Buffon"]
|
||||
self.names = {
|
||||
names = {
|
||||
"no-spam": "Anna",
|
||||
"no-spam1": "Ira",
|
||||
"no-spam2": "Katya",
|
||||
"no-spam3": "Nastya",
|
||||
"no-spam4": "Vira",
|
||||
}
|
||||
self.name = self.names.get(self.name, "everyone")
|
||||
self.name = 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 = [
|
||||
@ -49,10 +48,6 @@ class Bot:
|
||||
"quality",
|
||||
"unqiue",
|
||||
"@ragnar",
|
||||
"brides",
|
||||
"singles",
|
||||
"course",
|
||||
"dating",
|
||||
]
|
||||
self.api = Api(username=self.username, password=self.password)
|
||||
|
||||
@ -102,8 +97,6 @@ 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"]
|
||||
|
BIN
src/ragnar/tests/__pycache__/__init__.cpython-310.pyc
Normal file
BIN
src/ragnar/tests/__pycache__/__init__.cpython-310.pyc
Normal file
Binary file not shown.
BIN
src/ragnar/tests/__pycache__/__init__.cpython-312.pyc
Normal file
BIN
src/ragnar/tests/__pycache__/__init__.cpython-312.pyc
Normal file
Binary file not shown.
BIN
src/ragnar/tests/__pycache__/bot.cpython-310.pyc
Normal file
BIN
src/ragnar/tests/__pycache__/bot.cpython-310.pyc
Normal file
Binary file not shown.
BIN
src/ragnar/tests/__pycache__/bot.cpython-312.pyc
Normal file
BIN
src/ragnar/tests/__pycache__/bot.cpython-312.pyc
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user