Skip to main content
Explore this module further in the Mover Registry: @sage/channel

Events

ChannelCreated

Emitted when a new Channel is created.

ChannelFollowsUpdate

Emitted when a User is follows or unfollows a Channel.

ChannelModerationUpdate

Emitted when a Moderator is added or removed from a Channel.

ChannelPostCreated

Emitted when a new Post is created for a Channel.

ChannelUpdated

Emitted when a Channel is updated.

Constants

Attempted to change the channel name to a different value. Channel names can only change the displayed case (e.g. “my-channel” to “my-CHANNEL”).

Functions

add_moderator_as_owner

Adds a moderator to the channel. Aborts with EIsNotOwner if the transaction was not executed by the channel owner and EIncorrectCoinType, EIncorrectCustomPayment, or EIncorrectSuiPayment if the payment was incorrect.

create

Creates a new Channel. Aborts with EAppChannelRegistryMismatch if the ChannelRegistry does not belong to the App, and EIncorrectCoinType, EIncorrectCustomPayment, or EIncorrectSuiPayment if the payment was incorrect.

create_registry

Creates a new channel registry for an App.

follow

A User follows a Channel. Aborts with EAppChannelMismatch if the Channel does not belong to the App, EIsMember if the User already follows the Channel, and EIncorrectCoinType, EIncorrectCustomPayment, or EIncorrectSuiPayment if the payment was incorrect.

post

Creates a Post on the Channel. Aborts with EIsNotMember if the User is not following the Channel, and EIncorrectCoinType, EIncorrectCustomPayment, or EIncorrectSuiPayment if the payment was incorrect.

remove_moderator_as_owner

Removes a User as a Moderator on the Channel. Aborts with EIsNotOwner if the User is not owner of the Channel, and EIncorrectCoinType, EIncorrectCustomPayment, or EIncorrectSuiPayment if the payment was incorrect.

unfollow

User unfollows a Channel.

update_as_owner

Update Channel metadata. The lowercase value of the name cannot be edited, but the casing can. Aborts with EIsNotModerator if the User is not a moderator of the Channel, EChannelNameMismatch if anything about the name is changed other than casing, and EIncorrectCoinType, EIncorrectCustomPayment, or EIncorrectSuiPayment if the payment was incorrect.