mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-15 10:10:12 +00:00
Merge pull request #342 from Spectralitree/fixgroupiconprivacy
Fix looking up private group icons
This commit is contained in:
commit
549877c816
1 changed files with 5 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue