Skip to content

Commit 21bf2b3

Browse files
committed
Added complete_hidden
1 parent fee89b0 commit 21bf2b3

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

discord_slash/model.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ async def send(self,
4545
embeds: typing.List[discord.Embed] = None,
4646
tts: bool = False,
4747
allowed_mentions: discord.AllowedMentions = None,
48-
hidden: bool = False):
48+
hidden: bool = False,
49+
complete_hidden: bool = False):
4950
"""
5051
Sends response of the slash command.
5152
@@ -63,10 +64,17 @@ async def send(self,
6364
:param allowed_mentions: AllowedMentions of the message.
6465
:type allowed_mentions: discord.AllowedMentions
6566
:param hidden: Whether the message is hidden, which means message content will only be seen to the author.
67+
:type hidden: bool
68+
:param complete_hidden: If this is ``True``, it will be both hidden and `send_type` will be 3. Default ``False``.
69+
:type complete_hidden: bool
6670
:return: ``None``
6771
"""
6872
if embeds and len(embeds) > 10:
6973
raise error.IncorrectFormat("Embed must be 10 or fewer.")
74+
if complete_hidden:
75+
# Overrides both `hidden` and `send_type`.
76+
hidden = True
77+
send_type = 3
7078
base = {
7179
"type": send_type,
7280
"data": {

0 commit comments

Comments
 (0)