QQAPI

package
v1.0.0-beta.23 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 7, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

* @Author: NyanCatda * @Date: 2021-11-05 13:51:15 * @LastEditTime: 2022-03-07 19:04:32 * @LastEditors: NyanCatda * @Description: Session处理API * @FilePath: \ShionBot\Controller\MessagePushAPI\SNSAPI\QQAPI\SessionKey.go

* @Author: NyanCatda * @Date: 2021-11-05 18:12:19 * @LastEditTime: 2022-01-24 21:20:31 * @LastEditors: NyanCatda * @Description: QQ API定时器 * @FilePath: \ShionBot\src\MessagePushAPI\SNSAPI\QQAPI\StartQQAPI.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateSessionKey

func CreateSessionKey() (string, []byte, *http.Response, error)

*

  • @description: 创建一个SessionKey
  • @param {*}
  • @return {string} 新的SessionKey
  • @return {[]byte}
  • @return {*http.Response}
  • @return {error}

func CycleGetKey

func CycleGetKey()

定时请求mirai-api-http Session

func GetSessionKey

func GetSessionKey() string

*

  • @description: 获取缓存本地的SessionKey
  • @param {*}
  • @return {string}

func SendFriendMessage

func SendFriendMessage(target int, text string, quote bool, quoteID int) ([]byte, *http.Response, error)

*

  • @description: 发送好友消息
  • @param {int} target 好友QQ号
  • @param {string} text 消息文本
  • @param {bool} quote 是否需要回复
  • @param {int} quoteID 回复的消息ID(不需要时为0即可)
  • @return {[]byte}
  • @return {*http.Response}
  • @return {error}

func SendGroupAtMessage

func SendGroupAtMessage(target int, text string, AtID int, quote bool, quoteID int) ([]byte, *http.Response, error)

*

  • @description: 发送带@的群消息
  • @param {int} target 群号
  • @param {string} text 消息文本
  • @param {int} AtID 需要@的人的QQ号
  • @param {bool} quote 是否需要回复
  • @param {int} quoteID 回复的消息ID(不需要时为0即可)
  • @return {[]byte}
  • @return {*http.Response}
  • @return {error}

func SendGroupMessage

func SendGroupMessage(target int, text string, quote bool, quoteID int) ([]byte, *http.Response, error)

*

  • @description: 发送群消息
  • @param {int} target 群号
  • @param {string} text 消息文本
  • @param {bool} quote 是否需要回复
  • @param {int} quoteID 回复的消息ID(不需要时为0即可)
  • @return {[]byte}
  • @return {*http.Response}
  • @return {error}

func SendNudge

func SendNudge(target int, subject int, kind string) ([]byte, *http.Response, error)

*

  • @description: 发送头像戳一戳
  • @param {int} target 目标QQ号
  • @param {int} subject 消息接受主体,为群号或QQ号
  • @param {string} kind 上下文类型,可选值 Friend,Group,Stranger
  • @return {[]byte}
  • @return {*http.Response}
  • @return {error}

func SendTempMessage

func SendTempMessage(target int, group int, text string, quote bool, quoteID int) ([]byte, *http.Response, error)

*

  • @description: 发送临时会话
  • @param {int} target 临时会话对象QQ号
  • @param {int} group 临时会话群号
  • @param {string} text 消息文本
  • @param {bool} quote 是否需要回复
  • @param {int} quoteID 回复的消息ID(不需要时为0即可)
  • @return {[]byte}
  • @return {*http.Response}
  • @return {error}

func StartQQAPI

func StartQQAPI() error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL