Skip to content

Commit ee6e0cb

Browse files
committed
Properly support followup messages
1 parent ddef6cb commit ee6e0cb

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

discord_slash/model.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ class SlashContext:
2020
:ivar author: :class:`discord.Member` instance representing author of the command message.
2121
:ivar channel: :class:`discord.TextChannel` instance representing channel of the command message.
2222
"""
23+
2324
def __init__(self,
2425
_http: http.SlashCommandRequest,
2526
_json: dict,
@@ -64,6 +65,11 @@ async def send(self,
6465
"embeds": [x.to_dict() for x in embeds] if embeds else [],
6566
"allowed_mentions": [x.to_dict() for x in allowed_mentions] if allowed_mentions else self._discord.allowed_mentions.to_dict()
6667
}
68+
} if not self.sent else {
69+
"content": text,
70+
"tts": tts,
71+
"embeds": [x.to_dict() for x in embeds] if embeds else [],
72+
"allowed_mentions": [x.to_dict() for x in allowed_mentions] if allowed_mentions else self._discord.allowed_mentions.to_dict()
6773
}
6874
initial = True if not self.sent else False
6975
resp = await self._http.post(base, self._discord.user.id, self.interaction_id, self.__token, initial)

0 commit comments

Comments
 (0)