mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-05 17:02:32 -05:00
Add support for set api Modals (#5637)
* Add support for set api Modals Co-authored-by: TrustyJAID <TrustyJAID@gmail.com> * Blaacckkkk! * Swap locations of interaction and button. * Clarified template tokens * Update docs and some string * More docs * Rework the client Co-authored-by: TrustyJAID <TrustyJAID@gmail.com> * Goddamned black! * Missed a few arguments * Black... Again * Update redbot/core/utils/views.py Co-authored-by: TrustyJAID <TrustyJAID@gmail.com> * Update redbot/core/core_commands.py Co-authored-by: TrustyJAID <TrustyJAID@gmail.com> Co-authored-by: TrustyJAID <TrustyJAID@gmail.com>
This commit is contained in:
@@ -254,13 +254,13 @@ else:
|
||||
args = self.pattern.split(argument)
|
||||
|
||||
if len(args) % 2 != 0:
|
||||
raise BadArgument()
|
||||
raise BadArgument(_("Missing a key or value."))
|
||||
|
||||
iterator = iter(args)
|
||||
|
||||
for key in iterator:
|
||||
if self.expected_keys and key not in self.expected_keys:
|
||||
raise BadArgument(_("Unexpected key {key}").format(key=key))
|
||||
raise BadArgument(_("Unexpected key `{key}`.").format(key=key))
|
||||
|
||||
ret[key] = next(iterator)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user