Documentation
¶
Index ¶
- type AddQuickEmoticonData
- type AuditCallbackData
- type BotListenerAddQuickEmoticon
- type BotListenerAuditCallback
- type BotListenerCreateRobot
- type BotListenerDeleteRobot
- type BotListenerJoinVilla
- type BotListenerSendMessage
- type CreateRobotData
- type DeleteRobotData
- type Event
- type EventAddQuickEmoticon
- type EventAuditCallback
- type EventBase
- type EventCreateRobot
- type EventDeleteRobot
- type EventJoinVilla
- type EventSendMessage
- type EventType
- type JoinVillaData
- type Robot
- type SendMessageData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddQuickEmoticonData ¶
type AuditCallbackData ¶
type BotListenerAddQuickEmoticon ¶
type BotListenerAddQuickEmoticon func(data EventAddQuickEmoticon)
type BotListenerAuditCallback ¶
type BotListenerAuditCallback func(data EventAuditCallback)
type BotListenerCreateRobot ¶
type BotListenerCreateRobot func(data EventCreateRobot)
type BotListenerDeleteRobot ¶
type BotListenerDeleteRobot func(data EventDeleteRobot)
type BotListenerJoinVilla ¶
type BotListenerJoinVilla func(data EventJoinVilla)
listeners for each event
type BotListenerSendMessage ¶
type BotListenerSendMessage func(data EventSendMessage)
type CreateRobotData ¶
type CreateRobotData struct {
VillaId uint64 `json:"villa_id"`
}
type DeleteRobotData ¶
type DeleteRobotData struct {
VillaId uint64 `json:"villa_id"`
}
type Event ¶
type Event struct { Event struct { EventBase ExtendData struct { EventData struct { JoinVilla JoinVillaData `json:"JoinVilla,omitempty"` SendMessage SendMessageData `json:"SendMessage,omitempty"` CreateRobot CreateRobotData `json:"CreateRobot,omitempty"` DeleteRobot DeleteRobotData `json:"DeleteRobot,omitempty"` AddQuickEmoticon AddQuickEmoticonData `json:"AddQuickEmoticon,omitempty"` AuditCallback AuditCallbackData `json:"AuditCallback,omitempty"` } `json:"EventData"` } `json:"extend_data"` } `json:"event"` }
type EventAddQuickEmoticon ¶
type EventAddQuickEmoticon struct { EventBase Data AddQuickEmoticonData }
func Event2EventAddQuickEmoticon ¶
func Event2EventAddQuickEmoticon(event Event) EventAddQuickEmoticon
type EventAuditCallback ¶
type EventAuditCallback struct { EventBase Data AuditCallbackData }
func Event2EventAuditCallback ¶
func Event2EventAuditCallback(event Event) EventAuditCallback
type EventCreateRobot ¶
type EventCreateRobot struct { EventBase Data CreateRobotData }
func Event2EventCreateRobot ¶
func Event2EventCreateRobot(event Event) EventCreateRobot
type EventDeleteRobot ¶
type EventDeleteRobot struct { EventBase Data DeleteRobotData }
func Event2EventDeleteRobot ¶
func Event2EventDeleteRobot(event Event) EventDeleteRobot
type EventJoinVilla ¶
type EventJoinVilla struct { EventBase Data JoinVillaData }
func Event2EventJoinVilla ¶
func Event2EventJoinVilla(event Event) EventJoinVilla
type EventSendMessage ¶
type EventSendMessage struct { EventBase Data SendMessageData // contains filtered or unexported fields }
func Event2EventSendMessage ¶
func Event2EventSendMessage(event Event, api *apis.ApiBase) EventSendMessage
func (*EventSendMessage) GetContent ¶
func (e *EventSendMessage) GetContent(is_treat bool) string
获取消息内容,is_treat为true时,如果消息内容以/开头,则去掉/
func (*EventSendMessage) Reply ¶
func (e *EventSendMessage) Reply(msg api_models.MsgInputModel) (api_models.SendMessageModel, int, error)
在相应的房间回复消息 i.e. wrapper for api.SendMessage
type JoinVillaData ¶
type SendMessageData ¶
type SendMessageData struct { ContentRaw string `json:"content"` Content struct { Trace struct { VisualRoomVersion string `json:"visual_room_version"` AppVersion string `json:"app_version"` ActionType uint8 `json:"action_type"` BotMsgId string `json:"bot_msg_id"` Client string `json:"client"` Env string `json:"env"` RongSdkVersion string `json:"rong_sdk_version"` } `json:"trace"` MentionedInfo struct { MentionedContent string `json:"mentioned_content"` UserIdList []string `json:"user_id_list"` Type uint8 `json:"type"` } `json:"mentioned_info"` User struct { PortraitUri string `json:"portrait_uri"` Extra struct { MemberRoles struct { Name string `json:"name"` Color string `json:"color"` WebColor string `json:"web_color"` RoleFontColor string `json:"role_font_color"` RoleBgColor string `json:"role_bg_color"` } `json:"member_roles"` State interface{} `json:"state"` } `json:"extra"` Name string `json:"name"` Alias string `json:"alias"` Id string `json:"id"` Portrait string `json:"portrait"` } `json:"user"` Content struct { Images []struct { Url string `json:"url"` Size struct { Width uint64 `json:"width"` Height uint64 `json:"height"` } `json:"size"` FileSize uint64 `json:"file_size"` } `json:"images"` Entities []struct { Offset uint8 `json:"offset"` Length uint8 `json:"length"` Entity struct { Type string `json:"type"` BotId string `json:"bot_id"` } `json:"entity"` } `json:"entities"` Text string `json:"text"` } } FromUserId uint64 `json:"from_user_id"` SendAt uint64 `json:"send_at"` ObjectName uint64 `json:"object_name"` RoomId uint64 `json:"room_id"` Nickname string `json:"nickname"` MsgUid string `json:"msg_uid"` BotMsgId string `json:"bot_msg_id"` VillaId uint64 `json:"villa_id"` }
Click to show internal directories.
Click to hide internal directories.