Skip to main content

useMessageOptions

Introduction

The useMessageOptions hook is used to implement menu actions of an individual message object. It contains the functions for each of the available menu-options of message. You can use this to implement your menu options when creating a custom message UI. It returns the following.

PropertyTypeDescriptionOptional
onReportOneArgVoidReturns<{ id: string | number; reason: string | null; }>Function to report a message with an ID and optional reason.
onDeleteZeroArgVoidReturnsFunction to delete a message.
onSetTopicZeroArgVoidReturnsFunction to set a message as the topic.
onEditZeroArgVoidReturnsFunction to edit a message.
onReplyZeroArgVoidReturnsFunction to reply to a message.
putReactionOneArgVoidReturns<string>Function to add a reaction to a message.
onReplyPrivatelyOneArgVoidReturns<string | number>Function to reply privately to a message.

Reference

For reference checkout this file