Skip to content

Commit 7e46a5c

Browse files
committed
Changes some args of send and edit is keyword-only args
1 parent b4aa04f commit 7e46a5c

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
@@ -54,6 +54,7 @@ def __init__(self,
5454
async def send(self,
5555
send_type: int = 4,
5656
content: str = "",
57+
*,
5758
embeds: typing.List[discord.Embed] = None,
5859
tts: bool = False,
5960
allowed_mentions: discord.AllowedMentions = None,
@@ -63,7 +64,10 @@ async def send(self,
6364
Sends response of the slash command.
6465
6566
.. note::
66-
Param ``hidden`` ONLY works without embeds.
67+
Every args except `send_type` and `content` must be passed as keyword args.
68+
69+
.. warning::
70+
Param ``hidden`` only works without embeds.
6771
6872
:param send_type: Type of the response. Refer Discord API DOCS for more info about types. Default ``4``.
6973
:type send_type: int
@@ -118,6 +122,7 @@ async def send(self,
118122
return resp
119123

120124
async def edit(self,
125+
*,
121126
message_id: typing.Union[int, str] = "@original",
122127
content: str = "",
123128
embeds: typing.List[discord.Embed] = None,
@@ -126,6 +131,9 @@ async def edit(self,
126131
"""
127132
Edits response of the slash command.
128133
134+
.. note::
135+
All args must be passed as keyword args.
136+
129137
:param message_id: Response message ID. Default initial message.
130138
:param content: Text of the response. Can be ``None``.
131139
:type content: str

0 commit comments

Comments
 (0)