mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-10 17:28:27 -04:00
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:
@@ -416,6 +416,7 @@ public partial class Utility : NadekoModule
|
|||||||
{
|
{
|
||||||
name ??= ss.Name;
|
name ??= ss.Name;
|
||||||
description = ss.Description;
|
description = ss.Description;
|
||||||
|
tags = tags is null or { Length: 0 } ? ss.Tags.ToArray() : tags;
|
||||||
format = FormatToExtension(ss.Format);
|
format = FormatToExtension(ss.Format);
|
||||||
|
|
||||||
using var http = _httpFactory.CreateClient();
|
using var http = _httpFactory.CreateClient();
|
||||||
@@ -461,6 +462,9 @@ public partial class Utility : NadekoModule
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
if (tags.Length == 0)
|
||||||
|
tags = new[] { name };
|
||||||
|
|
||||||
await ctx.Guild.CreateStickerAsync(name,
|
await ctx.Guild.CreateStickerAsync(name,
|
||||||
string.IsNullOrWhiteSpace(description) ? "Missing description" : description,
|
string.IsNullOrWhiteSpace(description) ? "Missing description" : description,
|
||||||
tags,
|
tags,
|
||||||
|
@@ -1248,7 +1248,8 @@ emojiremove:
|
|||||||
stickeradd:
|
stickeradd:
|
||||||
desc: "Adds the sticker from your message to this server. Send the sticker along with this command (in the same message)."
|
desc: "Adds the sticker from your message to this server. Send the sticker along with this command (in the same message)."
|
||||||
args:
|
args:
|
||||||
- "optionalname \"optional description\" tag1 tag2 tagN"
|
- ""
|
||||||
|
- "name \"description\" tag1 tag2 tagN"
|
||||||
deckshuffle:
|
deckshuffle:
|
||||||
desc: "Reshuffles all cards back into the deck."
|
desc: "Reshuffles all cards back into the deck."
|
||||||
args:
|
args:
|
||||||
|
Reference in New Issue
Block a user