mirror of
https://github.com/MelisaDev/melisa.git
synced 2024-11-11 19:07:28 +03:00
feat(interactions): add ApplicationCommandTypes enum
This commit is contained in:
parent
2185d0577f
commit
7830dd6165
4 changed files with 42 additions and 1 deletions
|
@ -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.
|
||||
|
|
|
@ -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,
|
||||
)
|
||||
|
|
9
melisa/models/interactions/__init__.py
Normal file
9
melisa/models/interactions/__init__.py
Normal 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"
|
||||
)
|
27
melisa/models/interactions/commands.py
Normal file
27
melisa/models/interactions/commands.py
Normal 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
|
Loading…
Reference in a new issue