mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-11 16:20:13 +00:00
fix: check group banner existence when querying group banner
This commit is contained in:
parent
695df5684f
commit
43bc220a3d
1 changed files with 2 additions and 2 deletions
|
|
@ -354,8 +354,8 @@ public class Groups
|
|||
{
|
||||
async Task ClearBannerImage()
|
||||
{
|
||||
await ctx.ConfirmClear("this group's banner image");
|
||||
ctx.CheckOwnGroup(target);
|
||||
await ctx.ConfirmClear("this group's banner image");
|
||||
|
||||
await ctx.Repository.UpdateGroup(target.Id, new GroupPatch { BannerImage = null });
|
||||
await ctx.Reply($"{Emojis.Success} Group banner image cleared.");
|
||||
|
|
@ -391,7 +391,7 @@ public class Groups
|
|||
{
|
||||
ctx.CheckSystemPrivacy(target.System, target.BannerPrivacy);
|
||||
|
||||
if ((target.Icon?.Trim() ?? "").Length > 0)
|
||||
if ((target.BannerImage?.Trim() ?? "").Length > 0)
|
||||
switch (ctx.MatchFormat())
|
||||
{
|
||||
case ReplyFormat.Raw:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue