From 80e9e4f14b0e3a8d641cd1dc9250e0db9c312793 Mon Sep 17 00:00:00 2001 From: dev-kittens Date: Sat, 17 Oct 2020 16:56:48 -0500 Subject: [PATCH] Send raw attachment URL after sending export file --- PluralKit.Bot/Commands/ImportExport.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/PluralKit.Bot/Commands/ImportExport.cs b/PluralKit.Bot/Commands/ImportExport.cs index 0e08eb63..9003d1dc 100644 --- a/PluralKit.Bot/Commands/ImportExport.cs +++ b/PluralKit.Bot/Commands/ImportExport.cs @@ -141,8 +141,9 @@ namespace PluralKit.Bot try { var dm = await ctx.Rest.CreateDmAsync(ctx.Author.Id); - await dm.SendFileAsync("system.json", stream, $"{Emojis.Success} Here you go!"); - + var msg = await dm.SendFileAsync("system.json", stream, $"{Emojis.Success} Here you go!"); + await dm.SendMessageAsync($"<{msg.Attachments[0].Url}>"); + // If the original message wasn't posted in DMs, send a public reminder if (!(ctx.Channel is DiscordDmChannel)) await ctx.Reply($"{Emojis.Success} Check your DMs!");