Documentation ¶
Index ¶
- Constants
- type API
- type ActionType
- type Anonymous
- type BotHeartBeat
- type CanSendImageResp
- type CanSendRecordResp
- type CleanCacheResp
- type Cookies
- type CookiesAndToken
- type CurrentTalkative
- type DeleteMsgResp
- type Event
- type File
- type Frame
- type FriendAddNoticeEvent
- type FriendAddRequestEvent
- type FriendMsgRecallNoticeEvent
- type GetCRSFTokenResp
- type GetCookiesResp
- type GetCredentialsResp
- type GetForwardMsgResp
- type GetFriendListResp
- type GetGroupHonorInfoResp
- type GetGroupInfoResp
- type GetGroupListResp
- type GetGroupMemberInfoResp
- type GetGroupMemberListResp
- type GetImageResp
- type GetLoginInfoResp
- type GetMsgResp
- type GetRecordResp
- type GetStatusResp
- type GetStrangerInfoResp
- type GetVersioInfoResp
- type GroupAddOrInviteRequestEvent
- type GroupAdminChangeNoticeEvent
- type GroupBanNoticeEvent
- type GroupInfo
- type GroupLuckyKingNoticeEvent
- type GroupMemberDecreaseNoticeEvent
- type GroupMemberHonorChangeNoticeEvent
- type GroupMemberIncreaseNoticeEvent
- type GroupMemberInfo
- type GroupMsgEvent
- type GroupMsgRecallNoticeEvent
- type GroupPokeNoticeEvent
- type GroupQuickOperate
- type GroupSender
- type GroupSubEventType
- type GroupUploadNoticeEvent
- type HeartBeatStatus
- type HonorType
- type ICanSendImageOrRecord
- type IFile
- type IGetFriendList
- type IGetGroupHonorInfo
- type IGetLoginInfo
- type IGetMsg
- type IGetStatus
- type IGetStrangerInfo
- type IGetVersioInfo
- type IMessage
- type LifeTime
- type MetaEventType
- type MsgEventType
- type NoticeType
- type OtherList
- type Params
- type PostType
- type PrivateMsgEvent
- type PrivateQuickOperate
- type PrivateSender
- type PrivateSubEventType
- type ReqType
- type SendForwardMsgResp
- type SendLikeResp
- type SendMsgResponse
- type SendMsgResponseData
- type SetFriendAddRequestResp
- type SetGroupAddRequestResp
- type SetGroupAdminResp
- type SetGroupAnonymousBanResp
- type SetGroupAnonymousResp
- type SetGroupBanResp
- type SetGroupCardResp
- type SetGroupKickResp
- type SetGroupLeaveResp
- type SetGroupNameResp
- type SetGroupSpecialTitleResp
- type SetGroupWholeBanResp
- type SetRestartResp
- type SexType
- type Token
- type UploadFile
Constants ¶
View Source
const ( Message PostType = "message" Notice PostType = "notice" Request PostType = "request" MetaEvent PostType = "meta_event" LifeCycle MetaEventType = "lifecycle" HeartBeat MetaEventType = "heartbeat" Private MsgEventType = "private" Group MsgEventType = "group" SubFriend PrivateSubEventType = "friend" SubGroup PrivateSubEventType = "group" SubOther PrivateSubEventType = "other" SubNormal GroupSubEventType = "normal" SubAnonymous GroupSubEventType = "anonymous" SubNotice GroupSubEventType = "notice" SetAdmin GroupSubEventType = "set" RemoveAdmin GroupSubEventType = "unset" Leave GroupSubEventType = "leave" // 主动退群 Kick GroupSubEventType = "kick" // 成员被踢 KickMe GroupSubEventType = "kick_me" // 登录号被踢 Approve GroupSubEventType = "approve" // 管理员已同意入群 Invite GroupSubEventType = "invite" // 管理员邀请入群 Ban GroupSubEventType = "ban" LiftBan GroupSubEventType = "lift_ban" Poke GroupSubEventType = "poke" LuckyKing GroupSubEventType = "lucky_king" Honor GroupSubEventType = "honor" Male SexType = "male" Female SexType = "female" Unknown SexType = "unknown" GroupUpload NoticeType = "group_upload" GroupAdmin NoticeType = "group_admin" GroupDecrease NoticeType = "group_decrease" GroupIncrease NoticeType = "group_increase" GroupBan NoticeType = "group_ban" FriendAdd NoticeType = "friend_add" GroupRecall NoticeType = "group_recall" FriendRecall NoticeType = "friend_recall" Notify NoticeType = "notify" Talkative HonorType = "talkative" Performer HonorType = "performer" Emotion HonorType = "emotion" FriendAddRequest ReqType = "friend" GroupAddOrInviteRequest ReqType = "group" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionType ¶
type ActionType string
const ( SendPrivateMsg ActionType = "send_private_msg" SendGroupMsg ActionType = "send_group_msg" SendMsg ActionType = "send_msg" SendForwardMsg ActionType = "send_forward_msg" DeleteMsg ActionType = "delete_msg" GetMsg ActionType = "get_msg" GetForwardMsg ActionType = "get_forward_msg" SendLike ActionType = "send_like" SetGroupKick ActionType = "set_group_kick" SetGroupBan ActionType = "set_group_ban" SetGroupAnonymousBan ActionType = "set_group_anonymous_ban" SetGroupWholeBan ActionType = "set_group_whole_ban" SetGroupAdmin ActionType = "set_group_admin" SetGroupAnonymous ActionType = "set_group_anonymous" SetGroupCard ActionType = "set_group_card" SetGroupName ActionType = "set_group_name" SetGroupLeave ActionType = "set_group_leave" SetGroupSpecialTitle ActionType = "set_group_special_title" SetFriendAddRequest ActionType = "set_friend_add_request" SetGroupAddRequest ActionType = "set_group_add_request" GetLoginInfo ActionType = "get_login_info" GetStrangerInfo ActionType = "get_stranger_info" GetFriendList ActionType = "get_friend_list" GetGroupInfo ActionType = "get_group_info" GetGroupList ActionType = "get_group_list" GetGroupMemberInfo ActionType = "get_group_member_info" GetGroupMemberList ActionType = "get_group_member_list" GetGroupHonorInfo ActionType = "get_group_honor_info" GetGookies ActionType = "get_cookies" GetGsrfToken ActionType = "get_csrf_token" GetGredentials ActionType = "get_credentials" GetGecord ActionType = "get_record" GetImage ActionType = "get_image" CanSendImage ActionType = "can_send_image" CanSendRecord ActionType = "can_send_record" GetStatus ActionType = "get_status" GetVersioInfo ActionType = "get_version_info" SetRestart ActionType = "set_restart" CleanCache ActionType = "clean_cache" )
type BotHeartBeat ¶
type BotHeartBeat struct { Event MetaEventType string `json:"meta_event_type"` Status *HeartBeatStatus `json:"status,omitempty"` }
type CanSendImageResp ¶
type CanSendImageResp struct { Status string `json:"status,omitempty"` RetCode int32 `json:"retcode,omitempty"` Data *ICanSendImageOrRecord `json:"data,omitempty"` Echo string `json:"echo,omitempty"` }
type CanSendRecordResp ¶
type CanSendRecordResp struct { Status string `json:"status,omitempty"` RetCode int32 `json:"retcode,omitempty"` Data *ICanSendImageOrRecord `json:"data,omitempty"` Echo string `json:"echo,omitempty"` }
type CleanCacheResp ¶
type CookiesAndToken ¶
type CurrentTalkative ¶
type DeleteMsgResp ¶
type Frame ¶
type Frame struct { BotId int64 `json:"bot_id,omitempty"` Echo string `json:"echo,omitempty"` Ok bool `json:"ok,omitempty"` Time int64 `json:"time,omitempty"` SelfId int64 `json:"self_id,omitempty"` PostType PostType `json:"post_type,omitempty"` SubType string `json:"sub_type,omitempty"` MessageType string `json:"message_type,omitempty"` NoticeType string `json:"notice_type,omitempty"` RequestType string `json:"request_type,omitempty"` MetaEventType string `json:"meta_event_type"` Status any `json:"status,omitempty"` Code int32 `json:"retcode,omitempty"` Data any `json:"data,omitempty"` *API }
type FriendAddNoticeEvent ¶
type FriendAddNoticeEvent struct { Event NoticeType NoticeType `json:"notice_type,omitempty"` UserId int64 `json:"user_id,omitempty"` }
type FriendAddRequestEvent ¶
type FriendMsgRecallNoticeEvent ¶
type FriendMsgRecallNoticeEvent struct { Event NoticeType NoticeType `json:"notice_type,omitempty"` UserId int64 `json:"user_id,omitempty"` MessageId int64 `json:"message_id,omitempty"` }
type GetCRSFTokenResp ¶
type GetCookiesResp ¶
type GetCredentialsResp ¶
type GetCredentialsResp struct { Status string `json:"status,omitempty"` RetCode int32 `json:"retcode,omitempty"` Data *CookiesAndToken `json:"data,omitempty"` Echo string `json:"echo,omitempty"` }
type GetForwardMsgResp ¶
type GetFriendListResp ¶
type GetFriendListResp struct { Status string `json:"status,omitempty"` RetCode int32 `json:"retcode,omitempty"` Data *IGetFriendList `json:"data,omitempty"` Echo string `json:"echo,omitempty"` }
type GetGroupHonorInfoResp ¶
type GetGroupHonorInfoResp struct { Status string `json:"status,omitempty"` RetCode int32 `json:"retcode,omitempty"` Data *IGetGroupHonorInfo `json:"data,omitempty"` Echo string `json:"echo,omitempty"` }
type GetGroupInfoResp ¶
type GetGroupListResp ¶
type GetGroupMemberInfoResp ¶
type GetGroupMemberInfoResp struct { Status string `json:"status,omitempty"` RetCode int32 `json:"retcode,omitempty"` Data *GroupMemberInfo `json:"data,omitempty"` Echo string `json:"echo,omitempty"` }
type GetGroupMemberListResp ¶
type GetGroupMemberListResp struct { Status string `json:"status,omitempty"` RetCode int32 `json:"retcode,omitempty"` Data []*GroupMemberInfo `json:"data,omitempty"` Echo string `json:"echo,omitempty"` }
type GetImageResp ¶
type GetLoginInfoResp ¶
type GetLoginInfoResp struct { Status string `json:"status,omitempty"` RetCode int32 `json:"retcode,omitempty"` Data *IGetLoginInfo `json:"data,omitempty"` Echo string `json:"echo,omitempty"` }
type GetMsgResp ¶
type GetRecordResp ¶
type GetStatusResp ¶
type GetStatusResp struct { Status string `json:"status,omitempty"` RetCode int32 `json:"retcode,omitempty"` Data *IGetStatus `json:"data,omitempty"` Echo string `json:"echo,omitempty"` }
type GetStrangerInfoResp ¶
type GetStrangerInfoResp struct { Status string `json:"status,omitempty"` RetCode int32 `json:"retcode,omitempty"` Data *IGetStrangerInfo `json:"data,omitempty"` Echo string `json:"echo,omitempty"` }
type GetVersioInfoResp ¶
type GetVersioInfoResp struct { Status string `json:"status,omitempty"` RetCode int32 `json:"retcode,omitempty"` Data *IGetVersioInfo `json:"data,omitempty"` Echo string `json:"echo,omitempty"` }
type GroupAddOrInviteRequestEvent ¶
type GroupAddOrInviteRequestEvent struct { Event RequestType string `json:"request_type,omitempty"` SubType string `json:"sub_type,omitempty"` GroupId int64 `json:"group_id,omitempty"` UserId int64 `json:"user_id,omitempty"` Comment string `json:"comment,omitempty"` Flag string `json:"flag,omitempty"` }
type GroupAdminChangeNoticeEvent ¶
type GroupAdminChangeNoticeEvent struct { Event NoticeType NoticeType `json:"notice_type,omitempty"` SubType string `json:"sub_type,omitempty"` GroupId int64 `json:"group_id,omitempty"` UserId int64 `json:"user_id,omitempty"` }
type GroupBanNoticeEvent ¶
type GroupBanNoticeEvent struct { Event NoticeType NoticeType `json:"notice_type,omitempty"` SubType string `json:"sub_type,omitempty"` GroupId int64 `json:"group_id,omitempty"` OperatorId int64 `json:"operator_id,omitempty"` UserId int64 `json:"user_id,omitempty"` Duration int64 `json:"duration,omitempty"` }
type GroupMemberInfo ¶
type GroupMemberInfo struct { GroupId int64 `json:"group_id,omitempty"` UserId int64 `json:"user_id,omitempty"` Nickname string `json:"nickname,omitempty"` Card string `json:"card,omitempty"` Sex SexType `json:"sex,omitempty"` Age int32 `json:"age,omitempty"` Area string `json:"area,omitempty"` JoinTime int64 `json:"join_time,omitempty"` LastSentTime int64 `json:"last_sent_time,omitempty"` Level string `json:"level,omitempty"` Role string `json:"role,omitempty"` UnFriendly bool `json:"unfriendly,omitempty"` Title string `json:"title,omitempty"` TitleExpireTime int64 `json:"title_expire_time,omitempty"` CardChangeable bool `json:"card_changeable,omitempty"` }
type GroupMsgEvent ¶
type GroupMsgEvent struct { Event MessageType string `json:"message_type,omitempty"` SubType string `json:"sub_type,omitempty"` MessageId int64 `json:"message_id,omitempty"` GroupId int64 `json:"group_id,omitempty"` UserId int64 `json:"user_id,omitempty"` Anonymous *Anonymous `json:"anonymous,omitempty"` Message []*IMessage `json:"message,omitempty"` RawMessage string `json:"raw_message,omitempty"` Font int32 `json:"font,omitempty"` Sender *GroupSender `json:"sender,omitempty"` }
type GroupPokeNoticeEvent ¶
type GroupQuickOperate ¶
type GroupQuickOperate struct { Reply string `json:"reply,omitempty"` AutoEscape bool `json:"auto_escape,omitempty"` AtSender bool `json:"at_sender,omitempty"` Delete bool `json:"delete,omitempty"` Kick bool `json:"kick,omitempty"` Ban bool `json:"ban,omitempty"` BanDuration int64 `json:"ban_duration,omitempty"` }
type GroupSender ¶
type GroupSender struct { UserId int64 `json:"user_id,omitempty"` Nickname string `json:"nickname,omitempty"` Card string `json:"card,omitempty"` Sex string `json:"sex,omitempty"` Age int32 `json:"age,omitempty"` Area string `json:"area,omitempty"` Level string `json:"level,omitempty"` Role string `json:"role,omitempty"` Title string `json:"title,omitempty"` }
type GroupSubEventType ¶
type GroupSubEventType string
type GroupUploadNoticeEvent ¶
type GroupUploadNoticeEvent struct { Event NoticeType NoticeType `json:"notice_type,omitempty"` GroupId int64 `json:"group_id,omitempty"` UserId int64 `json:"user_id,omitempty"` File *UploadFile `json:"file,omitempty"` }
type HeartBeatStatus ¶
type ICanSendImageOrRecord ¶
type ICanSendImageOrRecord struct {
Yes bool `json:"yes,omitempty"`
}
type IGetFriendList ¶
type IGetGroupHonorInfo ¶
type IGetGroupHonorInfo struct { GroupId int64 `json:"group_id,omitempty"` CurrentTalkative *CurrentTalkative `json:"current_talkative,omitempty"` // 当前龙王,仅 type 为 talkative 或 all 时有数据 TalkativeList *OtherList `json:"talkative_list,omitempty"` // 历史龙王,仅 type 为 talkative 或 all 时有数据 PerformerList *OtherList `json:"performer_list,omitempty"` // 群聊之火,仅 type 为 performer 或 all 时有数据 LegendList *OtherList `json:"legend_list,omitempty"` // 群聊炽焰,仅 type 为 legend 或 all 时有数据 StrongNewbieList *OtherList `json:"strong_newbie_list,omitempty"` // 冒尖小春笋,仅 type 为 strong_newbie 或 all 时有数据 EmotionList *OtherList `json:"emotion_list,omitempty"` // 快乐之源,仅 type 为 emotion 或 all 时有数据 }
type IGetLoginInfo ¶
type IGetStatus ¶
type IGetStrangerInfo ¶
type IGetVersioInfo ¶
type MetaEventType ¶
type MetaEventType string
type MsgEventType ¶
type MsgEventType string
type NoticeType ¶
type NoticeType string
type Params ¶
type Params struct { UserId int64 `json:"user_id,omitempty"` GroupId int64 `json:"group_id,omitempty"` Message []*IMessage `json:"message,omitempty"` Messages []*IMessage `json:"messages,omitempty"` MessageType string `json:"message_type,omitempty"` AutoEscape bool `json:"auto_escape,omitempty"` MessageId int64 `json:"message_id,omitempty"` Id string `json:"id,omitempty"` RejectAddRequest bool `json:"reject_add_request,omitempty"` Duration int64 `json:"duration,omitempty"` Enable bool `json:"enable,omitempty"` Card string `json:"card,omitempty"` GroupName string `json:"group_name,omitempty"` Flag string `json:"flag,omitempty"` Approve bool `json:"approve,omitempty"` Remark string `json:"remark,omitempty"` IsDismiss bool `json:"is_dismiss,omitempty"` SpecialTitle string `json:"special_title,omitempty"` SubType string `json:"sub_type,omitempty"` Type string `json:"type,omitempty"` Reason string `json:"reason,omitempty"` Nickname string `json:"nickname,omitempty"` NoCache bool `json:"no_cache,omitempty"` Domain string `json:"domain,omitempty"` File string `json:"file,omitempty"` Delay int32 `json:"delay,omitempty"` OutFormat string `json:"out_format,omitempty"` Times int32 `json:"times,omitempty"` Anonymous *Anonymous `json:"anonymous,omitempty"` AnonymousFlag string `json:"anonymous_flag,omitempty"` Name string `json:"name,omitempty"` Uin string `json:"uin,omitempty"` Content string `json:"content,omitempty"` }
type PrivateMsgEvent ¶
type PrivateMsgEvent struct { Event MessageType string `json:"message_type,omitempty"` SubType string `json:"sub_type,omitempty"` MessageId int64 `json:"message_id,omitempty"` UserId int64 `json:"user_id,omitempty"` Message []*IMessage `json:"message,omitempty"` RawMessage string `json:"raw_message,omitempty"` Font int32 `json:"font,omitempty"` Sender *PrivateSender `json:"sender,omitempty"` }
type PrivateQuickOperate ¶
type PrivateSender ¶
type PrivateSubEventType ¶
type PrivateSubEventType string
type SendForwardMsgResp ¶
type SendLikeResp ¶
type SendMsgResponse ¶
type SendMsgResponse struct { Status string `json:"status,omitempty"` RetCode int32 `json:"retcode,omitempty"` Data *SendMsgResponseData `json:"data,omitempty"` Echo string `json:"echo,omitempty"` }
type SendMsgResponseData ¶
type SendMsgResponseData struct {
MessageId int64 `json:"message_id,omitempty"`
}
type SetFriendAddRequestResp ¶
type SetGroupAddRequestResp ¶
type SetGroupAdminResp ¶
type SetGroupAnonymousResp ¶
type SetGroupBanResp ¶
type SetGroupCardResp ¶
type SetGroupKickResp ¶
type SetGroupLeaveResp ¶
type SetGroupNameResp ¶
type SetGroupWholeBanResp ¶
type SetRestartResp ¶
Click to show internal directories.
Click to hide internal directories.