From 4879a7713daea8216b6dab13ac8a4c5bbcf9fc1e Mon Sep 17 00:00:00 2001 From: c3b2a <62082214+c3b2a@users.noreply.github.com> Date: Mon, 5 Apr 2021 11:40:30 +0800 Subject: [PATCH] =?UTF-8?q?keyword=20=E5=87=BD=E6=95=B0=20ranstr=20?= =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- keyword_func/ranstr.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/keyword_func/ranstr.py b/keyword_func/ranstr.py index 23c80b4..8be16ad 100644 --- a/keyword_func/ranstr.py +++ b/keyword_func/ranstr.py @@ -1,11 +1,7 @@ import random import string -async def main(context): - try: - length = int(context.text.split()[1]) - except: - length = 8 +async def main(context, length): if length > 1000: length = 100 s = ""