lilybird
Version:
A bun-first discord api wrapper written in TS
133 lines • 4.95 kB
TypeScript
import { Component as _Component } from "./message-components.js";
import type { InteractionType, MessageActivityType, MessageReferenceType, MessageType } from "#enums";
import type { LilybirdAttachment, ResolvedDataStructure } from "./others.js";
import type { Application } from "./application.js";
import type { Channel } from "./channel.js";
import type { Sticker } from "./sticker.js";
import type { Embed } from "./embed.js";
import type { Emoji } from "./emoji.js";
import type { Guild } from "./guild.js";
import type { User } from "./user.js";
import type { Role } from "./role.js";
import type { Poll } from "./poll.js";
export declare namespace Message {
export import Component = _Component;
interface Structure {
id: string;
channel_id: string;
author: User.Structure;
content: string;
timestamp: string;
edited_timestamp: string | null;
tts: boolean;
mention_everyone: boolean;
mentions: Array<User.Structure>;
mention_roles: Array<Role.Structure>;
mention_channels?: Array<Channel.MentionStructure>;
attachments: Array<Channel.AttachmentStructure>;
embeds: Array<Embed.Structure>;
reactions: Array<ReactionStructure>;
nonce?: number | string;
pinned: boolean;
webhook_id?: string;
type: MessageType;
activity?: ActivityStructure;
application?: Partial<Application.Structure>;
application_id?: string;
flags?: number;
message_reference?: ReferenceStructure;
message_snapshots?: Array<SnapshotStructure>;
referenced_message?: Structure | null;
interaction_metadata?: InteractionMetadataStructure;
interaction?: InteractionStructure;
thread?: Channel.Structure;
components?: Array<Component.Structure>;
sticker_items?: Array<Sticker.ItemStructure>;
stickers?: Array<Sticker.Structure>;
position?: number;
role_subscription_data?: Role.SubscriptionDataStructure;
resolved?: ResolvedDataStructure;
poll?: Poll.Structure;
call?: CallStructure;
}
interface GuildStructure extends Structure {
guild_id: string;
member: Partial<Guild.MemberStructure>;
mentions: Array<User.Structure & {
member?: Partial<Guild.MemberStructure>;
}>;
}
interface InteractionStructure {
id: string;
type: InteractionType;
name: string;
user: User.Structure;
member?: Partial<Guild.MemberStructure>;
}
interface InteractionMetadataStructure {
id: string;
type: InteractionType;
user: User.Structure;
authorizing_integration_owners: Application.IntegrationTypeMap;
original_response_message_id?: string;
interacted_message_id?: string;
triggering_interaction_metadata?: InteractionMetadataStructure;
}
interface CallStructure {
participants: Array<string>;
ended_timestamp?: string;
}
interface ReferenceStructure {
type?: MessageReferenceType;
message_id?: string;
channel_id?: string;
guild_id?: string;
fail_if_not_exists?: boolean;
}
interface SnapshotStructure {
message: Pick<Structure, "type" | "content" | "embeds" | "attachments" | "timestamp" | "edited_timestamp" | "flags" | "mentions" | "mention_roles" | "stickers" | "sticker_items" | "components">;
}
interface ReactionStructure {
count: number;
count_details: ReactionCountDetailsStructure;
me: boolean;
me_burst: boolean;
emoji: Partial<Emoji.Structure>;
burst_colors: Array<number>;
}
interface ReactionCountDetailsStructure {
burst: number;
normal: number;
}
interface ActivityStructure {
type: MessageActivityType;
party_id?: string;
}
interface CreateJSONParams {
content?: string;
nonce?: number | string;
tts?: boolean;
embeds?: Array<Embed.Structure>;
allowed_mentions?: Channel.AllowedMentionsStructure;
message_reference?: ReferenceStructure;
components?: Array<Component.Structure>;
sticker_ids?: Array<string>;
files?: Array<LilybirdAttachment>;
payload_json?: string;
attachments?: Array<Partial<Channel.AttachmentStructure>>;
flags?: number;
enforce_nonce?: boolean;
poll?: Poll.CreateStructure;
}
interface EditJSONParams {
content?: string;
embeds?: Array<Embed.Structure>;
flags?: number;
allowed_mentions?: Channel.AllowedMentionsStructure;
components?: Array<Component.Structure>;
files?: Array<LilybirdAttachment>;
payload_json?: string;
attachments?: Array<Channel.AttachmentStructure>;
}
}
//# sourceMappingURL=message.d.ts.map