mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 20:35:02 +00:00
More fixes, change rest of stripObjectToScalars to configAccessibleObj
This commit is contained in:
parent
4ad99975de
commit
acb4913495
66 changed files with 623 additions and 192 deletions
|
@ -1,11 +1,14 @@
|
|||
import { MessageAttachment, MessageOptions, TextChannel } from "discord.js";
|
||||
import { MessageAttachment, MessageOptions, TextChannel, ThreadChannel } from "discord.js";
|
||||
import fs from "fs";
|
||||
import { downloadFile } from "../../utils";
|
||||
const fsp = fs.promises;
|
||||
|
||||
const MAX_ATTACHMENT_REHOST_SIZE = 1024 * 1024 * 8;
|
||||
|
||||
export async function rehostAttachment(attachment: MessageAttachment, targetChannel: TextChannel): Promise<string> {
|
||||
export async function rehostAttachment(
|
||||
attachment: MessageAttachment,
|
||||
targetChannel: TextChannel | ThreadChannel,
|
||||
): Promise<string> {
|
||||
if (attachment.size > MAX_ATTACHMENT_REHOST_SIZE) {
|
||||
return "Attachment too big to rehost";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue