From 7864c3c17b1a80c50d3b1fd7963ec86e715b6bdf Mon Sep 17 00:00:00 2001 From: Hykilpikonna Date: Sun, 22 Nov 2020 13:55:00 -0500 Subject: [PATCH] [+] touch: Validate name does not exist in the database --- src/commands.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/commands.py b/src/commands.py index 2bddbca..943b6db 100644 --- a/src/commands.py +++ b/src/commands.py @@ -50,6 +50,9 @@ def touch(update, context): if not name.isalnum(): return "只能有数字或者字母哦w" + if name in database.userRequests[user]: + return "%s 已经存在w" % name + def rm(update, context): chat = update.effective_chat