Fix importing by URL
This commit is contained in:
parent
305d8f220e
commit
53b3378901
@ -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 () =>
|
||||||
|
Loading…
Reference in New Issue
Block a user