The websocket manager events.

Hierarchy

  • WSManagerEvents

Properties

disconnect: [ws: WebsocketManager]

Emitted when the Websocket is disconnected.

event: [event: "BotServerMembershipCreated", data: {
    createdBy: string;
    server: APIServer;
}] | [event: "BotServerMembershipDeleted", data: {
    deletedBy: string;
    server: APIServer;
}] | [event: "ChatMessageCreated", data: {
    message: APIMessage;
    serverId: string;
}] | [event: "ChatMessageUpdated", data: {
    message: APIMessage;
    serverId: string;
}] | [event: "ChatMessageDeleted", data: {
    message: APIMessageSummary;
    serverId: string;
}] | [event: "ServerMemberJoined", data: {
    member: APIServerMember;
    serverId: string;
}] | [event: "ServerMemberRemoved", data: {
    isBan?: boolean;
    isKick?: boolean;
    serverId: string;
    userId: string;
}] | [event: "ServerMemberBanned", data: {
    serverId: string;
    serverMemberBan: APIServerBan;
}] | [event: "ServerMemberUnbanned", data: {
    serverId: string;
    serverMemberBan: APIServerBan;
}] | [event: "ServerMemberUpdated", data: {
    serverId: string;
    userInfo: {
        id: string;
        nickname?: string;
    };
}] | [event: "ServerRolesUpdated", data: {
    memberRoleIds: {
        roleIds: number[];
        userId: string;
    }[];
    serverId: string;
}] | [event: "ServerChannelCreated", data: {
    channel: APIChannel;
    serverId: string;
}] | [event: "ServerChannelUpdated", data: {
    channel: APIChannel;
    serverId: string;
}] | [event: "ServerChannelDeleted", data: {
    channel: APIChannel;
    serverId: string;
}] | [event: "ServerWebhookCreated", data: {
    serverId: string;
    webhook: APIWebhook;
}] | [event: "ServerWebhookUpdated", data: {
    serverId: string;
    webhook: APIWebhook;
}] | [event: "DocCreated", data: {
    doc: APIDoc;
    serverId: string;
}] | [event: "DocUpdated", data: {
    doc: APIDoc;
    serverId: string;
}] | [event: "DocDeleted", data: {
    doc: APIDoc;
    serverId: string;
}] | [event: "CalendarEventCreated", data: {
    calendarEvent: APICalendarEvent;
    serverId: string;
}] | [event: "CalendarEventUpdated", data: {
    calendarEvent: APICalendarEvent;
    serverId: string;
}] | [event: "CalendarEventDeleted", data: {
    calendarEvent: APICalendarEvent;
    serverId: string;
}] | [event: "ForumTopicCreated", data: {
    forumTopic: APIForumTopic;
    serverId: string;
}] | [event: "ForumTopicUpdated", data: {
    forumTopic: APIForumTopic;
    serverId: string;
}] | [event: "ForumTopicDeleted", data: {
    forumTopic: APIForumTopic;
    serverId: string;
}] | [event: "ForumTopicPinned", data: {
    forumTopic: APIForumTopic;
    serverId: string;
}] | [event: "ForumTopicUnpinned", data: {
    forumTopic: APIForumTopic;
    serverId: string;
}] | [event: "ForumTopicLocked", data: {
    forumTopic: APIForumTopic;
    serverId: string;
}] | [event: "ForumTopicUnlocked", data: {
    forumTopic: APIForumTopic;
    serverId: string;
}] | [event: "CalendarEventRsvpUpdated", data: {
    calendarEventRsvp: APICalendarEventRsvp;
    serverId: string;
}] | [event: "CalendarEventRsvpManyUpdated", data: {
    calendarEventRsvps: APICalendarEventRsvp[];
    serverId: string;
}] | [event: "CalendarEventRsvpDeleted", data: {
    calendarEventRsvp: APICalendarEventRsvp;
    serverId: string;
}] | [event: "ListItemCreated", data: {
    listItem: APIListItem;
    serverId: string;
}] | [event: "ListItemUpdated", data: {
    listItem: APIListItem;
    serverId: string;
}] | [event: "ListItemDeleted", data: {
    listItem: APIListItem;
    serverId: string;
}] | [event: "ListItemCompleted", data: {
    listItem: APIListItem;
    serverId: string;
}] | [event: "ListItemUncompleted", data: {
    listItem: APIListItem;
    serverId: string;
}] | [event: "ChannelMessageReactionCreated", data: {
    reaction: APIMessageReaction;
    serverId?: string;
}] | [event: "ChannelMessageReactionDeleted", data: {
    reaction: APIMessageReaction;
    serverId?: string;
}]

Emitted when data is received from the Websocket API.

raw: [data: WSMessagePayload]

Emitted when a message is received.

ready: [user: APIClientUser]

Emitted when the Websocket is connected.

reconnect: [ws: WebsocketManager]

Emitted when the Websocket is reconnected.