Skip to content

Commit 093e548

Browse files
authored
Match argument defaults with IDiscordInteraction on SocketInteraction (#2018)
1 parent 9a6d07c commit 093e548

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/Discord.Net.WebSocket/Entities/Interaction/SocketInteraction.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,8 @@ public abstract Task RespondAsync(string text = null, Embed[] embeds = null, boo
156156
/// A task that represents an asynchronous send operation for delivering the message. The task result
157157
/// contains the sent message.
158158
/// </returns>
159-
public async Task RespondWithFileAsync(Stream fileStream, string fileName, string text, Embed[] embeds, bool isTTS, bool ephemeral, AllowedMentions allowedMentions, MessageComponent components, Embed embed, RequestOptions options)
159+
public async Task RespondWithFileAsync(Stream fileStream, string fileName, string text = null, Embed[] embeds = null, bool isTTS = false, bool ephemeral = false,
160+
AllowedMentions allowedMentions = null, MessageComponent components = null, Embed embed = null, RequestOptions options = null)
160161
{
161162
using (var file = new FileAttachment(fileStream, fileName))
162163
{
@@ -181,7 +182,8 @@ public async Task RespondWithFileAsync(Stream fileStream, string fileName, strin
181182
/// A task that represents an asynchronous send operation for delivering the message. The task result
182183
/// contains the sent message.
183184
/// </returns>
184-
public async Task RespondWithFileAsync(string filePath, string fileName, string text, Embed[] embeds, bool isTTS, bool ephemeral, AllowedMentions allowedMentions, MessageComponent components, Embed embed, RequestOptions options)
185+
public async Task RespondWithFileAsync(string filePath, string fileName = null, string text = null, Embed[] embeds = null, bool isTTS = false, bool ephemeral = false,
186+
AllowedMentions allowedMentions = null, MessageComponent components = null, Embed embed = null, RequestOptions options = null)
185187
{
186188
using (var file = new FileAttachment(filePath, fileName))
187189
{
@@ -205,7 +207,8 @@ public async Task RespondWithFileAsync(string filePath, string fileName, string
205207
/// A task that represents an asynchronous send operation for delivering the message. The task result
206208
/// contains the sent message.
207209
/// </returns>
208-
public Task RespondWithFileAsync(FileAttachment attachment, string text, Embed[] embeds, bool isTTS, bool ephemeral, AllowedMentions allowedMentions, MessageComponent components, Embed embed, RequestOptions options)
210+
public Task RespondWithFileAsync(FileAttachment attachment, string text = null, Embed[] embeds = null, bool isTTS = false, bool ephemeral = false,
211+
AllowedMentions allowedMentions = null, MessageComponent components = null, Embed embed = null, RequestOptions options = null)
209212
=> RespondWithFilesAsync(new FileAttachment[] { attachment }, text, embeds, isTTS, ephemeral, allowedMentions, components, embed, options);
210213

211214
/// <summary>

0 commit comments

Comments
 (0)