Fix reversal of import response messages
Some of the command rewrite changes resulted in the response messages for importing a system being swapped. When importing without an existing system (ctx.System == null), we want to display the "new system" message. Otherwise, show the count added/modified.
This commit is contained in:
parent
397da2e1fa
commit
3d21adeec9
@ -103,12 +103,14 @@ namespace PluralKit.Bot.Commands
|
||||
var result = await _dataFiles.ImportSystem(data, ctx.System, ctx.Author.Id);
|
||||
if (!result.Success)
|
||||
await ctx.Reply($"{Emojis.Error} The provided system profile could not be imported. {result.Message}");
|
||||
else if (ctx.System != null)
|
||||
else if (ctx.System == null)
|
||||
{
|
||||
// We didn't have a system prior to importing, so give them the new system's ID
|
||||
await ctx.Reply($"{Emojis.Success} PluralKit has created a system for you based on the given file. Your system ID is `{result.System.Hid}`. Type `pk;system` for more information.");
|
||||
}
|
||||
else
|
||||
{
|
||||
// We already had a system, so show them what changed
|
||||
await ctx.Reply($"{Emojis.Success} Updated {result.ModifiedNames.Count} members, created {result.AddedNames.Count} members. Type `pk;system list` to check!");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user