mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-13 09:10:14 +00:00
remove rest of the parsing in csharp bot
This commit is contained in:
parent
15ffd16c01
commit
479e0a59b5
35 changed files with 242 additions and 409 deletions
|
|
@ -31,7 +31,7 @@ public class ImportExport
|
|||
_dmCache = dmCache;
|
||||
}
|
||||
|
||||
public async Task Import(Context ctx, string? inputUrl)
|
||||
public async Task Import(Context ctx, string? inputUrl, bool confirmYes)
|
||||
{
|
||||
inputUrl = inputUrl ?? ctx.Message.Attachments.FirstOrDefault()?.Url;
|
||||
if (inputUrl == null) throw Errors.NoImportFilePassed;
|
||||
|
|
@ -77,7 +77,7 @@ public class ImportExport
|
|||
async Task ConfirmImport(string message)
|
||||
{
|
||||
var msg = $"{message}\n\nDo you want to proceed with the import?";
|
||||
if (!await ctx.PromptYesNo(msg, "Proceed"))
|
||||
if (!await ctx.PromptYesNo(msg, "Proceed", flagValue: confirmYes))
|
||||
throw Errors.ImportCancelled;
|
||||
}
|
||||
|
||||
|
|
@ -86,7 +86,7 @@ public class ImportExport
|
|||
&& data.Value<JArray>("accounts").Contains(ctx.Author.Id.ToString()))
|
||||
{
|
||||
var msg = $"{Emojis.Warn} You seem to importing a system profile belonging to another account. Are you sure you want to proceed?";
|
||||
if (!await ctx.PromptYesNo(msg, "Import")) throw Errors.ImportCancelled;
|
||||
if (!await ctx.PromptYesNo(msg, "Import", flagValue: confirmYes)) throw Errors.ImportCancelled;
|
||||
}
|
||||
|
||||
var result = await _dataFiles.ImportSystem(ctx.Author.Id, ctx.System, data, ConfirmImport);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue