From 093e548cd4586bd2331c20396cf69f4d5285c324 Mon Sep 17 00:00:00 2001 From: Tom Upson <30987275+tomupson@users.noreply.github.com> Date: Wed, 5 Jan 2022 22:23:35 +0000 Subject: [PATCH] Match argument defaults with IDiscordInteraction on SocketInteraction (#2018) --- .../Entities/Interaction/SocketInteraction.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Discord.Net.WebSocket/Entities/Interaction/SocketInteraction.cs b/src/Discord.Net.WebSocket/Entities/Interaction/SocketInteraction.cs index b11a78464..8250b6825 100644 --- a/src/Discord.Net.WebSocket/Entities/Interaction/SocketInteraction.cs +++ b/src/Discord.Net.WebSocket/Entities/Interaction/SocketInteraction.cs @@ -156,7 +156,8 @@ namespace Discord.WebSocket /// A task that represents an asynchronous send operation for delivering the message. The task result /// contains the sent message. /// - public async Task RespondWithFileAsync(Stream fileStream, string fileName, string text, Embed[] embeds, bool isTTS, bool ephemeral, AllowedMentions allowedMentions, MessageComponent components, Embed embed, RequestOptions options) + public async Task RespondWithFileAsync(Stream fileStream, string fileName, string text = null, Embed[] embeds = null, bool isTTS = false, bool ephemeral = false, + AllowedMentions allowedMentions = null, MessageComponent components = null, Embed embed = null, RequestOptions options = null) { using (var file = new FileAttachment(fileStream, fileName)) { @@ -181,7 +182,8 @@ namespace Discord.WebSocket /// A task that represents an asynchronous send operation for delivering the message. The task result /// contains the sent message. /// - public async Task RespondWithFileAsync(string filePath, string fileName, string text, Embed[] embeds, bool isTTS, bool ephemeral, AllowedMentions allowedMentions, MessageComponent components, Embed embed, RequestOptions options) + public async Task RespondWithFileAsync(string filePath, string fileName = null, string text = null, Embed[] embeds = null, bool isTTS = false, bool ephemeral = false, + AllowedMentions allowedMentions = null, MessageComponent components = null, Embed embed = null, RequestOptions options = null) { using (var file = new FileAttachment(filePath, fileName)) { @@ -205,7 +207,8 @@ namespace Discord.WebSocket /// A task that represents an asynchronous send operation for delivering the message. The task result /// contains the sent message. /// - public Task RespondWithFileAsync(FileAttachment attachment, string text, Embed[] embeds, bool isTTS, bool ephemeral, AllowedMentions allowedMentions, MessageComponent components, Embed embed, RequestOptions options) + public Task RespondWithFileAsync(FileAttachment attachment, string text = null, Embed[] embeds = null, bool isTTS = false, bool ephemeral = false, + AllowedMentions allowedMentions = null, MessageComponent components = null, Embed embed = null, RequestOptions options = null) => RespondWithFilesAsync(new FileAttachment[] { attachment }, text, embeds, isTTS, ephemeral, allowedMentions, components, embed, options); ///