Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

revolt.js

Package Overview
Dependencies
Maintainers
1
Versions
270
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

revolt.js - npm Package Compare versions

Comparing version 6.0.18 to 6.0.19

3

dist/Client.d.ts

@@ -83,2 +83,5 @@ import EventEmitter from "eventemitter3";

];
export declare type Session = {
token: string;
};
export declare class Client extends EventEmitter {

@@ -85,0 +88,0 @@ heartbeat: number;

@@ -70,2 +70,3 @@ "use strict";

this.heartbeat = this.options.heartbeat;
this.proxyFile = this.proxyFile.bind(this);
}

@@ -72,0 +73,0 @@ /**

@@ -103,2 +103,3 @@ import type { Channel as ChannelI, DataCreateGroup, DataEditChannel, DataMessageSend, FieldsChannel, OptionsMessageSearch } from "revolt-api";

* Get the last message ID if it is present or the origin timestamp.
* TODO: deprecate
*/

@@ -120,2 +121,6 @@ get last_message_id_or_past(): string;

/**
* Get timestamp when this channel last had a message sent or when it was created
*/
get updatedAt(): number;
/**
* Absolute pathname to this channel in the client.

@@ -122,0 +127,0 @@ */

@@ -177,2 +177,3 @@ "use strict";

* Get the last message ID if it is present or the origin timestamp.
* TODO: deprecate
*/

