feat: add -raw flag to servertag

This commit is contained in:
spiral 2021-09-13 03:26:24 -04:00
parent a2bf70b395
commit 9914dd719c
No known key found for this signature in database
GPG Key ID: A6059F0CA0E1BD31

View File

@ -211,10 +211,16 @@ namespace PluralKit.Bot
var setDisabledWarning = $"{Emojis.Warn} Your system tag is currently **disabled** in this server. No tag will be applied when proxying.\nTo re-enable the system tag in the current server, type `pk;s servertag -enable`."; var setDisabledWarning = $"{Emojis.Warn} Your system tag is currently **disabled** in this server. No tag will be applied when proxying.\nTo re-enable the system tag in the current server, type `pk;s servertag -enable`.";
async Task Show() async Task Show(bool raw = false)
{ {
if (ctx.MessageContext.SystemGuildTag != null) if (ctx.MessageContext.SystemGuildTag != null)
{ {
if (raw)
{
await ctx.Reply($"```{ctx.MessageContext.SystemGuildTag}```");
return;
}
var msg = $"Your current system tag in '{ctx.Guild.Name}' is {ctx.MessageContext.SystemGuildTag.AsCode()}"; var msg = $"Your current system tag in '{ctx.Guild.Name}' is {ctx.MessageContext.SystemGuildTag.AsCode()}";
if (!ctx.MessageContext.TagEnabled) if (!ctx.MessageContext.TagEnabled)
msg += ", but it is currently **disabled**. To re-enable it, type `pk;s servertag -enable`."; msg += ", but it is currently **disabled**. To re-enable it, type `pk;s servertag -enable`.";
@ -300,6 +306,8 @@ namespace PluralKit.Bot
await EnableDisable(false); await EnableDisable(false);
else if (ctx.Match("enable") || ctx.MatchFlag("enable")) else if (ctx.Match("enable") || ctx.MatchFlag("enable"))
await EnableDisable(true); await EnableDisable(true);
else if (ctx.MatchRaw())
await Show(raw: true);
else if (!ctx.HasNext(skipFlags: false)) else if (!ctx.HasNext(skipFlags: false))
await Show(); await Show();
else else