Merge branch 'main' into more-thread-stuff

This commit is contained in:
Skillz4Killz
2021-06-18 10:37:23 -04:00
committed by GitHub
24 changed files with 140 additions and 27 deletions
+10 -1
View File
@@ -34,7 +34,16 @@ export async function sendMessage(channelId: bigint, content: string | CreateMes
const requiredPerms: Set<PermissionStrings> = new Set(["SEND_MESSAGES", "VIEW_CHANNEL"]);
if (content.tts) requiredPerms.add("SEND_TTS_MESSAGES");
if (content.embed) requiredPerms.add("EMBED_LINKS");
// TODO: v12 remove
if (content.embed) {
content.embeds = [content.embed, ...(content.embeds || [])];
content.embed = undefined;
}
if (content.embeds?.length) {
requiredPerms.add("EMBED_LINKS");
content.embeds?.splice(10);
}
if (content.messageReference?.messageId || content.allowedMentions?.repliedUser) {
requiredPerms.add("READ_MESSAGE_HISTORY");
}