diff --git a/changelog.d/customcom/3228.enhance.rst b/changelog.d/customcom/3228.enhance.rst new file mode 100644 index 000000000..5728754f9 --- /dev/null +++ b/changelog.d/customcom/3228.enhance.rst @@ -0,0 +1 @@ +Add query option for CC typehints, for URL-based CCs. diff --git a/redbot/cogs/customcom/customcom.py b/redbot/cogs/customcom/customcom.py index 3bfa88bba..b5cf2a7e6 100644 --- a/redbot/cogs/customcom/customcom.py +++ b/redbot/cogs/customcom/customcom.py @@ -4,6 +4,7 @@ from datetime import datetime, timedelta from inspect import Parameter from collections import OrderedDict from typing import Mapping, Tuple, Dict, Set +from urllib.parse import quote_plus import discord @@ -521,6 +522,7 @@ class CustomCommands(commands.Cog): "set": set, "str": str, "tuple": tuple, + "query": quote_plus, } indices = [int(a[0]) for a in args] low = min(indices)