mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-10 15:57:53 +00:00
Confirm before clearing (most) entity properties
This commit is contained in:
parent
969065724d
commit
dfacbc51ab
7 changed files with 32 additions and 21 deletions
|
|
@ -64,7 +64,7 @@ namespace PluralKit.Bot
|
|||
}
|
||||
|
||||
public async Task Description(Context ctx, PKMember target) {
|
||||
if (ctx.MatchClear())
|
||||
if (await ctx.MatchClear("this member's description"))
|
||||
{
|
||||
CheckEditMemberPermission(ctx, target);
|
||||
|
||||
|
|
@ -107,7 +107,7 @@ namespace PluralKit.Bot
|
|||
}
|
||||
|
||||
public async Task Pronouns(Context ctx, PKMember target) {
|
||||
if (ctx.MatchClear())
|
||||
if (await ctx.MatchClear("this member's pronouns"))
|
||||
{
|
||||
CheckEditMemberPermission(ctx, target);
|
||||
var patch = new MemberPatch {Pronouns = Partial<string>.Null()};
|
||||
|
|
@ -145,7 +145,7 @@ namespace PluralKit.Bot
|
|||
public async Task Color(Context ctx, PKMember target)
|
||||
{
|
||||
var color = ctx.RemainderOrNull();
|
||||
if (ctx.MatchClear())
|
||||
if (await ctx.MatchClear())
|
||||
{
|
||||
CheckEditMemberPermission(ctx, target);
|
||||
|
||||
|
|
@ -193,7 +193,7 @@ namespace PluralKit.Bot
|
|||
}
|
||||
public async Task Birthday(Context ctx, PKMember target)
|
||||
{
|
||||
if (ctx.MatchClear())
|
||||
if (await ctx.MatchClear("this member's birthday"))
|
||||
{
|
||||
CheckEditMemberPermission(ctx, target);
|
||||
|
||||
|
|
@ -279,7 +279,7 @@ namespace PluralKit.Bot
|
|||
await ctx.Reply(successStr);
|
||||
}
|
||||
|
||||
if (ctx.MatchClear())
|
||||
if (await ctx.MatchClear("this member's display name"))
|
||||
{
|
||||
CheckEditMemberPermission(ctx, target);
|
||||
|
||||
|
|
@ -313,7 +313,7 @@ namespace PluralKit.Bot
|
|||
{
|
||||
ctx.CheckGuildContext();
|
||||
|
||||
if (ctx.MatchClear())
|
||||
if (await ctx.MatchClear("this member's server name"))
|
||||
{
|
||||
CheckEditMemberPermission(ctx, target);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue