@@ -125,11 +125,12 @@ public function acknowledge(?bool $source = true)
125125 * @param bool $tts Whether the message should be text-to-speech.
126126 * @param array[]|Embed[]|null $embeds An array of up to 10 embeds. Can also be an array of DiscordPHP embeds.
127127 * @param array|null $allowed_mentions Allowed mentions object. See Discord developer docs.
128+ * @param int|null $flags Set to 64 to make your response ephemeral
128129 *
129130 * Source is unused
130131 * @see https://discord.com/developers/docs/change-log#changes-to-slash-command-response-types-and-flags
131132 */
132- public function reply (string $ content , bool $ tts = false , array $ embeds = [], ?array $ allowed_mentions = null , bool $ source = false )
133+ public function reply (string $ content , bool $ tts = false , array $ embeds = [], ?array $ allowed_mentions = null , ? bool $ source = false , ? int $ flags = null )
133134 {
134135 $ embeds = array_map (function ($ e ) {
135136 if ($ e instanceof Embed) {
@@ -144,6 +145,7 @@ public function reply(string $content, bool $tts = false, array $embeds = [], ?a
144145 'tts ' => $ tts ,
145146 'embeds ' => $ embeds ,
146147 'allowed_mentions ' => $ allowed_mentions ,
148+ 'flags ' => $ flags ,
147149 ];
148150
149151 ($ this ->resolve )([
@@ -162,10 +164,11 @@ public function reply(string $content, bool $tts = false, array $embeds = [], ?a
162164 * @param bool $tts
163165 * @param array|null $embeds
164166 * @param array|null $allowed_mentions
167+ * @param int|null $flags
165168 */
166- public function replyWithSource (string $ content , bool $ tts = false , ?array $ embeds = null , ?array $ allowed_mentions = null )
169+ public function replyWithSource (string $ content , bool $ tts = false , ?array $ embeds = null , ?array $ allowed_mentions = null , ? int $ flags = null )
167170 {
168- $ this ->reply ($ content , $ tts , $ embeds , $ allowed_mentions , true );
171+ $ this ->reply ($ content , $ tts , $ embeds , $ allowed_mentions , true , $ flags );
169172 }
170173
171174 /**
0 commit comments