mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-02 17:00:08 +00:00
Merge branch 'main' into feat-2869
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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<
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { cache, deleteMessages, sendMessage } from "../../mod.ts";
|
||||
import { defaultTestOptions, tempData } from "../ws/start_bot.ts";
|
||||
import { assertExists } from "../deps.ts";
|
||||
import { delayUntil } from "../util/delay_until.ts";
|
||||
import { defaultTestOptions, tempData } from "../ws/start_bot.ts";
|
||||
|
||||
async function ifItFailsBlameWolf(reason?: string) {
|
||||
const message = await sendMessage(tempData.channelId, "Hello World!");
|
||||
@@ -29,7 +29,7 @@ async function ifItFailsBlameWolf(reason?: string) {
|
||||
// Delete the message now
|
||||
await deleteMessages(
|
||||
tempData.channelId,
|
||||
[message.id.toString(), secondMessage.id.toString()],
|
||||
[message.id, secondMessage.id],
|
||||
reason,
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user