Merge pull request #342 from Spectralitree/fixgroupiconprivacy
Fix looking up private group icons
This commit is contained in:
commit
549877c816
@ -153,6 +153,9 @@ namespace PluralKit.Bot
|
|||||||
}
|
}
|
||||||
else if (!ctx.HasNext())
|
else if (!ctx.HasNext())
|
||||||
{
|
{
|
||||||
|
if (!target.DescriptionPrivacy.CanAccess(ctx.LookupContextFor(target.System)))
|
||||||
|
throw Errors.LookupNotAllowed;
|
||||||
|
|
||||||
if (target.Description == null)
|
if (target.Description == null)
|
||||||
if (ctx.System?.Id == target.System)
|
if (ctx.System?.Id == target.System)
|
||||||
await ctx.Reply($"This group does not have a description set. To set one, type `pk;group {target.Reference()} description <description>`.");
|
await ctx.Reply($"This group does not have a description set. To set one, type `pk;group {target.Reference()} description <description>`.");
|
||||||
@ -218,6 +221,8 @@ namespace PluralKit.Bot
|
|||||||
|
|
||||||
async Task ShowIcon()
|
async Task ShowIcon()
|
||||||
{
|
{
|
||||||
|
if (!target.IconPrivacy.CanAccess(ctx.LookupContextFor(target.System)))
|
||||||
|
throw Errors.LookupNotAllowed;
|
||||||
if ((target.Icon?.Trim() ?? "").Length > 0)
|
if ((target.Icon?.Trim() ?? "").Length > 0)
|
||||||
{
|
{
|
||||||
var eb = new EmbedBuilder()
|
var eb = new EmbedBuilder()
|
||||||
|
Loading…
Reference in New Issue
Block a user