mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-13 17:20:14 +00:00
Consolidate conditional
This commit is contained in:
parent
8056144899
commit
fb236726aa
1 changed files with 2 additions and 2 deletions
|
|
@ -36,8 +36,8 @@ namespace PluralKit.Bot
|
||||||
|
|
||||||
// Warn if there's already a member by this name
|
// Warn if there's already a member by this name
|
||||||
var existingMember = await _data.GetMemberByName(ctx.System, newName);
|
var existingMember = await _data.GetMemberByName(ctx.System, newName);
|
||||||
if (existingMember != null)
|
if (existingMember != null && existingMember.Id != target.Id)
|
||||||
if (existingMember.Id != target.Id) {
|
{
|
||||||
var msg = $"{Emojis.Warn} You already have a member in your system with the name \"{existingMember.NameFor(ctx)}\" (`{existingMember.Hid}`). Do you want to rename this member to that name too?";
|
var msg = $"{Emojis.Warn} You already have a member in your system with the name \"{existingMember.NameFor(ctx)}\" (`{existingMember.Hid}`). Do you want to rename this member to that name too?";
|
||||||
if (!await ctx.PromptYesNo(msg)) throw new PKError("Member renaming cancelled.");
|
if (!await ctx.PromptYesNo(msg)) throw new PKError("Member renaming cancelled.");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue