nsfw filters

This commit is contained in:
Klemek
2021-05-18 18:13:37 +02:00
parent a01414dce7
commit b2858cca95
4 changed files with 42 additions and 4 deletions
+8
View File
@@ -1,3 +1,4 @@
from enum import Enum
from typing import Callable, List, Dict, Union, Optional, Any
import os
import logging
@@ -17,6 +18,7 @@ COMMON_HELP_ARGS = [
"<date2> - filter before <date2>",
"fast - only read cache",
"fresh - does not read cache (long)",
"nsfw:allow/only - allow messages from nsfw channels",
"mobile/mention - mentions users (fix @invalid-user bug)",
]
@@ -49,6 +51,12 @@ def deltas(t0: datetime):
return (datetime.now() - t0).total_seconds()
class FilterLevel(Enum):
NONE = 0
ALLOW = 1
ONLY = 2
# DISCORD API