fix: align salvaged Discord send test mock with current slash-command API
This commit is contained in:
parent
8ce66a01ee
commit
a05a4afa53
1 changed files with 5 additions and 1 deletions
|
|
@ -23,7 +23,11 @@ def _ensure_discord_mock():
|
||||||
discord_mod.Color = SimpleNamespace(orange=lambda: 1, green=lambda: 2, blue=lambda: 3, red=lambda: 4)
|
discord_mod.Color = SimpleNamespace(orange=lambda: 1, green=lambda: 2, blue=lambda: 3, red=lambda: 4)
|
||||||
discord_mod.Interaction = object
|
discord_mod.Interaction = object
|
||||||
discord_mod.Embed = MagicMock
|
discord_mod.Embed = MagicMock
|
||||||
discord_mod.app_commands = SimpleNamespace(describe=lambda **kwargs: (lambda fn: fn))
|
discord_mod.app_commands = SimpleNamespace(
|
||||||
|
describe=lambda **kwargs: (lambda fn: fn),
|
||||||
|
choices=lambda **kwargs: (lambda fn: fn),
|
||||||
|
Choice=lambda **kwargs: SimpleNamespace(**kwargs),
|
||||||
|
)
|
||||||
|
|
||||||
ext_mod = MagicMock()
|
ext_mod = MagicMock()
|
||||||
commands_mod = MagicMock()
|
commands_mod = MagicMock()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue