mirror of
https://github.com/stoatchat/javascript-client-sdk.git
synced 2026-07-18 08:31:20 -04:00
chore: bump stoat-api to 0.8.9-3
This commit is contained in:
+2
-2
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "stoat.js",
|
||||
"version": "7.3.0",
|
||||
"version": "7.3.1",
|
||||
"type": "module",
|
||||
"exports": {
|
||||
".": "./lib/index.js"
|
||||
@@ -29,7 +29,7 @@
|
||||
"@solid-primitives/map": "^0.7.1",
|
||||
"@solid-primitives/set": "^0.7.1",
|
||||
"@vladfrangu/async_event_emitter": "^2.4.6",
|
||||
"revolt-api": "0.8.9",
|
||||
"stoat-api": "0.8.9-3",
|
||||
"solid-js": "^1.9.6",
|
||||
"ulid": "^2.4.0"
|
||||
},
|
||||
|
||||
Generated
+8
-8
@@ -17,12 +17,12 @@ importers:
|
||||
'@vladfrangu/async_event_emitter':
|
||||
specifier: ^2.4.6
|
||||
version: 2.4.6
|
||||
revolt-api:
|
||||
specifier: 0.8.9
|
||||
version: 0.8.9
|
||||
solid-js:
|
||||
specifier: ^1.9.6
|
||||
version: 1.9.6
|
||||
stoat-api:
|
||||
specifier: 0.8.9-3
|
||||
version: 0.8.9-3
|
||||
ulid:
|
||||
specifier: ^2.4.0
|
||||
version: 2.4.0
|
||||
@@ -905,9 +905,6 @@ packages:
|
||||
resolution: {integrity: sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==}
|
||||
engines: {iojs: '>=1.0.0', node: '>=0.10.0'}
|
||||
|
||||
revolt-api@0.8.9:
|
||||
resolution: {integrity: sha512-+VDJlgj/WBJvuTbkrmTUWjpCAU4DjN50akDdsDonZxy1Xx2eNXCzKDXhxof8wfOwhMU8HtXBFR5NgZvrBW6XZA==}
|
||||
|
||||
router@2.2.0:
|
||||
resolution: {integrity: sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==}
|
||||
engines: {node: '>= 18'}
|
||||
@@ -978,6 +975,9 @@ packages:
|
||||
resolution: {integrity: sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==}
|
||||
engines: {node: '>= 0.8'}
|
||||
|
||||
stoat-api@0.8.9-3:
|
||||
resolution: {integrity: sha512-cuw6+5HUQScBxjtA11bELCCBUaio2eESUfAZHYi9qj29VFlAalJ63GEZKF6U8h1UydqcQ7YNx/Q9TU5D/rWNhA==}
|
||||
|
||||
strip-json-comments@3.1.1:
|
||||
resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==}
|
||||
engines: {node: '>=8'}
|
||||
@@ -1965,8 +1965,6 @@ snapshots:
|
||||
|
||||
reusify@1.1.0: {}
|
||||
|
||||
revolt-api@0.8.9: {}
|
||||
|
||||
router@2.2.0:
|
||||
dependencies:
|
||||
debug: 4.4.0
|
||||
@@ -2062,6 +2060,8 @@ snapshots:
|
||||
|
||||
statuses@2.0.1: {}
|
||||
|
||||
stoat-api@0.8.9-3: {}
|
||||
|
||||
strip-json-comments@3.1.1: {}
|
||||
|
||||
style-to-object@1.0.8:
|
||||
|
||||
+2
-2
@@ -2,8 +2,8 @@ import type { Accessor, Setter } from "solid-js";
|
||||
import { batch, createSignal } from "solid-js";
|
||||
|
||||
import { AsyncEventEmitter } from "@vladfrangu/async_event_emitter";
|
||||
import { API } from "revolt-api";
|
||||
import type { DataLogin, RevoltConfig, Role } from "revolt-api";
|
||||
import { API } from "stoat-api";
|
||||
import type { DataLogin, RevoltConfig, Role } from "stoat-api";
|
||||
|
||||
import type { Channel } from "./classes/Channel.js";
|
||||
import type { Emoji } from "./classes/Emoji.js";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { BannedUser as APIBannedUser } from "revolt-api";
|
||||
import type { BannedUser as APIBannedUser } from "stoat-api";
|
||||
|
||||
import type { Client } from "../Client.js";
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { DataEditBot } from "revolt-api";
|
||||
import type { DataEditBot } from "stoat-api";
|
||||
import { decodeTime } from "ulid";
|
||||
|
||||
import type { BotCollection } from "../collections/BotCollection.js";
|
||||
|
||||
@@ -11,8 +11,8 @@ import type {
|
||||
DataMessageSend,
|
||||
Invite,
|
||||
Override,
|
||||
} from "revolt-api";
|
||||
import type { APIRoutes } from "revolt-api/lib/routes";
|
||||
} from "stoat-api";
|
||||
import type { APIRoutes } from "stoat-api/lib/routes";
|
||||
import { decodeTime, ulid } from "ulid";
|
||||
|
||||
import { ChannelCollection } from "../collections/index.js";
|
||||
@@ -291,7 +291,6 @@ export class Channel {
|
||||
if (
|
||||
!this.lastMessageId ||
|
||||
this.type === "SavedMessages" ||
|
||||
this.type === "VoiceChannel" ||
|
||||
this.#collection.client.options.channelExclusiveMuted(this)
|
||||
)
|
||||
return false;
|
||||
@@ -314,7 +313,7 @@ export class Channel {
|
||||
* Get mentions in this channel for user.
|
||||
*/
|
||||
get mentions(): ReactiveSet<string> | undefined {
|
||||
if (this.type === "SavedMessages" || this.type === "VoiceChannel")
|
||||
if (this.type === "SavedMessages")
|
||||
return undefined;
|
||||
|
||||
return this.#collection.client.channelUnreads.get(this.id)
|
||||
@@ -473,7 +472,7 @@ export class Channel {
|
||||
/**
|
||||
* Delete or leave a channel
|
||||
* @param leaveSilently Whether to not send a message on leave
|
||||
* @requires `DirectMessage`, `Group`, `TextChannel`, `VoiceChannel`
|
||||
* @requires `DirectMessage`, `Group`, `TextChannel`
|
||||
*/
|
||||
async delete(leaveSilently?: boolean): Promise<void> {
|
||||
await this.#collection.client.api.delete(`/channels/${this.id as ""}`, {
|
||||
@@ -694,7 +693,7 @@ export class Channel {
|
||||
|
||||
/**
|
||||
* Create an invite to the channel
|
||||
* @requires `TextChannel`, `VoiceChannel`
|
||||
* @requires `TextChannel`
|
||||
* @returns Newly created invite code
|
||||
*/
|
||||
async createInvite(): Promise<Invite> {
|
||||
@@ -780,7 +779,7 @@ export class Channel {
|
||||
* Set role permissions
|
||||
* @param role_id Role Id, set to 'default' to affect all users
|
||||
* @param permissions Permission value
|
||||
* @requires `Group`, `TextChannel`, `VoiceChannel`
|
||||
* @requires `Group`, `TextChannel`
|
||||
*/
|
||||
async setPermissions(
|
||||
role_id = "default",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { DataEditWebhook } from "revolt-api";
|
||||
import { DataEditWebhook } from "stoat-api";
|
||||
|
||||
import type { ChannelWebhookCollection } from "../collections/ChannelWebhookCollection.js";
|
||||
import { hydrate } from "../hydration/index.js";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { EmojiParent } from "revolt-api";
|
||||
import type { EmojiParent } from "stoat-api";
|
||||
import { decodeTime } from "ulid";
|
||||
|
||||
import type { EmojiCollection } from "../collections/EmojiCollection.js";
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { File as APIFile, Metadata } from "revolt-api";
|
||||
import type { File as APIFile, Metadata } from "stoat-api";
|
||||
|
||||
import type { Client } from "../Client.js";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { Invite } from "revolt-api";
|
||||
import type { Invite } from "stoat-api";
|
||||
|
||||
import type { Client } from "../Client.js";
|
||||
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ import type {
|
||||
MFAResponse,
|
||||
MultiFactorStatus,
|
||||
MFATicket as TicketType,
|
||||
} from "revolt-api";
|
||||
} from "stoat-api";
|
||||
|
||||
import type { Client } from "../Client.js";
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import type {
|
||||
DataEditMessage,
|
||||
DataMessageSend,
|
||||
Masquerade,
|
||||
} from "revolt-api";
|
||||
} from "stoat-api";
|
||||
import { decodeTime } from "ulid";
|
||||
|
||||
import type { Client } from "../Client.js";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { Embed, ImageSize, Special } from "revolt-api";
|
||||
import type { Embed, ImageSize, Special } from "stoat-api";
|
||||
|
||||
import type { Client } from "../Client.js";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { File as APIFile, PublicBot as APIPublicBot } from "revolt-api";
|
||||
import type { File as APIFile, PublicBot as APIPublicBot } from "stoat-api";
|
||||
|
||||
import type { Client } from "../Client.js";
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { batch } from "solid-js";
|
||||
|
||||
import type { Invite, InviteResponse } from "revolt-api";
|
||||
import type { Invite, InviteResponse } from "stoat-api";
|
||||
|
||||
import type { Client } from "../Client.js";
|
||||
import type { ServerFlags } from "../hydration/server.js";
|
||||
|
||||
@@ -15,7 +15,7 @@ import type {
|
||||
Override,
|
||||
OverrideField,
|
||||
Role,
|
||||
} from "revolt-api";
|
||||
} from "stoat-api";
|
||||
import { decodeTime } from "ulid";
|
||||
|
||||
import type { ServerCollection } from "../collections/ServerCollection.js";
|
||||
|
||||
@@ -2,7 +2,7 @@ import type {
|
||||
BannedUser as APIBannedUser,
|
||||
ServerBan as APIServerBan,
|
||||
MemberCompositeKey,
|
||||
} from "revolt-api";
|
||||
} from "stoat-api";
|
||||
|
||||
import type { Client } from "../Client.js";
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import type {
|
||||
DataMemberEdit,
|
||||
MemberCompositeKey,
|
||||
Role,
|
||||
} from "revolt-api";
|
||||
} from "stoat-api";
|
||||
|
||||
import type { ServerMemberCollection } from "../collections/ServerMemberCollection.js";
|
||||
import {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { Role as APIRole, OverrideField } from "revolt-api";
|
||||
import type { Role as APIRole, OverrideField } from "stoat-api";
|
||||
|
||||
import type { Client } from "../Client.js";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { SystemMessage as APISystemMessage } from "revolt-api";
|
||||
import type { SystemMessage as APISystemMessage } from "stoat-api";
|
||||
|
||||
import type { Client } from "../Client.js";
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { User as APIUser, DataEditUser, Presence } from "revolt-api";
|
||||
import type { User as APIUser, DataEditUser, Presence } from "stoat-api";
|
||||
import { decodeTime } from "ulid";
|
||||
|
||||
import type { UserCollection } from "../collections/UserCollection.js";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { UserProfile as APIUserProfile } from "revolt-api";
|
||||
import type { UserProfile as APIUserProfile } from "stoat-api";
|
||||
|
||||
import type { Client } from "../Client.js";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { DataCreateAccount, WebPushSubscription } from "revolt-api";
|
||||
import type { DataCreateAccount, WebPushSubscription } from "stoat-api";
|
||||
|
||||
import type { Client } from "../Client.js";
|
||||
import { MFA } from "../classes/MFA.js";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { batch } from "solid-js";
|
||||
|
||||
import type { Bot as APIBot, OwnedBotsResponse } from "revolt-api";
|
||||
import type { Bot as APIBot, OwnedBotsResponse } from "stoat-api";
|
||||
|
||||
import { Bot } from "../classes/Bot.js";
|
||||
import { PublicBot } from "../classes/PublicBot.js";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { Channel as APIChannel } from "revolt-api";
|
||||
import type { Channel as APIChannel } from "stoat-api";
|
||||
|
||||
import { Channel } from "../classes/Channel.js";
|
||||
import { User } from "../classes/User.js";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { batch } from "solid-js";
|
||||
|
||||
import type { ChannelUnread as APIChannelUnread } from "revolt-api";
|
||||
import type { ChannelUnread as APIChannelUnread } from "stoat-api";
|
||||
|
||||
import { ChannelUnread } from "../classes/ChannelUnread.js";
|
||||
import { Channel } from "../classes/index.js";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { Webhook } from "revolt-api";
|
||||
import type { Webhook } from "stoat-api";
|
||||
|
||||
import { ChannelWebhook } from "../classes/ChannelWebhook.js";
|
||||
import type { HydratedChannelWebhook } from "../hydration/channelWebhook.js";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { Emoji as APIEmoji } from "revolt-api";
|
||||
import type { Emoji as APIEmoji } from "stoat-api";
|
||||
|
||||
import { Emoji } from "../classes/Emoji.js";
|
||||
import type { HydratedEmoji } from "../hydration/emoji.js";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { Message as APIMessage } from "revolt-api";
|
||||
import type { Message as APIMessage } from "stoat-api";
|
||||
|
||||
import { Message } from "../classes/Message.js";
|
||||
import type { HydratedMessage } from "../hydration/message.js";
|
||||
|
||||
@@ -4,7 +4,7 @@ import type {
|
||||
Server as APIServer,
|
||||
Channel,
|
||||
DataCreateServer,
|
||||
} from "revolt-api";
|
||||
} from "stoat-api";
|
||||
|
||||
import { Server } from "../classes/Server.js";
|
||||
import type { HydratedServer } from "../hydration/server.js";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { Member, MemberCompositeKey } from "revolt-api";
|
||||
import type { Member, MemberCompositeKey } from "stoat-api";
|
||||
|
||||
import { ServerMember } from "../classes/ServerMember.js";
|
||||
import type { HydratedServerMember } from "../hydration/serverMember.js";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { batch } from "solid-js";
|
||||
|
||||
import type { SessionInfo } from "revolt-api";
|
||||
import type { SessionInfo } from "stoat-api";
|
||||
|
||||
import { Session } from "../classes/Session.js";
|
||||
import type { HydratedSession } from "../hydration/session.js";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { User as APIUser } from "revolt-api";
|
||||
import type { User as APIUser } from "stoat-api";
|
||||
|
||||
import type { Client } from "../Client.js";
|
||||
import { User } from "../classes/User.js";
|
||||
|
||||
@@ -2,7 +2,7 @@ import type { Accessor, Setter } from "solid-js";
|
||||
import { createSignal } from "solid-js";
|
||||
|
||||
import { AsyncEventEmitter } from "@vladfrangu/async_event_emitter";
|
||||
import type { Error } from "revolt-api";
|
||||
import type { Error } from "stoat-api";
|
||||
|
||||
import type { ProtocolV1 } from "./v1.js";
|
||||
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ import type {
|
||||
Role,
|
||||
Server,
|
||||
User,
|
||||
} from "revolt-api";
|
||||
} from "stoat-api";
|
||||
|
||||
import type { Client } from "../Client.js";
|
||||
import { MessageEmbed } from "../classes/MessageEmbed.js";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { Bot as APIBot } from "revolt-api";
|
||||
import type { Bot as APIBot } from "stoat-api";
|
||||
|
||||
import type { Hydrate } from "./index.js";
|
||||
|
||||
@@ -41,4 +41,4 @@ export const botHydration: Hydrate<APIBot, HydratedBot> = {
|
||||
/**
|
||||
* Flags attributed to users
|
||||
*/
|
||||
export enum BotFlags {}
|
||||
export enum BotFlags { }
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ReactiveSet } from "@solid-primitives/set";
|
||||
import type { Channel as APIChannel, OverrideField } from "revolt-api";
|
||||
import type { Channel as APIChannel, OverrideField } from "stoat-api";
|
||||
|
||||
import type { Client } from "../Client.js";
|
||||
import { File } from "../classes/File.js";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ReactiveSet } from "@solid-primitives/set";
|
||||
import type { ChannelUnread } from "revolt-api";
|
||||
import type { ChannelUnread } from "stoat-api";
|
||||
|
||||
import type { Merge } from "../lib/merge.js";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { Webhook } from "revolt-api";
|
||||
import type { Webhook } from "stoat-api";
|
||||
|
||||
import type { Client } from "../Client.js";
|
||||
import { File } from "../classes/File.js";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { Emoji as APIEmoji, EmojiParent } from "revolt-api";
|
||||
import type { Emoji as APIEmoji, EmojiParent } from "stoat-api";
|
||||
|
||||
import type { Merge } from "../lib/merge.js";
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { ReactiveMap } from "@solid-primitives/map";
|
||||
import { ReactiveSet } from "@solid-primitives/set";
|
||||
import type { Interactions, Masquerade, Message } from "revolt-api";
|
||||
import type { Interactions, Masquerade, Message } from "stoat-api";
|
||||
|
||||
import type { Client } from "../Client.js";
|
||||
import { File } from "../classes/File.js";
|
||||
|
||||
@@ -4,7 +4,7 @@ import type {
|
||||
Server as APIServer,
|
||||
Category,
|
||||
SystemMessageChannels,
|
||||
} from "revolt-api";
|
||||
} from "stoat-api";
|
||||
|
||||
import type { Client } from "../Client.js";
|
||||
import { File } from "../classes/File.js";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { Member as APIMember, MemberCompositeKey } from "revolt-api";
|
||||
import type { Member as APIMember, MemberCompositeKey } from "stoat-api";
|
||||
|
||||
import type { Client } from "../Client.js";
|
||||
import { File } from "../classes/File.js";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { SessionInfo as APISession } from "revolt-api";
|
||||
import type { SessionInfo as APISession } from "stoat-api";
|
||||
|
||||
import type { Hydrate } from "./index.js";
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import type {
|
||||
BotInformation,
|
||||
RelationshipStatus,
|
||||
UserStatus,
|
||||
} from "revolt-api";
|
||||
} from "stoat-api";
|
||||
|
||||
import type { Client } from "../Client.js";
|
||||
import { File } from "../classes/File.js";
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
export * as API from "revolt-api";
|
||||
export * as API from "stoat-api";
|
||||
export { Client } from "./Client.js";
|
||||
export type { ClientOptions, Session as PrivateSession } from "./Client.js";
|
||||
export * from "./classes/index.js";
|
||||
|
||||
@@ -99,8 +99,7 @@ export function calculatePermission(
|
||||
return target.permissions ?? DEFAULT_PERMISSION_DIRECT_MESSAGE;
|
||||
}
|
||||
}
|
||||
case "TextChannel":
|
||||
case "VoiceChannel": {
|
||||
case "TextChannel": {
|
||||
// 2. Get server.
|
||||
const server = target.server;
|
||||
if (typeof server === "undefined") return 0;
|
||||
|
||||
Reference in New Issue
Block a user