Improved how stickeradd works. Optional parameters will be a hidden feature as it's hard to explain. Tags are now also optional.

This commit is contained in:
Kwoth
2023-01-13 22:55:09 +01:00
parent d526a2fac6
commit 7e61f7fb46
2 changed files with 6 additions and 1 deletions

View File

@@ -416,6 +416,7 @@ public partial class Utility : NadekoModule
{
name ??= ss.Name;
description = ss.Description;
tags = tags is null or { Length: 0 } ? ss.Tags.ToArray() : tags;
format = FormatToExtension(ss.Format);
using var http = _httpFactory.CreateClient();
@@ -461,6 +462,9 @@ public partial class Utility : NadekoModule
try
{
if (tags.Length == 0)
tags = new[] { name };
await ctx.Guild.CreateStickerAsync(name,
string.IsNullOrWhiteSpace(description) ? "Missing description" : description,
tags,