fix MatchRaw commands *again*

This commit is contained in:
spiral
2021-09-13 01:22:40 -04:00
parent bae883c11f
commit a165a42046
3 changed files with 79 additions and 79 deletions

View File

@@ -103,7 +103,15 @@ namespace PluralKit.Bot
// No perms check, display name isn't covered by member privacy
if (!ctx.HasNext(false))
if (ctx.MatchRaw())
{
if (target.DisplayName == null)
await ctx.Reply(noDisplayNameSetMessage);
else
await ctx.Reply($"```\n{target.DisplayName}\n```");
return;
}
if (!ctx.HasNext())
{
if (target.DisplayName == null)
await ctx.Reply(noDisplayNameSetMessage);
@@ -122,14 +130,6 @@ namespace PluralKit.Bot
}
return;
}
if (ctx.MatchRaw())
{
if (target.DisplayName == null)
await ctx.Reply(noDisplayNameSetMessage);
else
await ctx.Reply($"```\n{target.DisplayName}\n```");
return;
}
ctx.CheckOwnGroup(target);
@@ -160,7 +160,15 @@ namespace PluralKit.Bot
if (ctx.System?.Id == target.System)
noDescriptionSetMessage += $" To set one, type `pk;group {target.Reference()} description <description>`.";
if (!ctx.HasNext(false))
if (ctx.MatchRaw())
{
if (target.Description == null)
await ctx.Reply(noDescriptionSetMessage);
else
await ctx.Reply($"```\n{target.Description}\n```");
return;
}
if (!ctx.HasNext())
{
if (target.Description == null)
await ctx.Reply(noDescriptionSetMessage);
@@ -173,14 +181,6 @@ namespace PluralKit.Bot
.Build());
return;
}
if (ctx.MatchRaw())
{
if (target.Description == null)
await ctx.Reply(noDescriptionSetMessage);
else
await ctx.Reply($"```\n{target.Description}\n```");
return;
}
ctx.CheckOwnGroup(target);