@@ -204,2 +205,8 @@ get last_message_id_or_past() {

/**
* Get timestamp when this channel last had a message sent or when it was created
*/
get updatedAt() {
return this.last_message_id ? (0, ulid_1.decodeTime)(this.last_message_id) : this.createdAt;
}
/**
* Absolute pathname to this channel in the client.

@@ -206,0 +213,0 @@ */

@@ -106,3 +106,3 @@ import type { DataMemberEdit, FieldsMember, Member as MemberI, MemberCompositeKey } from "revolt-api";

*/
get hoistedRole(): [string, {
get hoistedRole(): {
name: string;

@@ -116,4 +116,9 @@ permissions: {

rank?: number | undefined;
}] | null;
id: string;
} | null;
/**
* Get this member's current role colour.
*/
get roleColour(): string | null | undefined;
/**
* Get this member's ranking.

@@ -124,2 +129,10 @@ * Smaller values are ranked as higher priotity.

/**
* Get a pre-configured avatar URL of a member
*/
get avatarURL(): string | undefined;
/**
* Get a pre-configured animated avatar URL of a member
*/
get animatedAvatarURL(): string | undefined;
/**
* Generate URL to this member's avatar

@@ -126,0 +139,0 @@ * @param args File parameters

@@ -176,3 +176,4 @@ "use strict";

if (roles.length > 0) {
return roles[roles.length - 1];
const [id, role] = roles[roles.length - 1];
return Object.assign({ id }, role);
}

@@ -184,2 +185,14 @@ else {

/**
* Get this member's current role colour.
*/
get roleColour() {
const roles = this.orderedRoles.filter((x) => x[1].colour);
if (roles.length > 0) {
return roles[roles.length - 1][1].colour;
}
else {
return null;
}
}
/**
* Get this member's ranking.

@@ -202,2 +215,16 @@ * Smaller values are ranked as higher priotity.

/**
* Get a pre-configured avatar URL of a member
*/
get avatarURL() {
var _a, _b;
return (_a = this.generateAvatarURL({ max_side: 256 })) !== null && _a !== void 0 ? _a : (_b = this.user) === null || _b === void 0 ? void 0 : _b.avatarURL;
}
/**
* Get a pre-configured animated avatar URL of a member
*/
get animatedAvatarURL() {
var _a, _b;
return (_a = this.generateAvatarURL({ max_side: 256 }, true)) !== null && _a !== void 0 ? _a : (_b = this.user) === null || _b === void 0 ? void 0 : _b.animatedAvatarURL;
}
/**
* Generate URL to this member's avatar

@@ -248,2 +275,5 @@ * @param args File parameters

mobx_1.computed
], Member.prototype, "roleColour", null);
__decorate([
mobx_1.computed
], Member.prototype, "ranking", null);

@@ -250,0 +280,0 @@ __decorate([

@@ -39,2 +39,18 @@ import type { DataEditMessage, DataMessageSend, Embed, Interactions, Masquerade, Message as MessageI, SystemMessage } from "revolt-api";

get url(): string;
/**
* Get the username for this message.
*/
get username(): string | undefined;
/**
* Get the role colour for this message.
*/
get roleColour(): string | null | undefined;
/**
* Get the avatar URL for this message.
*/
get avatarURL(): string | undefined;
/**
* Get the animated avatar URL for this message.
*/
get animatedAvatarURL(): string | undefined;
generateMasqAvatarURL(): string | undefined;

@@ -185,3 +201,3 @@ get asSystemMessage(): {

type: "Twitch";
content_type: "Video" | "Channel" | "Clip";
content_type: "Channel" | "Video" | "Clip";
id: string;

@@ -188,0 +204,0 @@ } | {

@@ -92,2 +92,34 @@ "use strict";

}
/**
* Get the username for this message.
*/
get username() {
var _a, _b, _c, _d, _e;
return (_d = (_b = (_a = this.masquerade) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : (_c = this.member) === null || _c === void 0 ? void 0 : _c.nickname) !== null && _d !== void 0 ? _d : (_e = this.author) === null || _e === void 0 ? void 0 : _e.username;
}
/**
* Get the role colour for this message.
*/
get roleColour() {
var _a, _b, _c;
return (_b = (_a = this.masquerade) === null || _a === void 0 ? void 0 : _a.colour) !== null && _b !== void 0 ? _b : (_c = this.member) === null || _c === void 0 ? void 0 : _c.roleColour;
}
/**
* Get the avatar URL for this message.
*/
get avatarURL() {
var _a, _b, _c;
return (_a = this.generateMasqAvatarURL()) !== null && _a !== void 0 ? _a : (this.member
? (_b = this.member) === null || _b === void 0 ? void 0 : _b.avatarURL
: (_c = this.author) === null || _c === void 0 ? void 0 : _c.avatarURL);
}
/**
* Get the animated avatar URL for this message.
*/
get animatedAvatarURL() {
var _a, _b, _c;
return (_a = this.generateMasqAvatarURL()) !== null && _a !== void 0 ? _a : (this.member
? (_b = this.member) === null || _b === void 0 ? void 0 : _b.animatedAvatarURL
: (_c = this.author) === null || _c === void 0 ? void 0 : _c.animatedAvatarURL);
}
generateMasqAvatarURL() {

@@ -94,0 +126,0 @@ var _a;

4

dist/maps/Servers.d.ts

@@ -358,3 +358,3 @@ import type { Category, Channel as ChannelI, DataBanCreate, DataCreateChannel, DataCreateServer, DataEditRole, DataEditServer, FieldsServer, Role, Server as ServerI, SystemMessageChannels } from "revolt-api";

_id: string;
status: "Blocked" | "None" | "User" | "Friend" | "Outgoing" | "Incoming" | "BlockedOther";
status: "User" | "None" | "Friend" | "Outgoing" | "Incoming" | "Blocked" | "BlockedOther";
}[] | null | undefined;

@@ -402,3 +402,3 @@ badges?: number | null | undefined;

} | null | undefined;
relationship?: "Blocked" | "None" | "User" | "Friend" | "Outgoing" | "Incoming" | "BlockedOther" | null | undefined;
relationship?: "User" | "None" | "Friend" | "Outgoing" | "Incoming" | "Blocked" | "BlockedOther" | null | undefined;
online?: boolean | null | undefined;

@@ -405,0 +405,0 @@ } | {

@@ -90,2 +90,3 @@ "use strict";

const elements = [];
let defaultCategory;
if (this.categories) {

@@ -99,10 +100,27 @@ for (const category of this.categories) {

}
elements.push(Object.assign(Object.assign({}, category), { channels }));
const cat = Object.assign(Object.assign({}, category), { channels });
if (cat.id === 'default') {
if (channels.length === 0)
continue;
defaultCategory = cat;
}
elements.push(cat);
}
}
elements.unshift({
id: "default",
title: "Default",
channels: [...uncategorised].map((key) => this.client.channels.get(key)),
});
if (uncategorised.size > 0) {
const channels = [...uncategorised].map((key) => this.client.channels.get(key));
if (defaultCategory) {
defaultCategory.channels = [
...defaultCategory.channels,
...channels
];
}
else {
elements.unshift({
id: "default",
title: "Default",
channels,
});
}
}
return elements;

@@ -109,0 +127,0 @@ }

@@ -65,3 +65,3 @@ import type { BotInformation, UserStatus, User as UserI, RelationshipStatus, FieldsUser, DataEditUser } from "revolt-api";

_id: string;
status: "Blocked" | "None" | "User" | "Friend" | "Outgoing" | "Incoming" | "BlockedOther";
status: "User" | "None" | "Friend" | "Outgoing" | "Incoming" | "Blocked" | "BlockedOther";
}[] | null | undefined;

@@ -109,3 +109,3 @@ badges?: number | null | undefined;

} | null | undefined;
relationship?: "Blocked" | "None" | "User" | "Friend" | "Outgoing" | "Incoming" | "BlockedOther" | null | undefined;
relationship?: "User" | "None" | "Friend" | "Outgoing" | "Incoming" | "Blocked" | "BlockedOther" | null | undefined;
online?: boolean | null | undefined;

@@ -149,3 +149,3 @@ }>;

_id: string;
status: "Blocked" | "None" | "User" | "Friend" | "Outgoing" | "Incoming" | "BlockedOther";
status: "User" | "None" | "Friend" | "Outgoing" | "Incoming" | "Blocked" | "BlockedOther";
}[] | null | undefined;

@@ -193,3 +193,3 @@ badges?: number | null | undefined;

} | null | undefined;
relationship?: "Blocked" | "None" | "User" | "Friend" | "Outgoing" | "Incoming" | "BlockedOther" | null | undefined;
relationship?: "User" | "None" | "Friend" | "Outgoing" | "Incoming" | "Blocked" | "BlockedOther" | null | undefined;
online?: boolean | null | undefined;

@@ -233,3 +233,3 @@ }>;

_id: string;
status: "Blocked" | "None" | "User" | "Friend" | "Outgoing" | "Incoming" | "BlockedOther";
status: "User" | "None" | "Friend" | "Outgoing" | "Incoming" | "Blocked" | "BlockedOther";
}[] | null | undefined;

@@ -277,3 +277,3 @@ badges?: number | null | undefined;

} | null | undefined;
relationship?: "Blocked" | "None" | "User" | "Friend" | "Outgoing" | "Incoming" | "BlockedOther" | null | undefined;
relationship?: "User" | "None" | "Friend" | "Outgoing" | "Incoming" | "Blocked" | "BlockedOther" | null | undefined;
online?: boolean | null | undefined;

@@ -317,3 +317,3 @@ }>;

_id: string;
status: "Blocked" | "None" | "User" | "Friend" | "Outgoing" | "Incoming" | "BlockedOther";
status: "User" | "None" | "Friend" | "Outgoing" | "Incoming" | "Blocked" | "BlockedOther";
}[] | null | undefined;

@@ -361,3 +361,3 @@ badges?: number | null | undefined;

} | null | undefined;
relationship?: "Blocked" | "None" | "User" | "Friend" | "Outgoing" | "Incoming" | "BlockedOther" | null | undefined;
relationship?: "User" | "None" | "Friend" | "Outgoing" | "Incoming" | "Blocked" | "BlockedOther" | null | undefined;
online?: boolean | null | undefined;

@@ -412,2 +412,10 @@ }>;

get defaultAvatarURL(): string;
/**
* Get a pre-configured avatar URL of a user
*/
get avatarURL(): string;
/**
* Get a pre-configured animated avatar URL of a user
*/
get animatedAvatarURL(): string;
generateAvatarURL(...args: FileArgs): string;

@@ -475,3 +483,3 @@ get permission(): number;

_id: string;
status: "Blocked" | "None" | "User" | "Friend" | "Outgoing" | "Incoming" | "BlockedOther";
status: "User" | "None" | "Friend" | "Outgoing" | "Incoming" | "Blocked" | "BlockedOther";
}[] | null | undefined;

@@ -519,5 +527,5 @@ badges?: number | null | undefined;

} | null | undefined;
relationship?: "Blocked" | "None" | "User" | "Friend" | "Outgoing" | "Incoming" | "BlockedOther" | null | undefined;
relationship?: "User" | "None" | "Friend" | "Outgoing" | "Incoming" | "Blocked" | "BlockedOther" | null | undefined;
online?: boolean | null | undefined;
}>;
}

