mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 03:08:55 -05:00
[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:
parent
ef99174585
commit
60a1b3294d
1
changelog.d/customcom/3228.enhance.rst
Normal file
1
changelog.d/customcom/3228.enhance.rst
Normal file
@ -0,0 +1 @@
|
||||
Add query option for CC typehints, for URL-based CCs.
|
||||
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user