Browse Source

删除 limit报警
把 bot 独立出来

罗俊辉 1 year ago
parent
commit
9f95738732
1 changed files with 7 additions and 4 deletions
  1. 7 4
      common/limit.py

+ 7 - 4
common/limit.py

@@ -31,7 +31,7 @@ class AuthorLimit(object):
     def __init__(self, mode, platform):
         self.mode = mode
         self.platform = platform
-        self.limit_tag_dict = {"352": "余海涛", "353": "罗情", "53": "范军", "51": "鲁涛"}
+        self.limit_tag_dict = {"352": "余海涛", "353": "罗情", "53": "范军", "51": "鲁涛", "131": False}
 
     def find_tag(self, uid):
         """
@@ -44,9 +44,12 @@ class AuthorLimit(object):
         tags = result[0]["tag"]
         if tags:
             tags = tags.split(",")
-            for tag in tags:
-                if self.limit_tag_dict.get(tag):
-                    return tag
+            if "131" in tags:
+                return None
+            else:
+                for tag in tags:
+                    if self.limit_tag_dict.get(tag):
+                        return tag
         return None
 
     def author_limitation(self, user_id):