@@ -165,2 +165,14 @@ "use strict";

}
/**
* Get a pre-configured avatar URL of a user
*/
get avatarURL() {
return this.generateAvatarURL({ max_side: 256 });
}
/**
* Get a pre-configured animated avatar URL of a user
*/
get animatedAvatarURL() {
return this.generateAvatarURL({ max_side: 256 }, true);
}
generateAvatarURL(...args) {

@@ -167,0 +179,0 @@ var _a, _b;

@@ -66,3 +66,3 @@ /**

/**
* Permissions in direct message channel
* Permissions in direct message channels / default permissions for group DMs
*/

@@ -69,0 +69,0 @@ export declare const DEFAULT_PERMISSION_DIRECT_MESSAGE: number;

@@ -115,8 +115,8 @@ "use strict";

/**
* Permissions in direct message channel
* Permissions in direct message channels / default permissions for group DMs
*/
exports.DEFAULT_PERMISSION_DIRECT_MESSAGE = exports.DEFAULT_PERMISSION + exports.Permission.ManageChannel;
exports.DEFAULT_PERMISSION_DIRECT_MESSAGE = exports.DEFAULT_PERMISSION + exports.Permission.React + exports.Permission.ManageChannel;
/**
* Permissions in server text / voice channel
*/
exports.DEFAULT_PERMISSION_SERVER = exports.DEFAULT_PERMISSION + exports.Permission.ChangeNickname + exports.Permission.ChangeAvatar;
exports.DEFAULT_PERMISSION_SERVER = exports.DEFAULT_PERMISSION + exports.Permission.React + exports.Permission.ChangeNickname + exports.Permission.ChangeAvatar;

@@ -28,4 +28,4 @@ "use strict";

const exponential_backoff_1 = require("@insertish/exponential-backoff");
const mobx_1 = require("mobx");
const isomorphic_ws_1 = __importDefault(require("@insertish/isomorphic-ws"));
const mobx_1 = require("mobx");
class WebSocketClient {

@@ -32,0 +32,0 @@ constructor(client) {

@@ -5,2 +5,3 @@ import type { Emoji, FieldsChannel, FieldsMember, FieldsServer, FieldsUser } from "revolt-api";

import type { RelationshipStatus, User } from "revolt-api";
import type { Session } from "../Client";
declare type WebSocketError = {

@@ -7,0 +8,0 @@ error: "InternalError" | "InvalidSession" | "OnboardingNotFinished" | "AlreadyAuthenticated";

@@ -83,2 +83,5 @@ import EventEmitter from "eventemitter3";

];
export declare type Session = {
token: string;
};
export declare class Client extends EventEmitter {

@@ -85,0 +88,0 @@ heartbeat: number;

@@ -64,2 +64,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

this.heartbeat = this.options.heartbeat;
this.proxyFile = this.proxyFile.bind(this);
}

@@ -66,0 +67,0 @@ /**

@@ -103,2 +103,3 @@ import type { Channel as ChannelI, DataCreateGroup, DataEditChannel, DataMessageSend, FieldsChannel, OptionsMessageSearch } from "revolt-api";

* Get the last message ID if it is present or the origin timestamp.
* TODO: deprecate
*/

@@ -120,2 +121,6 @@ get last_message_id_or_past(): string;

/**
* Get timestamp when this channel last had a message sent or when it was created
*/
get updatedAt(): number;
/**
* Absolute pathname to this channel in the client.

@@ -122,0 +127,0 @@ */

@@ -171,2 +171,3 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

* Get the last message ID if it is present or the origin timestamp.
* TODO: deprecate
*/

@@ -198,2 +199,8 @@ get last_message_id_or_past() {

/**
* Get timestamp when this channel last had a message sent or when it was created
*/
get updatedAt() {
return this.last_message_id ? decodeTime(this.last_message_id) : this.createdAt;
}
/**
* Absolute pathname to this channel in the client.

@@ -200,0 +207,0 @@ */

@@ -106,3 +106,3 @@ import type { DataMemberEdit, FieldsMember, Member as MemberI, MemberCompositeKey } from "revolt-api";

*/
get hoistedRole(): [string, {
get hoistedRole(): {
name: string;

@@ -116,4 +116,9 @@ permissions: {

rank?: number | undefined;
}] | null;
id: string;
} | null;
/**
* Get this member's current role colour.
*/
get roleColour(): string | null | undefined;
/**
* Get this member's ranking.

@@ -124,2 +129,10 @@ * Smaller values are ranked as higher priotity.

/**
* Get a pre-configured avatar URL of a member
*/
get avatarURL(): string | undefined;
/**
* Get a pre-configured animated avatar URL of a member
*/
get animatedAvatarURL(): string | undefined;
/**
* Generate URL to this member's avatar

@@ -126,0 +139,0 @@ * @param args File parameters

@@ -170,3 +170,4 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

if (roles.length > 0) {
return roles[roles.length - 1];
const [id, role] = roles[roles.length - 1];
return Object.assign({ id }, role);
}

@@ -178,2 +179,14 @@ else {

/**
* Get this member's current role colour.
*/
get roleColour() {
const roles = this.orderedRoles.filter((x) => x[1].colour);
if (roles.length > 0) {
return roles[roles.length - 1][1].colour;
}
else {
return null;
}
}
/**
* Get this member's ranking.

@@ -196,2 +209,16 @@ * Smaller values are ranked as higher priotity.

/**
* Get a pre-configured avatar URL of a member
*/
get avatarURL() {
var _a, _b;
return (_a = this.generateAvatarURL({ max_side: 256 })) !== null && _a !== void 0 ? _a : (_b = this.user) === null || _b === void 0 ? void 0 : _b.avatarURL;
}
/**
* Get a pre-configured animated avatar URL of a member
*/
get animatedAvatarURL() {
var _a, _b;
return (_a = this.generateAvatarURL({ max_side: 256 }, true)) !== null && _a !== void 0 ? _a : (_b = this.user) === null || _b === void 0 ? void 0 : _b.animatedAvatarURL;
}
/**
* Generate URL to this member's avatar

@@ -242,2 +269,5 @@ * @param args File parameters

computed
], Member.prototype, "roleColour", null);
__decorate([
computed
], Member.prototype, "ranking", null);

@@ -244,0 +274,0 @@ __decorate([

@@ -39,2 +39,18 @@ import type { DataEditMessage, DataMessageSend, Embed, Interactions, Masquerade, Message as MessageI, SystemMessage } from "revolt-api";

get url(): string;
/**
* Get the username for this message.
*/
get username(): string | undefined;
/**
* Get the role colour for this message.
*/
get roleColour(): string | null | undefined;
/**
* Get the avatar URL for this message.
*/
get avatarURL(): string | undefined;
/**
* Get the animated avatar URL for this message.
*/
get animatedAvatarURL(): string | undefined;
generateMasqAvatarURL(): string | undefined;

@@ -185,3 +201,3 @@ get asSystemMessage(): {

type: "Twitch";
content_type: "Video" | "Channel" | "Clip";
content_type: "Channel" | "Video" | "Clip";
id: string;

@@ -188,0 +204,0 @@ } | {

@@ -86,2 +86,34 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

}
/**
* Get the username for this message.
*/
get username() {
var _a, _b, _c, _d, _e;
return (_d = (_b = (_a = this.masquerade) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : (_c = this.member) === null || _c === void 0 ? void 0 : _c.nickname) !== null && _d !== void 0 ? _d : (_e = this.author) === null || _e === void 0 ? void 0 : _e.username;
}
/**
* Get the role colour for this message.
*/
get roleColour() {
var _a, _b, _c;
return (_b = (_a = this.masquerade) === null || _a === void 0 ? void 0 : _a.colour) !== null && _b !== void 0 ? _b : (_c = this.member) === null || _c === void 0 ? void 0 : _c.roleColour;
}
/**
* Get the avatar URL for this message.
*/
get avatarURL() {
var _a, _b, _c;
return (_a = this.generateMasqAvatarURL()) !== null && _a !== void 0 ? _a : (this.member
? (_b = this.member) === null || _b === void 0 ? void 0 : _b.avatarURL
: (_c = this.author) === null || _c === void 0 ? void 0 : _c.avatarURL);
}
/**
* Get the animated avatar URL for this message.
*/
get animatedAvatarURL() {
var _a, _b, _c;
return (_a = this.generateMasqAvatarURL()) !== null && _a !== void 0 ? _a : (this.member
? (_b = this.member) === null || _b === void 0 ? void 0 : _b.animatedAvatarURL
: (_c = this.author) === null || _c === void 0 ? void 0 : _c.animatedAvatarURL);
}
generateMasqAvatarURL() {

@@ -88,0 +120,0 @@ var _a;

@@ -358,3 +358,3 @@ import type { Category, Channel as ChannelI, DataBanCreate, DataCreateChannel, DataCreateServer, DataEditRole, DataEditServer, FieldsServer, Role, Server as ServerI, SystemMessageChannels } from "revolt-api";

_id: string;
status: "Blocked" | "None" | "User" | "Friend" | "Outgoing" | "Incoming" | "BlockedOther";
status: "User" | "None" | "Friend" | "Outgoing" | "Incoming" | "Blocked" | "BlockedOther";
}[] | null | undefined;

@@ -402,3 +402,3 @@ badges?: number | null | undefined;

} | null | undefined;
relationship?: "Blocked" | "None" | "User" | "Friend" | "Outgoing" | "Incoming" | "BlockedOther" | null | undefined;
relationship?: "User" | "None" | "Friend" | "Outgoing" | "Incoming" | "Blocked" | "BlockedOther" | null | undefined;
online?: boolean | null | undefined;

@@ -405,0 +405,0 @@ } | {

@@ -84,2 +84,3 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

const elements = [];
let defaultCategory;
if (this.categories) {

@@ -93,10 +94,27 @@ for (const category of this.categories) {

}
elements.push(Object.assign(Object.assign({}, category), { channels }));
const cat = Object.assign(Object.assign({}, category), { channels });
if (cat.id === 'default') {
if (channels.length === 0)
continue;
defaultCategory = cat;
}
elements.push(cat);
}
}
elements.unshift({
id: "default",
title: "Default",
channels: [...uncategorised].map((key) => this.client.channels.get(key)),
});
if (uncategorised.size > 0) {
const channels = [...uncategorised].map((key) => this.client.channels.get(key));
if (defaultCategory) {
defaultCategory.channels = [
...defaultCategory.channels,
...channels
];
}
else {
elements.unshift({
id: "default",
title: "Default",
channels,
});
}
}
return elements;

@@ -103,0 +121,0 @@ }

@@ -65,3 +65,3 @@ import type { BotInformation, UserStatus, User as UserI, RelationshipStatus, FieldsUser, DataEditUser } from "revolt-api";

_id: string;
status: "Blocked" | "None" | "User" | "Friend" | "Outgoing" | "Incoming" | "BlockedOther";
status: "User" | "None" | "Friend" | "Outgoing" | "Incoming" | "Blocked" | "BlockedOther";
}[] | null | undefined;

@@ -109,3 +109,3 @@ badges?: number | null | undefined;

} | null | undefined;
relationship?: "Blocked" | "None" | "User" | "Friend" | "Outgoing" | "Incoming" | "BlockedOther" | null | undefined;
relationship?: "User" | "None" | "Friend" | "Outgoing" | "Incoming" | "Blocked" | "BlockedOther" | null | undefined;
online?: boolean | null | undefined;

@@ -149,3 +149,3 @@ }>;

