mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
feat: respect guild boost file size limit when re-sending attachments
This commit is contained in:
parent
b1bd563dad
commit
38cbca1b34
4 changed files with 29 additions and 2 deletions
|
|
@ -1,7 +1,22 @@
|
|||
using Myriad.Types;
|
||||
|
||||
namespace Myriad.Extensions
|
||||
{
|
||||
public static class GuildExtensions
|
||||
{
|
||||
|
||||
public static int FileSizeLimit(this Guild guild)
|
||||
{
|
||||
switch (guild.PremiumTier)
|
||||
{
|
||||
default:
|
||||
case PremiumTier.NONE:
|
||||
case PremiumTier.TIER_1:
|
||||
return 8;
|
||||
case PremiumTier.TIER_2:
|
||||
return 50;
|
||||
case PremiumTier.TIER_3:
|
||||
return 100;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,5 +1,13 @@
|
|||
namespace Myriad.Types
|
||||
{
|
||||
public enum PremiumTier
|
||||
{
|
||||
NONE,
|
||||
TIER_1,
|
||||
TIER_2,
|
||||
TIER_3,
|
||||
}
|
||||
|
||||
public record Guild
|
||||
{
|
||||
public ulong Id { get; init; }
|
||||
|
|
@ -15,6 +23,7 @@ namespace Myriad.Types
|
|||
public bool? WidgetEnabled { get; init; }
|
||||
public ulong? WidgetChannelId { get; init; }
|
||||
public int VerificationLevel { get; init; }
|
||||
public PremiumTier PremiumTier { get; init; }
|
||||
|
||||
public Role[] Roles { get; init; }
|
||||
public string[] Features { get; init; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue