CommunityEvents
CommunityEvents =
object
Event map type for CommunityClient. This type defines the event signatures for community-related events.
For event name constants, see CommunityEvent.
Properties
community.edited()
community.edited: (
evt:CommunityEditedEvent) =>void
Parameters
| Parameter | Type |
|---|---|
evt | CommunityEditedEvent |
Returns
void
Example
import { rootServer, CommunityEvent, CommunityEditedEvent } from "@rootsdk/server-bot";
rootServer.community.communities.on(CommunityEvent.CommunityEdited, (evt: CommunityEditedEvent) => {
// ...
});
community.joined()
community.joined: (
evt:CommunityJoinedEvent) =>void
Parameters
| Parameter | Type |
|---|---|
evt | CommunityJoinedEvent |
Returns
void
Example
import { rootServer, CommunityEvent, CommunityJoinedEvent } from "@rootsdk/server-bot";
rootServer.community.communities.on(CommunityEvent.CommunityJoined, (evt: CommunityJoinedEvent) => {
// ...
});
community.leave()
community.leave: (
evt:CommunityLeaveEvent) =>void
Parameters
| Parameter | Type |
|---|---|
evt | CommunityLeaveEvent |
Returns
void
Example
import { rootServer, CommunityEvent, CommunityLeaveEvent } from "@rootsdk/server-bot";
rootServer.community.communities.on(CommunityEvent.CommunityLeave, (evt: CommunityLeaveEvent) => {
// ...
});