feat(bot): add new guild settings command

This commit is contained in:
Iris System 2024-11-10 15:46:36 +13:00
parent f0436332c0
commit 0473bd8f01
15 changed files with 179 additions and 15 deletions

View file

@ -123,6 +123,15 @@ public class ProxyService
return "PluralKit cannot proxy messages over 2000 characters in length.";
}
if (ctx.RequireSystemTag)
{
var tag = ctx.SystemGuildTag ?? ctx.SystemTag;
if (tag == null)
return "This server requires PluralKit users to have a system tag, but you do not have one set.";
if (!ctx.TagEnabled)
return "This server requires PluralKit users to have a system tag, but your system tag is disabled in this server.";
}
var guild = await _cache.GetGuild(channel.GuildId.Value);
var fileSizeLimit = guild.FileSizeLimit();
var bytesThreshold = fileSizeLimit * 1024 * 1024;