Merge branch 'main' into feat-2869

This commit is contained in:
Skillz4Killz
2021-05-03 14:38:22 -04:00
committed by GitHub
3 changed files with 13 additions and 5 deletions
+8
View File
@@ -161,6 +161,8 @@ export async function createDiscordenoMessage(data: Message) {
}
props.authorId = createNewProp(snowflakeToBigint(author.id));
props.isBot = createNewProp(author.bot || false);
props.tag = createNewProp(`${author.username}#${author.discriminator}`);
// Discord doesnt give guild id for getMessage() so this will fill it in
const guildIdFinal = guildId ||
@@ -221,8 +223,14 @@ export interface DiscordenoMessage extends
| "guildId"
| "channelId"
| "member"
| "author"
> {
id: bigint;
author: undefined;
/** Whether or not this message was sent by a bot */
isBot: boolean;
/** The username#discrimnator for the user who sent this message */
tag: string;
// For better user experience
/** Id of the guild which the massage has been send in. "0n" if it a DM */
guildId: bigint;
+3 -3
View File
@@ -16,11 +16,11 @@ export interface ExecuteWebhook {
/** True if this is a TTS message */
tts?: boolean;
/** The contents of the file being sent */
file: FileContent | FileContent[];
file?: FileContent | FileContent[];
/** Embedded `rich` content */
embeds: Embed[];
embeds?: Embed[];
/** Allowed mentions for the message */
allowedMentions: AllowedMentions;
allowedMentions?: AllowedMentions;
}
export type DiscordExecuteWebhook = SnakeCasedPropertiesDeep<