mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 13:06:50 +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
|
|
@ -146,6 +146,7 @@ namespace PluralKit.Bot
|
|||
var messageChannel = _cache.GetChannel(trigger.ChannelId);
|
||||
var rootChannel = _cache.GetRootChannel(trigger.ChannelId);
|
||||
var threadId = messageChannel.IsThread() ? messageChannel.Id : (ulong?)null;
|
||||
var guild = _cache.GetGuild(trigger.GuildId.Value);
|
||||
|
||||
var proxyMessage = await _webhookExecutor.ExecuteWebhook(new ProxyRequest
|
||||
{
|
||||
|
|
@ -156,6 +157,7 @@ namespace PluralKit.Bot
|
|||
AvatarUrl = AvatarUtils.TryRewriteCdnUrl(match.Member.ProxyAvatar(ctx)),
|
||||
Content = content,
|
||||
Attachments = trigger.Attachments,
|
||||
FileSizeLimit = guild.FileSizeLimit(),
|
||||
Embeds = embeds.ToArray(),
|
||||
AllowEveryone = allowEveryone,
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue