[+] touch: Create request
This commit is contained in:
@@ -2,6 +2,7 @@ import re
|
|||||||
|
|
||||||
from src.bot import database
|
from src.bot import database
|
||||||
from src.utils import toJson
|
from src.utils import toJson
|
||||||
|
from src.request_configuration import RequestConfiguration
|
||||||
|
|
||||||
helpMsg = """
|
helpMsg = """
|
||||||
Welcome! This bot monitors http changes!
|
Welcome! This bot monitors http changes!
|
||||||
@@ -68,6 +69,10 @@ def touch(update, context):
|
|||||||
if re.match(urlValidator, url) is None:
|
if re.match(urlValidator, url) is None:
|
||||||
return "%s 格式检查不通过w" % url
|
return "%s 格式检查不通过w" % url
|
||||||
|
|
||||||
|
# Create
|
||||||
|
database.userRequests[user][name] = RequestConfiguration(url)
|
||||||
|
|
||||||
|
|
||||||
def rm(update, context):
|
def rm(update, context):
|
||||||
chat = update.effective_chat
|
chat = update.effective_chat
|
||||||
user = database.checkUser(chat.id)
|
user = database.checkUser(chat.id)
|
||||||
|
|||||||
Reference in New Issue
Block a user