feat(interactions): add ApplicationCommandTypes enum

This commit is contained in:
grey-cat-1908 2022-06-05 21:01:53 +03:00
parent 2185d0577f
commit 7830dd6165
4 changed files with 42 additions and 1 deletions

View file

@ -622,6 +622,7 @@ class Guild(APIModelBase):
await self._client.rest.remove_guild_ban(self.id, user_id, reason=reason)
@dataclass(repr=False)
class UnavailableGuild(APIModelBase):
"""A partial guild object.

View file

@ -316,5 +316,9 @@ class GuildMember(APIModelBase):
return self.user.avatar_url()
return self._client.rest.cdn.guild_member_avatar_url(
self.guild_id, self.user.id, self.guild_avatar, size=size, image_format=image_format
self.guild_id,
self.user.id,
self.guild_avatar,
size=size,
image_format=image_format,
)

View file

@ -0,0 +1,9 @@
# Copyright MelisaDev 2022 - Present
# Full MIT License can be found in `LICENSE.txt` at the project root.
from .commands import ApplicationCommandTypes
__all__ = (
"ApplicationCommandTypes"
)

View file

@ -0,0 +1,27 @@
# Copyright MelisaDev 2022 - Present
# Full MIT License can be found in `LICENSE.txt` at the project root.
from __future__ import annotations
from enum import IntEnum
class ApplicationCommandTypes(IntEnum):
"""Application Command Types
Attributes
----------
CHAT_INPUT:
Slash commands; a text-based command that shows up when a user types /
USER:
A UI-based command that shows up when you right click or tap on a user
MESSAGE:
A UI-based command that shows up when you right click or tap on a message
"""
CHAT_INPUT = 1
USER = 2
MESSAGE = 3
def __int__(self):
return self.value