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:
Kowlin
2022-05-20 21:58:18 +02:00
committed by GitHub
parent ec55622418
commit acdc1df084
4 changed files with 208 additions and 7 deletions

View File

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