[CustomCom] add Query typehint for URI-based CCs (#3228)

* [cc] add Query typehint for URI query ccs

* Create 3228.enhance.rst
This commit is contained in:
zephyrkul 2019-12-27 09:43:25 -07:00 committed by Michael H
parent ef99174585
commit 60a1b3294d
2 changed files with 3 additions and 0 deletions

View File

@ -0,0 +1 @@
Add query option for CC typehints, for URL-based CCs.

View File

@ -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)