_id: string;
status: "Blocked" | "None" | "User" | "Friend" | "Outgoing" | "Incoming" | "BlockedOther";
status: "User" | "None" | "Friend" | "Outgoing" | "Incoming" | "Blocked" | "BlockedOther";
}[] | null | undefined;

@@ -193,3 +193,3 @@ badges?: number | null | undefined;

} | null | undefined;
relationship?: "Blocked" | "None" | "User" | "Friend" | "Outgoing" | "Incoming" | "BlockedOther" | null | undefined;
relationship?: "User" | "None" | "Friend" | "Outgoing" | "Incoming" | "Blocked" | "BlockedOther" | null | undefined;
online?: boolean | null | undefined;

@@ -233,3 +233,3 @@ }>;

_id: string;
status: "Blocked" | "None" | "User" | "Friend" | "Outgoing" | "Incoming" | "BlockedOther";
status: "User" | "None" | "Friend" | "Outgoing" | "Incoming" | "Blocked" | "BlockedOther";
}[] | null | undefined;

@@ -277,3 +277,3 @@ badges?: number | null | undefined;

} | null | undefined;
relationship?: "Blocked" | "None" | "User" | "Friend" | "Outgoing" | "Incoming" | "BlockedOther" | null | undefined;
relationship?: "User" | "None" | "Friend" | "Outgoing" | "Incoming" | "Blocked" | "BlockedOther" | null | undefined;
online?: boolean | null | undefined;

