Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add context_menu_command Message type #7808

Merged
merged 3 commits into from
Mar 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion discord/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,10 @@ class MessageType(Enum):
guild_discovery_grace_period_final_warning = 17
thread_created = 18
reply = 19
application_command = 20
chat_input_command = 20
thread_starter_message = 21
guild_invite_reminder = 22
context_menu_command = 23


class SpeakingState(Enum):
Expand Down
3 changes: 2 additions & 1 deletion discord/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -1645,7 +1645,8 @@ def is_system(self) -> bool:
return self.type not in (
MessageType.default,
MessageType.reply,
MessageType.application_command,
MessageType.chat_input_command,
MessageType.context_menu_command,
MessageType.thread_starter_message,
)

Expand Down
9 changes: 7 additions & 2 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1403,9 +1403,9 @@ of :class:`enum.Enum`.
The system message denoting that the author is replying to a message.

.. versionadded:: 2.0
.. attribute:: application_command
.. attribute:: chat_input_command

The system message denoting that an application (or "slash") command was executed.
The system message denoting that a slash command was executed.

.. versionadded:: 2.0
.. attribute:: guild_invite_reminder
Expand All @@ -1418,6 +1418,11 @@ of :class:`enum.Enum`.
The system message denoting the message in the thread that is the one that started the
thread's conversation topic.

.. versionadded:: 2.0
.. attribute:: context_menu_command

The system message denoting that a context menu command was executed.

.. versionadded:: 2.0

.. class:: UserFlags
Expand Down