Skip to content

Commit c16c998

Browse files
committed
Move interaction models into wumpy.models
1 parent cc9c47f commit c16c998

File tree

15 files changed

+272
-343
lines changed

15 files changed

+272
-343
lines changed

library/wumpy-interactions/wumpy/interactions/app.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
from typing import Any, Awaitable, Callable, Dict, List, Optional, Tuple
33

44
import anyio
5+
from wumpy.models import (
6+
CommandInteraction, ComponentInteraction, InteractionType
7+
)
58
from wumpy.rest import ApplicationCommandRequester, InteractionRequester
69

7-
from .base import CommandInteraction, ComponentInteraction, InteractionType
810
from .commands import CommandRegistrar, SlashCommand
911
from .components.handler import ComponentHandler
1012
from .utils import DiscordRequestVerifier

library/wumpy-interactions/wumpy/interactions/base.py

Lines changed: 0 additions & 323 deletions
This file was deleted.

library/wumpy-interactions/wumpy/interactions/commands/base.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44

55
import anyio.abc
66
from typing_extensions import ParamSpec
7-
8-
from ..base import CommandInteraction
7+
from wumpy.models import CommandInteraction
98

109
__all__ = ('Callback', 'CommandCallback')
1110

library/wumpy-interactions/wumpy/interactions/commands/context.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@
44

55
import anyio.abc
66
from typing_extensions import ParamSpec
7-
from wumpy.models import InteractionMember, Message, User
7+
from wumpy.models import CommandInteraction, InteractionMember, Message, User
88

9-
from ..base import CommandInteraction
109
from ..errors import CommandSetupError
1110
from .base import Callback, CommandCallback
1211
from .option import CommandType

library/wumpy-interactions/wumpy/interactions/commands/option.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
)
66

77
from typing_extensions import Annotated, Literal, get_args, get_origin
8-
from wumpy.models import InteractionChannel, InteractionMember, User
9-
10-
from ..base import (
11-
ApplicationCommandOption, CommandInteraction, CommandInteractionOption
8+
from wumpy.models import (
9+
ApplicationCommandOption, CommandInteraction, CommandInteractionOption,
10+
InteractionChannel, InteractionMember, User
1211
)
12+
1313
from ..errors import CommandSetupError
1414

1515
__all__ = ('CommandType', 'OptionClass')

library/wumpy-interactions/wumpy/interactions/commands/registrar.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
import anyio.abc
44
from typing_extensions import Literal, ParamSpec
5+
from wumpy.models import CommandInteraction
56

6-
from ..base import CommandInteraction
77
from .base import Callback
88
from .context import MessageCommand, UserCommand
99
from .option import CommandType

library/wumpy-interactions/wumpy/interactions/commands/slash.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66

77
import anyio.abc
88
from typing_extensions import ParamSpec
9-
10-
from ..base import (
9+
from wumpy.models import (
1110
ApplicationCommandOption, CommandInteraction, CommandInteractionOption
1211
)
12+
1313
from ..errors import CommandSetupError
1414
from ..utils import _eval_annotations
1515
from .base import Callback, CommandCallback

0 commit comments

Comments
 (0)