Merge pull request #231 from dev-kittens/tweak/send-export-attachment-url

Send raw attachment URL after sending export file for easier copying on mobile
This commit is contained in:
Astrid 2020-10-23 11:07:22 +02:00 committed by GitHub
commit d1c22b66df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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!");