@@ -317,3 +317,3 @@ }>;

_id: string;
status: "Blocked" | "None" | "User" | "Friend" | "Outgoing" | "Incoming" | "BlockedOther";
status: "User" | "None" | "Friend" | "Outgoing" | "Incoming" | "Blocked" | "BlockedOther";
}[] | null | undefined;

@@ -361,3 +361,3 @@ badges?: number | null | undefined;

} | null | undefined;
relationship?: "Blocked" | "None" | "User" | "Friend" | "Outgoing" | "Incoming" | "BlockedOther" | null | undefined;
relationship?: "User" | "None" | "Friend" | "Outgoing" | "Incoming" | "Blocked" | "BlockedOther" | null | undefined;
online?: boolean | null | undefined;

@@ -412,2 +412,10 @@ }>;

get defaultAvatarURL(): string;
/**
* Get a pre-configured avatar URL of a user
*/
get avatarURL(): string;
/**
* Get a pre-configured animated avatar URL of a user
*/
get animatedAvatarURL(): string;
generateAvatarURL(...args: FileArgs): string;

@@ -475,3 +483,3 @@ get permission(): number;

_id: string;
status: "Blocked" | "None" | "User" | "Friend" | "Outgoing" | "Incoming" | "BlockedOther";
status: "User" | "None" | "Friend" | "Outgoing" | "Incoming" | "Blocked" | "BlockedOther";
}[] | null | undefined;

