mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-14 09:40:10 +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
|
|
@ -28,7 +28,7 @@ public class Member
|
|||
_avatarHosting = avatarHosting;
|
||||
}
|
||||
|
||||
public async Task NewMember(Context ctx, string? memberName)
|
||||
public async Task NewMember(Context ctx, string? memberName, bool confirmYes = false)
|
||||
{
|
||||
if (ctx.System == null) throw Errors.NoSystemError(ctx.DefaultPrefix);
|
||||
memberName = memberName ?? throw new PKSyntaxError("You must pass a member name.");
|
||||
|
|
@ -42,7 +42,7 @@ public class Member
|
|||
if (existingMember != null)
|
||||
{
|
||||
var msg = $"{Emojis.Warn} You already have a member in your system with the name \"{existingMember.NameFor(ctx)}\" (with ID `{existingMember.DisplayHid(ctx.Config)}`). Do you want to create another member with the same name?";
|
||||
if (!await ctx.PromptYesNo(msg, "Create")) throw new PKError("Member creation cancelled.");
|
||||
if (!await ctx.PromptYesNo(msg, "Create", flagValue: confirmYes)) throw new PKError("Member creation cancelled.");
|
||||
}
|
||||
|
||||
await using var conn = await ctx.Database.Obtain();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue