chore: bump revolt-api

This commit is contained in:
Paul Makles
2022-07-15 21:29:35 +01:00
parent ececa5860a
commit f67a132e6f
4 changed files with 18 additions and 16 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "revolt.js",
"version": "6.0.7",
"version": "6.0.8",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
"module": "esm/index.js",
@@ -17,7 +17,7 @@
"lodash.isequal": "^4.5.0",
"long": "^5.2.0",
"mobx": "^6.3.2",
"revolt-api": "0.5.4",
"revolt-api": "0.5.5",
"ulid": "^2.3.0",
"ws": "^8.2.2"
},
+3 -1
View File
@@ -14,6 +14,7 @@ export class Emoji {
creator_id: string;
parent: EmojiParent;
animated: boolean;
nsfw: boolean;
/**
* Get timestamp when this message was created.
@@ -36,7 +37,8 @@ export class Emoji {
this.name = data.name;
this.creator_id = data.creator_id;
this.parent = data.parent;
this.animated = data.animated;
this.animated = data.animated ?? false;
this.nsfw = data.nsfw ?? false;
makeAutoObservable(this, {
_id: false,
+9 -9
View File
@@ -2,6 +2,7 @@ import type {
DataEditMessage,
DataMessageSend,
Embed,
Interactions,
Masquerade,
Message as MessageI,
SystemMessage,
@@ -32,6 +33,8 @@ export class Message {
mention_ids: Nullable<string[]>;
reply_ids: Nullable<string[]>;
masquerade: Nullable<Masquerade>;
// reactions: Record<string, Set<string>>;
// interactions: Nullable<Interactions>;
get channel() {
return this.client.channels.get(this.channel_id);
@@ -66,7 +69,7 @@ export class Message {
* Absolute pathname to this message in the client.
*/
get path() {
return this.channel?.path + '/' + this._id;
return this.channel?.path + "/" + this._id;
}
/**
@@ -84,7 +87,7 @@ export class Message {
@computed
get asSystemMessage() {
const system = this.system;
if (!system) return { type: 'none' };
if (!system) return { type: "none" };
const { type } = system;
const get = (id: string) => this.client.users.get(id);
@@ -163,12 +166,9 @@ export class Message {
apply("mentions", "mention_ids");
}
@action append({ embeds }: Pick<Partial<MessageI>, 'embeds'>) {
@action append({ embeds }: Pick<Partial<MessageI>, "embeds">) {
if (embeds) {
this.embeds = [
...(this.embeds ?? []),
...embeds
];
this.embeds = [...(this.embeds ?? []), ...embeds];
}
}
@@ -178,7 +178,7 @@ export class Message {
*/
async edit(data: DataEditMessage) {
return await this.client.api.patch(
`/channels/${this.channel_id as ''}/messages/${this._id as ''}`,
`/channels/${this.channel_id as ""}/messages/${this._id as ""}`,
data,
);
}
@@ -188,7 +188,7 @@ export class Message {
*/
async delete() {
return await this.client.api.delete(
`/channels/${this.channel_id as ''}/messages/${this._id as ''}`,
`/channels/${this.channel_id as ""}/messages/${this._id as ""}`,
);
}
+4 -4
View File
@@ -1015,10 +1015,10 @@ reusify@^1.0.4:
resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76"
integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==
revolt-api@0.5.4:
version "0.5.4"
resolved "https://registry.yarnpkg.com/revolt-api/-/revolt-api-0.5.4.tgz#cefbb05cbeeb7deb437aca9efb80ce277b8c04e4"
integrity sha512-JBoEzakPn11lq43BN2VMwyfeU8pC11Q6O07BuWjagMqBrjY8GdMdQIdmtmvudSiTogux6VsbGkV+0eVUUZ44xw==
revolt-api@0.5.5:
version "0.5.5"
resolved "https://registry.yarnpkg.com/revolt-api/-/revolt-api-0.5.5.tgz#e4937822070fa3dd0940e9e22084f8ac5df3f1ce"
integrity sha512-aaXVqvDu6hWjrPoIUDSlMTdHLbWXfx5rlaycQwzevRizdPZRgsncEadvjfA90tB83N3oeVlKJTscLHbyQNO4QQ==
dependencies:
"@insertish/oapi" "0.1.16"
axios "^0.26.1"