@@ -519,5 +527,5 @@ badges?: number | null | undefined;

} | null | undefined;
relationship?: "Blocked" | "None" | "User" | "Friend" | "Outgoing" | "Incoming" | "BlockedOther" | null | undefined;
relationship?: "User" | "None" | "Friend" | "Outgoing" | "Incoming" | "Blocked" | "BlockedOther" | null | undefined;
online?: boolean | null | undefined;
}>;
}

@@ -159,2 +159,14 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

}
/**
* Get a pre-configured avatar URL of a user
*/
get avatarURL() {
return this.generateAvatarURL({ max_side: 256 });
}
/**
* Get a pre-configured animated avatar URL of a user
*/
get animatedAvatarURL() {
return this.generateAvatarURL({ max_side: 256 }, true);
}
generateAvatarURL(...args) {

@@ -161,0 +173,0 @@ var _a, _b;

@@ -66,3 +66,3 @@ /**

/**
* Permissions in direct message channel
* Permissions in direct message channels / default permissions for group DMs
*/

@@ -69,0 +69,0 @@ export declare const DEFAULT_PERMISSION_DIRECT_MESSAGE: number;

@@ -112,8 +112,8 @@ /**

/**
* Permissions in direct message channel
* Permissions in direct message channels / default permissions for group DMs
*/
export const DEFAULT_PERMISSION_DIRECT_MESSAGE = DEFAULT_PERMISSION + Permission.ManageChannel;
export const DEFAULT_PERMISSION_DIRECT_MESSAGE = DEFAULT_PERMISSION + Permission.React + Permission.ManageChannel;
/**
* Permissions in server text / voice channel
*/
export const DEFAULT_PERMISSION_SERVER = DEFAULT_PERMISSION + Permission.ChangeNickname + Permission.ChangeAvatar;
export const DEFAULT_PERMISSION_SERVER = DEFAULT_PERMISSION + Permission.React + Permission.ChangeNickname + Permission.ChangeAvatar;

@@ -22,4 +22,4 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

import { backOff } from "@insertish/exponential-backoff";
import { ObservableSet, runInAction } from "mobx";
import WebSocket from "@insertish/isomorphic-ws";
import { ObservableSet, runInAction } from "mobx";
export class WebSocketClient {

@@ -26,0 +26,0 @@ constructor(client) {

@@ -5,2 +5,3 @@ import type { Emoji, FieldsChannel, FieldsMember, FieldsServer, FieldsUser } from "revolt-api";

import type { RelationshipStatus, User } from "revolt-api";
import type { Session } from "../Client";
declare type WebSocketError = {

@@ -7,0 +8,0 @@ error: "InternalError" | "InvalidSession" | "OnboardingNotFinished" | "AlreadyAuthenticated";

{
"name": "revolt.js",
"version": "6.0.18",
"version": "6.0.19",
"main": "dist/index.js",

@@ -20,3 +20,3 @@ "typings": "dist/index.d.ts",

"mobx": "^6.3.2",
"revolt-api": "0.5.5-4",
"revolt-api": "0.5.5-5",
"ulid": "^2.3.0",

@@ -23,0 +23,0 @@ "ws": "^8.2.2"

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc