mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-01 20:46:08 +00:00
fix(structures): parse Message.stickers / edit known issues
This commit is contained in:
parent
c5e87790cc
commit
6a0fd891ef
@ -78,7 +78,7 @@ session.start();
|
|||||||
- We got the library running on WSL (Ubuntu) without any trouble
|
- We got the library running on WSL (Ubuntu) without any trouble
|
||||||
|
|
||||||
### Known issues:
|
### Known issues:
|
||||||
* some properties may be not implemented yet (eg: Message.stickers)
|
* some properties may be not implemented yet
|
||||||
* some structures are not implemented (see https://github.com/oasisjs/biscuit/issues)
|
* some structures are not implemented (see https://github.com/oasisjs/biscuit/issues)
|
||||||
* cache (wip)
|
* cache (wip)
|
||||||
* no optimal way to create embeds, should be fixed in builders tho
|
* no optimal way to create embeds, should be fixed in builders tho
|
||||||
|
@ -20,6 +20,7 @@ export * from "./structures/Permissions.ts";
|
|||||||
export * from "./structures/Presence.ts";
|
export * from "./structures/Presence.ts";
|
||||||
export * from "./structures/Role.ts";
|
export * from "./structures/Role.ts";
|
||||||
export * from "./structures/StageInstance.ts";
|
export * from "./structures/StageInstance.ts";
|
||||||
|
export * from "./structures/Sticker.ts";
|
||||||
export * from "./structures/ThreadMember.ts";
|
export * from "./structures/ThreadMember.ts";
|
||||||
export * from "./structures/User.ts";
|
export * from "./structures/User.ts";
|
||||||
export * from "./structures/Webhook.ts";
|
export * from "./structures/Webhook.ts";
|
||||||
|
@ -20,6 +20,7 @@ import Member from "./Member.ts";
|
|||||||
import Attachment from "./Attachment.ts";
|
import Attachment from "./Attachment.ts";
|
||||||
import ComponentFactory from "./components/ComponentFactory.ts";
|
import ComponentFactory from "./components/ComponentFactory.ts";
|
||||||
import MessageReaction from "./MessageReaction.ts";
|
import MessageReaction from "./MessageReaction.ts";
|
||||||
|
import Sticker from "./Sticker.ts";
|
||||||
import * as Routes from "../Routes.ts";
|
import * as Routes from "../Routes.ts";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -101,6 +102,7 @@ export class Message implements Model {
|
|||||||
this.reactions = data.reactions?.map((react) => new MessageReaction(session, react)) ?? [];
|
this.reactions = data.reactions?.map((react) => new MessageReaction(session, react)) ?? [];
|
||||||
this.attachments = data.attachments.map((attachment) => new Attachment(session, attachment));
|
this.attachments = data.attachments.map((attachment) => new Attachment(session, attachment));
|
||||||
this.embeds = data.embeds;
|
this.embeds = data.embeds;
|
||||||
|
this.stickers = data.stickers?.map((sticker) => new Sticker(session, sticker)) ?? [];
|
||||||
|
|
||||||
if (data.thread && data.guild_id) {
|
if (data.thread && data.guild_id) {
|
||||||
this.thread = new ThreadChannel(session, data.thread, data.guild_id);
|
this.thread = new ThreadChannel(session, data.thread, data.guild_id);
|
||||||
@ -156,6 +158,9 @@ export class Message implements Model {
|
|||||||
thread?: ThreadChannel;
|
thread?: ThreadChannel;
|
||||||
components: Component[];
|
components: Component[];
|
||||||
|
|
||||||
|
/** @deprecated */
|
||||||
|
stickers: Sticker[];
|
||||||
|
|
||||||
webhook?: WebhookAuthor;
|
webhook?: WebhookAuthor;
|
||||||
activity?: {
|
activity?: {
|
||||||
partyId?: Snowflake;
|
partyId?: Snowflake;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import type { DiscordSticker, DiscordStickerPack, StickerFormatTypes, StickerTypes } from "../../discordeno/mod.ts";
|
import type { DiscordSticker, DiscordStickerPack, StickerFormatTypes, StickerTypes } from "../../discordeno/mod.ts";
|
||||||
import { Model } from "./Base.ts";
|
import type { Model } from "./Base.ts";
|
||||||
import type { Snowflake } from "../Snowflake.ts";
|
import type { Snowflake } from "../Snowflake.ts";
|
||||||
import type { Session } from "../Session.ts";
|
import type { Session } from "../Session.ts";
|
||||||
import { User } from "./User.ts";
|
import { User } from "./User.ts";
|
||||||
@ -66,3 +66,5 @@ export class Sticker implements Model {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default Sticker;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user