From 32913523c0e34a91b621f6304ae95f8ba0728e14 Mon Sep 17 00:00:00 2001 From: Amrou Bellalouna Date: Fri, 16 Sep 2022 17:42:10 +0100 Subject: replace .isdigit predicate with a try except block --- bot/exts/info/information.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bot/exts/info/information.py b/bot/exts/info/information.py index 27a7b501d..b66c68f87 100644 --- a/bot/exts/info/information.py +++ b/bot/exts/info/information.py @@ -529,9 +529,9 @@ class Information(Cog): keywords, rules = [], [] for word in args: - if word.isdigit(): + try: rules.append(int(word)) - else: + except ValueError: keywords.append(word.lower()) if not rules and not keywords: -- cgit v1.2.3