None
This commit is contained in:
parent
b4e2c94bd4
commit
8af81b178c
@ -2,3 +2,6 @@ TOKEN = "1749418611:AAGOV2XB5mkMXqX-J_wtNu7KkrkhO_Xylmg"
|
|||||||
|
|
||||||
# 频率限制次数,每个群每小时内,只能主动触发10次任务
|
# 频率限制次数,每个群每小时内,只能主动触发10次任务
|
||||||
LIMIT_COUNT = 10
|
LIMIT_COUNT = 10
|
||||||
|
|
||||||
|
# 私有模式,仅授权群组可用 0:关闭 1:打开
|
||||||
|
EXCLUSIVE_MODE = 0
|
||||||
|
8
func.py
8
func.py
@ -3,7 +3,7 @@ import time
|
|||||||
import connector
|
import connector
|
||||||
import telegram
|
import telegram
|
||||||
from telegram.ext import CommandHandler, MessageHandler, Filters
|
from telegram.ext import CommandHandler, MessageHandler, Filters
|
||||||
from config import TOKEN, LIMIT_COUNT
|
from config import TOKEN, LIMIT_COUNT, EXCLUSIVE_MODE
|
||||||
import schedule
|
import schedule
|
||||||
from task import add_task
|
from task import add_task
|
||||||
|
|
||||||
@ -77,9 +77,9 @@ def chat_content_exec(update, context):
|
|||||||
# 限制文字长度不能超过80字
|
# 限制文字长度不能超过80字
|
||||||
if len(text) > 80:
|
if len(text) > 80:
|
||||||
return
|
return
|
||||||
# 取消注释开启独享模式(仅授权群组可用)
|
# 独享模式(仅授权群组可用)
|
||||||
# if chat_id not in ["1231242141"]:
|
if chat_id not in ["1231242141"] and EXCLUSIVE_MODE == 1:
|
||||||
# return
|
return
|
||||||
try:
|
try:
|
||||||
username = update.effective_user.username
|
username = update.effective_user.username
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
Loading…
Reference in New Issue
Block a user