Skip to content

Commit

Permalink
Move interaction models into wumpy.models
Browse files Browse the repository at this point in the history
  • Loading branch information
Bluenix2 committed Mar 9, 2022
1 parent cc9c47f commit c16c998
Show file tree
Hide file tree
Showing 15 changed files with 272 additions and 343 deletions.
4 changes: 3 additions & 1 deletion library/wumpy-interactions/wumpy/interactions/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
from typing import Any, Awaitable, Callable, Dict, List, Optional, Tuple

import anyio
from wumpy.models import (
CommandInteraction, ComponentInteraction, InteractionType
)
from wumpy.rest import ApplicationCommandRequester, InteractionRequester

from .base import CommandInteraction, ComponentInteraction, InteractionType
from .commands import CommandRegistrar, SlashCommand
from .components.handler import ComponentHandler
from .utils import DiscordRequestVerifier
Expand Down
323 changes: 0 additions & 323 deletions library/wumpy-interactions/wumpy/interactions/base.py

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@

import anyio.abc
from typing_extensions import ParamSpec

from ..base import CommandInteraction
from wumpy.models import CommandInteraction

__all__ = ('Callback', 'CommandCallback')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@

import anyio.abc
from typing_extensions import ParamSpec
from wumpy.models import InteractionMember, Message, User
from wumpy.models import CommandInteraction, InteractionMember, Message, User

from ..base import CommandInteraction
from ..errors import CommandSetupError
from .base import Callback, CommandCallback
from .option import CommandType
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
)

from typing_extensions import Annotated, Literal, get_args, get_origin
from wumpy.models import InteractionChannel, InteractionMember, User

from ..base import (
ApplicationCommandOption, CommandInteraction, CommandInteractionOption
from wumpy.models import (
ApplicationCommandOption, CommandInteraction, CommandInteractionOption,
InteractionChannel, InteractionMember, User
)

from ..errors import CommandSetupError

__all__ = ('CommandType', 'OptionClass')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import anyio.abc
from typing_extensions import Literal, ParamSpec
from wumpy.models import CommandInteraction

from ..base import CommandInteraction
from .base import Callback
from .context import MessageCommand, UserCommand
from .option import CommandType
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@

import anyio.abc
from typing_extensions import ParamSpec

from ..base import (
from wumpy.models import (
ApplicationCommandOption, CommandInteraction, CommandInteractionOption
)

from ..errors import CommandSetupError
from ..utils import _eval_annotations
from .base import Callback, CommandCallback
Expand Down
Loading

0 comments on commit c16c998

Please sign in to comment.