Fix importing by URL

This commit is contained in:
Ske 2019-07-10 12:36:51 +02:00
parent 305d8f220e
commit 53b3378901

View File

@ -17,7 +17,7 @@ namespace PluralKit.Bot.Commands
[Remarks("import [fileurl]")] [Remarks("import [fileurl]")]
public async Task Import([Remainder] string url = null) public async Task Import([Remainder] string url = null)
{ {
if (url == null) url = Context.Message.Attachments.FirstOrDefault()?.Filename; if (url == null) url = Context.Message.Attachments.FirstOrDefault()?.Url;
if (url == null) throw Errors.NoImportFilePassed; if (url == null) throw Errors.NoImportFilePassed;
await Context.BusyIndicator(async () => await Context.BusyIndicator(async () =>