hoshii / Exports / GatewayHandler
GatewayHandler
Represents a gateway handler
Table of contents
Constructors
Properties
Methods
Constructors
constructor
• new GatewayHandler(client
)
Create a new GatewayHandler
Parameters
Name | Type | Description |
---|---|---|
client | Client | The client |
Defined in
lib/gateway/GatewayHandler.ts:214
Properties
client
• client: Client
The client
Defined in
lib/gateway/GatewayHandler.ts:34
gatewayEventHandler
• gatewayEventHandler: GatewayEventHandler
The gateway event handler
Defined in
lib/gateway/GatewayHandler.ts:39
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:42
Methods
handleMessage
▸ handleMessage(eventType
, eventData
): Promise
<void
>
Handles a message from the gateway
Parameters
Name | Type |
---|---|
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" |
eventData | object |
Returns
Promise
<void
>