hoshii / Exports / GatewayHandler

GatewayHandler

Represents a gateway handler

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new GatewayHandler(client)

Create a new GatewayHandler

Parameters

NameTypeDescription
clientClientThe client

Defined in

lib/gateway/GatewayHandler.ts:214open in new window

Properties

client

client: Client

The client

Defined in

lib/gateway/GatewayHandler.ts:34open in new window


gatewayEventHandler

gatewayEventHandler: GatewayEventHandler

The gateway event handler

Defined in

lib/gateway/GatewayHandler.ts:39open in new window


toHandlerMap

Readonly toHandlerMap: Record<"BotServerMembershipCreated" | "BotServerMembershipDeleted" | "CalendarEventCreated" | "CalendarEventDeleted" | "CalendarEventRsvpDeleted" | "CalendarEventRsvpManyUpdated" | "CalendarEventRsvpUpdated" | "CalendarEventUpdated" | "ChannelMessageReactionCreated" | "ChannelMessageReactionDeleted" | "ChatMessageCreated" | "ChatMessageDeleted" | "ChatMessageUpdated" | "DocCreated" | "DocDeleted" | "DocUpdated" | "ForumTopicCommentCreated" | "ForumTopicCommentDeleted" | "ForumTopicCommentReactionCreated" | "ForumTopicCommentReactionDeleted" | "ForumTopicCommentUpdated" | "ForumTopicCreated" | "ForumTopicDeleted" | "ForumTopicLocked" | "ForumTopicPinned" | "ForumTopicReactionCreated" | "ForumTopicReactionDeleted" | "ForumTopicUnlocked" | "ForumTopicUnpinned" | "ForumTopicUpdated" | "ListItemCompleted" | "ListItemCreated" | "ListItemDeleted" | "ListItemUncompleted" | "ListItemUpdated" | "ServerChannelCreated" | "ServerChannelDeleted" | "ServerChannelUpdated" | "ServerMemberBanned" | "ServerMemberJoined" | "ServerMemberRemoved" | "ServerMemberUnbanned" | "ServerMemberUpdated" | "ServerRolesUpdated" | "ServerWebhookCreated" | "ServerWebhookUpdated", (data: object) => void>

Defined in

lib/gateway/GatewayHandler.ts:42open in new window

Methods

handleMessage

handleMessage(eventType, eventData): Promise<void>

Handles a message from the gateway

Parameters

NameType
eventType"BotServerMembershipCreated" | "BotServerMembershipDeleted" | "CalendarEventCreated" | "CalendarEventDeleted" | "CalendarEventRsvpDeleted" | "CalendarEventRsvpManyUpdated" | "CalendarEventRsvpUpdated" | "CalendarEventUpdated" | "ChannelMessageReactionCreated" | "ChannelMessageReactionDeleted" | "ChatMessageCreated" | "ChatMessageDeleted" | "ChatMessageUpdated" | "DocCreated" | "DocDeleted" | "DocUpdated" | "ForumTopicCommentCreated" | "ForumTopicCommentDeleted" | "ForumTopicCommentReactionCreated" | "ForumTopicCommentReactionDeleted" | "ForumTopicCommentUpdated" | "ForumTopicCreated" | "ForumTopicDeleted" | "ForumTopicLocked" | "ForumTopicPinned" | "ForumTopicReactionCreated" | "ForumTopicReactionDeleted" | "ForumTopicUnlocked" | "ForumTopicUnpinned" | "ForumTopicUpdated" | "ListItemCompleted" | "ListItemCreated" | "ListItemDeleted" | "ListItemUncompleted" | "ListItemUpdated" | "ServerChannelCreated" | "ServerChannelDeleted" | "ServerChannelUpdated" | "ServerMemberBanned" | "ServerMemberJoined" | "ServerMemberRemoved" | "ServerMemberUnbanned" | "ServerMemberUpdated" | "ServerRolesUpdated" | "ServerWebhookCreated" | "ServerWebhookUpdated"
eventDataobject

Returns

Promise<void>

Defined in

lib/gateway/GatewayHandler.ts:222open in new window

Last Updated:
Contributors: Reinhardt